Skip to content

Commit 7725fab

Browse files
committedAug 17, 2024
Simplified keypad and MPG symbol handling.
1 parent 7ade244 commit 7725fab

File tree

5 files changed

+40
-33
lines changed

5 files changed

+40
-33
lines changed
 

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ It has been written to complement grblHAL and has features such as proper keyboa
1313

1414
---
1515

16-
Latest build date is 20240719, see the [changelog](changelog.md) for details.
16+
Latest build date is 20240817, see the [changelog](changelog.md) for details.
1717

1818
__NOTE:__ Build 20240222 has moved the probe input to the ioPorts pool of inputs and will be allocated from it when configured.
1919
The change is major and _potentially dangerous_, it may damage your probe, so please _verify correct operation_ after installing this, or later, builds.

‎changelog.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
## grblHAL changelog
22

3+
<a name="20240817">Build 20240817
4+
5+
Core:
6+
7+
* Simplified keypad and MPG symbol handling.
8+
9+
Drivers:
10+
11+
* Most: updated for simplified keypad and MPG symbol handling.
12+
13+
* LPC176x: added support for keypad and MPG plugin. I2C keypad not fully supported and not tested.
14+
15+
Plugins:
16+
17+
* Keypad: updated for simplified keypad and MPG symbol handling.
18+
19+
---
20+
321
<a name="20240812">Build 20240812
422

523
Core:
@@ -14,7 +32,7 @@ Core:
1432

1533
Drivers:
1634

17-
* imXRT1061, MSP432, STM32F4xx, STM32F7xx: Updated to take advandage of new spindle encoder binding functionality.
35+
* imXRT1061, MSP432, STM32F4xx, STM32F7xx: updated to take advantage of new spindle encoder binding functionality.
1836

1937
Plugins:
2038

‎driver_opts.h

+16-27
Original file line numberDiff line numberDiff line change
@@ -94,54 +94,43 @@
9494
#define SERIAL_STREAM 0
9595
#endif
9696

97-
#ifndef KEYPAD_ENABLE
98-
#define KEYPAD_ENABLE 0
99-
#endif
100-
10197
#ifndef MACROS_ENABLE
10298
#define MACROS_ENABLE 0
10399
#endif
104100

105-
#ifndef MPG_ENABLE
106-
#define MPG_ENABLE 0
107-
#endif
108-
109-
#if MPG_ENABLE == 1 && KEYPAD_ENABLE == 2
110-
#define MPG_MODE 2
111-
#elif MPG_ENABLE == 2
112-
#define MPG_MODE 3
113-
#elif MPG_ENABLE
114-
#define MPG_MODE 1
115-
#else
116-
#define MPG_MODE 0
117-
#endif
118-
119-
#if MPG_ENABLE && !defined(MPG_STREAM)
120-
#if USB_SERIAL_CDC
121-
#define MPG_STREAM 0
122-
#else
123-
#define MPG_STREAM 1
124-
#endif
101+
#ifndef KEYPAD_ENABLE
102+
#define KEYPAD_ENABLE 0
125103
#endif
126104

127105
#if KEYPAD_ENABLE == 1
128106
#ifdef I2C_STROBE_ENABLE
129107
#undef I2C_STROBE_ENABLE
130108
#endif
131109
#define I2C_STROBE_ENABLE 1
132-
#elif KEYPAD_ENABLE == 2 && !defined(MPG_STREAM)
133-
#ifndef KEYPAD_STREAM
110+
#elif KEYPAD_ENABLE == 2 && !defined(KEYPAD_STREAM)
134111
#if USB_SERIAL_CDC
135112
#define KEYPAD_STREAM 0
136113
#else
137114
#define KEYPAD_STREAM 1
138115
#endif
139116
#endif
140-
#endif
117+
141118
#ifndef I2C_STROBE_ENABLE
142119
#define I2C_STROBE_ENABLE 0
143120
#endif
144121

122+
#ifndef MPG_ENABLE
123+
#define MPG_ENABLE 0
124+
#endif
125+
126+
#if MPG_ENABLE && !defined(MPG_STREAM)
127+
#if USB_SERIAL_CDC
128+
#define MPG_STREAM 0
129+
#else
130+
#define MPG_STREAM 1
131+
#endif
132+
#endif
133+
145134
#if DISPLAY_ENABLE == 2
146135
#ifdef I2C_ENABLE
147136
#undef I2C_ENABLE

‎grbl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#else
4343
#define GRBL_VERSION "1.1f"
4444
#endif
45-
#define GRBL_BUILD 20240812
45+
#define GRBL_BUILD 20240817
4646

4747
#define GRBL_URL "https://github.com/grblHAL"
4848

‎pin_bits_masks.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#error "I2C keypad/strobe is not supported in this configuration!"
4444
#endif
4545

46-
#if MPG_MODE == 1 && !defined(MPG_MODE_PIN)
46+
#if MPG_ENABLE == 1 && !defined(MPG_MODE_PIN)
4747
#error "MPG mode input is not supported in this configuration!"
4848
#endif
4949

@@ -197,7 +197,7 @@
197197

198198
#if SAFETY_DOOR_ENABLE || MOTOR_FAULT_ENABLE || MOTOR_WARNING_ENABLE || PROBE_DISCONNECT_ENABLE || \
199199
STOP_DISABLE_ENABLE || BLOCK_DELETE_ENABLE || SINGLE_BLOCK_ENABLE || LIMITS_OVERRIDE_ENABLE || \
200-
(defined(AUX_DEVICES) && (PROBE_ENABLE || I2C_STROBE_ENABLE || MPG_MODE == 1 || QEI_SELECT_ENABLE)) || defined __DOXYGEN__
200+
(defined(AUX_DEVICES) && (PROBE_ENABLE || I2C_STROBE_ENABLE || MPG_ENABLE == 1 || QEI_SELECT_ENABLE)) || defined __DOXYGEN__
201201

202202
#define AUX_CONTROLS_ENABLED 1
203203

@@ -244,7 +244,7 @@ static aux_ctrl_t aux_ctrl[] = {
244244
{ .function = Input_I2CStrobe, .aux_port = 0xFF, .irq_mode = (pin_irq_mode_t)(IRQ_Mode_Change), .cap = { .value = 0 }, .pin = I2C_STROBE_PIN, .port = NULL },
245245
#endif
246246
#endif
247-
#if MPG_MODE == 1 && defined(MPG_MODE_PIN) && defined(AUX_DEVICES)
247+
#if MPG_ENABLE == 1 && defined(MPG_MODE_PIN) && defined(AUX_DEVICES)
248248
#ifdef MPG_MODE_PORT
249249
{ .function = Input_MPGSelect, .aux_port = 0xFF, .irq_mode = (pin_irq_mode_t)(IRQ_Mode_Change), .cap = { .value = 0 }, .pin = MPG_MODE_PIN, .port = MPG_MODE_PORT },
250250
#else

0 commit comments

Comments
 (0)
Please sign in to comment.