Skip to content

Commit 323dd84

Browse files
committed
Added (PRINT, <msg>) support and parameter formatting for DEBUG and PRINT commands.
Added named parameters for getting absolute (G53) position: _abs_x, abs_y, ... Available when expression support is enabled. Changed stepper enable HAL signature to allow current reduction when idle. Added reference id to spindle registration in order to allow configuring default spindle, and possibly additional spindles, at compile time.
1 parent 5d6a99c commit 323dd84

19 files changed

+282
-92
lines changed

README.md

Lines changed: 1 addition & 1 deletion
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 20240907, see the [changelog](changelog.md) for details.
16+
Latest build date is 20240928, 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

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,42 @@
11
## grblHAL changelog
22

3+
<a name="20240928">Build 20240928
4+
5+
* Added `(PRINT, <msg>)` support and parameter formatting for `DEBUG` and `PRINT` commands. Available when expression support is enabled.
6+
7+
* Added named parameters for getting absolute \(G53\) position: `_abs_x`, `abs_y`, ... Available when expression support is enabled.
8+
9+
* Changed stepper enable HAL signature to allow current reduction when idle. Requires compatible stepper drivers and low level code support.
10+
11+
* Added reference id to spindle registration in order to allow configuring default spindle, and possibly additional spindles, at compile time.
12+
13+
* Fix for hardfault when some $-settings are changed and there are no auxilary inputs defined in the board map. Ref. [issue #588](https://github.com/grblHAL/core/issues/588).
14+
15+
Drivers:
16+
17+
* All: updated for core changes mentioned above.
18+
19+
* ESP32, STM32F4xx, STM32F7xx: added basic support for the core HAL timer API. Changed step inject code to interrupt driven instead of polled.
20+
21+
Plugins:
22+
23+
* Spindle: updated to support new spindle reference id in the core, simplified code.
24+
25+
* SD Card \(macros\): fixed bug in handling of repeat loops.
26+
27+
---
28+
329
<a name="20240921">Build 20240921
430

531
Core:
632

733
* Added generic HAL timer API and function for getting which `G65` parameter words were supplied.
834

9-
Networking:
10-
11-
* Made parsing of HTTP header keywords case insensitive. Ref. [issue #11](https://github.com/grblHAL/Plugin_networking/issues/11).
35+
Plugins:
1236

13-
SD card (macros):
37+
* Networking: made parsing of HTTP header keywords case insensitive. Ref. [issue #11](https://github.com/grblHAL/Plugin_networking/issues/11).
1438

15-
* Added inbuilt `G65` macro `P3` for getting and setting NGC numerical parameters, typical use case will be for indexed access. Ref. [discussion #309 comment](https://github.com/grblHAL/core/discussions/309#discussioncomment-10710468).
39+
* SD card \(macros\): added inbuilt `G65` macro `P3` for getting and setting NGC numerical parameters, typical use case will be for indexed access. Ref. [discussion #309 comment](https://github.com/grblHAL/core/discussions/309#discussioncomment-10710468).
1640

1741
---
1842

config.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,14 @@ Default value is 0, meaning spindle sync is disabled
11151115
#endif
11161116
///@}
11171117

1118+
/*! @name $395 - Setting_SpindleType
1119+
*/
1120+
///@{
1121+
#if !defined DEFAULT_SPINDLE || defined __DOXYGEN__
1122+
#define DEFAULT_SPINDLE SPINDLE_PWM0 // Spindle number from spindle_control.h
1123+
#endif
1124+
///@}
1125+
11181126
// Closed loop spindle settings (Group_Spindle_ClosedLoop)
11191127

11201128
// $9 - Setting_SpindlePWMOptions

driver_opts.h

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -225,40 +225,38 @@
225225
#endif
226226
#endif
227227

228-
// TODO: remove?
229-
#ifndef VFD_SPINDLE
230-
#if VFD_ENABLE
231-
#define VFD_SPINDLE 1
232-
#else
233-
#define VFD_SPINDLE 0
234-
#endif
235-
#endif
236-
237228
#ifndef SPINDLE0_ENABLE
238-
#if VFD_ENABLE
239-
#define SPINDLE0_ENABLE VFD_ENABLE
240-
#if N_SPINDLE > 1 && !defined(SPINDLE1_ENABLE)
241-
#define SPINDLE1_ENABLE SPINDLE_PWM0
242-
#endif
243-
#else
244-
#define SPINDLE0_ENABLE SPINDLE_PWM0
245-
#endif
229+
#define SPINDLE0_ENABLE SPINDLE_PWM0
246230
#endif
247231

248232
#ifndef SPINDLE1_ENABLE
249233
#define SPINDLE1_ENABLE 0
234+
#elif SPINDLE1_ENABLE == -1 || SPINDLE1_ENABLE == SPINDLE_ALL || SPINDLE1_ENABLE == SPINDLE_ALL_VFD
235+
#warning "SPINDLE1_ENABLE cannot be set to -1, SPINDLE_ALL or SPINDLE_ALL_VFD"
236+
#undef SPINDLE1_ENABLE
237+
#define SPINDLE1_ENABLE 0
250238
#endif
251239

252240
#ifndef SPINDLE2_ENABLE
253241
#define SPINDLE2_ENABLE 0
242+
#elif SPINDLE2_ENABLE == -1 || SPINDLE2_ENABLE == SPINDLE_ALL || SPINDLE2_ENABLE == SPINDLE_ALL_VFD
243+
#warning "SPINDLE2_ENABLE cannot be set to -1, SPINDLE_ALL or SPINDLE_ALL_VFD"
244+
#undef SPINDLE2_ENABLE
245+
#define SPINDLE2_ENABLE 0
254246
#endif
255247

256248
#ifndef SPINDLE3_ENABLE
257249
#define SPINDLE3_ENABLE 0
250+
#elif SPINDLE3_ENABLE == -1 || SPINDLE3_ENABLE == SPINDLE_ALL || SPINDLE3_ENABLE == SPINDLE_ALL_VFD
251+
#warning "SPINDLE3_ENABLE cannot be set to -1, SPINDLE_ALL or SPINDLE_ALL_VFD"
252+
#undef SPINDLE1_ENABLE
253+
#define SPINDLE1_ENABLE 0
258254
#endif
259255

260-
#if SPINDLE0_ENABLE == SPINDLE_ALL
261-
#define SPINDLE_ENABLE SPINDLE_ALL
256+
#if SPINDLE0_ENABLE == -1 || SPINDLE0_ENABLE == SPINDLE_ALL
257+
#define SPINDLE_ENABLE (SPINDLE_ALL|(1<<SPINDLE1_ENABLE)|(1<<SPINDLE2_ENABLE)|(1<<SPINDLE3_ENABLE))
258+
#elif SPINDLE0_ENABLE == SPINDLE_ALL_VFD
259+
#define SPINDLE_ENABLE (SPINDLE_ALL_VFD|SPINDLE_ALL|(1<<SPINDLE1_ENABLE)|(1<<SPINDLE2_ENABLE)|(1<<SPINDLE3_ENABLE))
262260
#else
263261
#define SPINDLE_ENABLE ((1<<SPINDLE0_ENABLE)|(1<<SPINDLE1_ENABLE)|(1<<SPINDLE2_ENABLE)|(1<<SPINDLE3_ENABLE))
264262
#endif
@@ -314,7 +312,7 @@
314312
//
315313

316314
#ifndef VFD_ENABLE
317-
#if SPINDLE_ENABLE & ((1<<SPINDLE_HUANYANG1)|(1<<SPINDLE_HUANYANG2)|(1<<SPINDLE_GS20)|(1<<SPINDLE_YL620A)|(1<<SPINDLE_MODVFD)|(1<<SPINDLE_H100)|(1<<SPINDLE_NOWFOREVER))
315+
#if SPINDLE_ENABLE & SPINDLE_ALL_VFD
318316
#define VFD_ENABLE 1
319317
#else
320318
#define VFD_ENABLE 0

errors.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ typedef enum {
113113
Status_FlowControlStackOverflow = 82,
114114
Status_FlowControlOutOfMemory = 83,
115115

116+
Status_Handled, // For internal use only
116117
Status_Unhandled, // For internal use only
117118
Status_StatusMax = Status_Unhandled
118119
} __attribute__ ((__packed__)) status_code_t;

0 commit comments

Comments
 (0)