diff --git a/README.md b/README.md
index 301a122..ca63ff4 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ It has been written to complement grblHAL and has features such as proper keyboa
---
-Latest build date is 20240817, see the [changelog](changelog.md) for details.
+Latest build date is 20240903, see the [changelog](changelog.md) for details.
__NOTE:__ Build 20240222 has moved the probe input to the ioPorts pool of inputs and will be allocated from it when configured.
The change is major and _potentially dangerous_, it may damage your probe, so please _verify correct operation_ after installing this, or later, builds.
diff --git a/changelog.md b/changelog.md
index 515b4dc..5e5529e 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,51 @@
## grblHAL changelog
+Build 20240903
+
+Core:
+
+* Added some new plugin init calls and setting ids. Added defaults for RGB strip lengths.
+
+Drivers:
+
+* ESP32, RP2040, STM32F4xx, STM32F7xx: updated for core changes related to the RGB HAL.
+
+* RP2040: renamed bluetooth files to avoid conflict with SDK.
+
+* STM32F7xx: moved board maps to separate directory.
+
+Plugins:
+
+* SD card: removed superfluous code. Made _.macro_ file type visible by default. Ref. [ioSender issue #403](https://github.com/terjeio/ioSender/issues/403).
+
+* Misc: initial commit of [new plugins](https://github.com/grblHAL/Plugins_misc), some moved from [Templates](https://github.com/grblHAL/Templates/tree/master/my_plugin).
+
+* WebUI: now delays soft reset commands for ESP32 driver to avoid crash when more than 3 axes are enabled. Ref. [issue #15](https://github.com/grblHAL/Plugin_WebUI/issues/15)
+
+---
+
+Build 20240827
+
+Core:
+
+* Added setting definitions for plugins and some new plugin initialization calls.
+
+Drivers:
+
+* ESP32: changed spindle on signal to GPIO32 when On/Off spindle is configured for MKS DLC32 board. Ref. this [discussion](https://github.com/grblHAL/core/discussions/203#discussioncomment-10454788).
+
+* RP2040: fixed build issues when native Bluetooth is enabled. Ref. [issue #94](https://github.com/grblHAL/RP2040/issues/94).
+
+Plugins:
+
+* Spindle: added "Offset" plugin for spindle \(laser\) movement to be executed when switching between spindles.
+
+* WebUI: workaround for [issue #15](https://github.com/grblHAL/Plugin_WebUI/issues/15), ESP32 crash on soft reset when > 3 axes configured.
+
+* Miscellaneous: added a number of smallish plugins; BLTouch, PWM servo, EventOut, RGB LED strips, RGB LED M150. These are work in progress and requires specific driver configurations.
+
+---
+
Build 20240817
Core:
diff --git a/config.h b/config.h
index dc53aa7..c088d29 100644
--- a/config.h
+++ b/config.h
@@ -1793,6 +1793,24 @@ Timezone offset from UTC in hours, allowed range is -12.0 - 12.0.
#endif
///@}
+/*! @name $536 - Setting_RGB_StripLengt0
+Number of LEDs in NeoPixel/WS2812 strip 1.
+*/
+///@{
+#if !defined DEFAULT_RGB_STRIP0_LENGTH || defined __DOXYGEN__
+#define DEFAULT_RGB_STRIP0_LENGTH 0
+#endif
+///@}
+
+/*! @name $537 - Setting_RGB_StripLengt1
+Number of LEDs in NeoPixel/WS2812 strip 2.
+*/
+///@{
+#if !defined DEFAULT_RGB_STRIP1_LENGTH || defined __DOXYGEN__
+#define DEFAULT_RGB_STRIP1_LENGTH 0
+#endif
+///@}
+
/*! @name $538 - Setting_RotaryWrap
Enable fast return to G28 position for rotary axes by \ref axismask.
Use:
diff --git a/gcode.h b/gcode.h
index faff728..4fba815 100644
--- a/gcode.h
+++ b/gcode.h
@@ -360,6 +360,26 @@ typedef union {
#endif
#ifdef V_AXIS
float v;
+#endif
+ };
+ struct {
+ float m0;
+ float m1;
+ float m2;
+#if N_AXIS > 3
+ float m3;
+#endif
+#if N_AXIS > 4
+ float m4;
+#endif
+#if N_AXIS > 5
+ float m5;
+#endif
+#if N_AXIS > 6
+ float m6;
+#endif
+#if N_AXIS == 8
+ float m7;
#endif
};
} coord_data_t;
diff --git a/grbl.h b/grbl.h
index 6879333..87ab84a 100644
--- a/grbl.h
+++ b/grbl.h
@@ -42,7 +42,7 @@
#else
#define GRBL_VERSION "1.1f"
#endif
-#define GRBL_BUILD 20240817
+#define GRBL_BUILD 20240903
#define GRBL_URL "https://github.com/grblHAL"
diff --git a/nuts_bolts.c b/nuts_bolts.c
index a81195c..d32ce75 100644
--- a/nuts_bolts.c
+++ b/nuts_bolts.c
@@ -319,7 +319,7 @@ bool delay_sec (float seconds, delaymode_t mode)
while(--i && ok) {
if(mode == DelayMode_Dwell)
ok = protocol_execute_realtime();
- else // DelayMode_SysSuspende, xecute rt_system() only to avoid nesting suspend loops.
+ else // DelayMode_SysSuspend, execute rt_system() only to avoid nesting suspend loops.
ok = protocol_exec_rt_system() && !state_door_reopened(); // Bail, if safety door reopens.
if(ok)
hal.delay_ms(DWELL_TIME_STEP, NULL); // Delay DWELL_TIME_STEP increment
diff --git a/plugins_init.h b/plugins_init.h
index c41ef9e..8521056 100644
--- a/plugins_init.h
+++ b/plugins_init.h
@@ -118,12 +118,21 @@
embroidery_init();
#endif
+#if RGB_LED_ENABLE
+ extern void rgb_led_init (void);
+ rgb_led_init();
+#endif
+
extern void my_plugin_init (void);
my_plugin_init();
#if N_SPINDLE > 1
extern void spindle_select_init(void);
spindle_select_init();
+ #if SPINDLE_OFFSET == 1
+ extern void spindle_offset_init (void);
+ spindle_offset_init();
+ #endif
#endif
// Third party plugin definitions.
@@ -166,6 +175,11 @@
panel_init();
#endif
+#if EVENTOUT_ENABLE
+ extern void event_out_init (void);
+ event_out_init();
+#endif
+
// End third party plugin definitions.
#if ODOMETER_ENABLE
diff --git a/settings.c b/settings.c
index 4bcae74..6d843b5 100644
--- a/settings.c
+++ b/settings.c
@@ -308,7 +308,10 @@ PROGMEM const settings_t defaults = {
.safety_door.flags.ignore_when_idle = DEFAULT_DOOR_IGNORE_WHEN_IDLE,
.safety_door.flags.keep_coolant_on = DEFAULT_DOOR_KEEP_COOLANT_ON,
.safety_door.spindle_on_delay = DEFAULT_SAFETY_DOOR_SPINDLE_DELAY,
- .safety_door.coolant_on_delay = DEFAULT_SAFETY_DOOR_COOLANT_DELAY
+ .safety_door.coolant_on_delay = DEFAULT_SAFETY_DOOR_COOLANT_DELAY,
+
+ .rgb_strip0_length = DEFAULT_RGB_STRIP0_LENGTH,
+ .rgb_strip1_length = DEFAULT_RGB_STRIP1_LENGTH
};
static bool group_is_available (const setting_group_detail_t *group)
@@ -1461,7 +1464,11 @@ inline static setting_id_t normalize_id (setting_id_t id)
id = (setting_id_t)(Setting_EncoderSettingsBase + (id % ENCODER_SETTINGS_INCREMENT));
else if(id > Setting_ModbusTCPBase && id <= Setting_ModbusTCPMax)
id = (setting_id_t)(Setting_ModbusTCPBase + (id % MODBUS_TCP_SETTINGS_INCREMENT));
- else if((id > Setting_Macro0 && id <= Setting_Macro9) || (id > Setting_MacroPort0 && id <= Setting_MacroPort9) || (id > Setting_ButtonAction0 && id <= Setting_ButtonAction9))
+ else if((id > Setting_Macro0 && id <= Setting_Macro9) ||
+ (id > Setting_MacroPort0 && id <= Setting_MacroPort9) ||
+ (id > Setting_ButtonAction0 && id <= Setting_ButtonAction9) ||
+ (id > Setting_Action0 && id <= Setting_Action9) ||
+ (id > Setting_ActionPort0 && id <= Setting_ActionPort9))
id = (setting_id_t)(id - (id % 10));
return id;
@@ -2315,11 +2322,16 @@ void settings_restore (settings_restore_t restore)
settings_write_build_info(BUILD_INFO);
}
+ if(restore.defaults && hal.settings_changed)
+ hal.settings_changed(&settings, (settings_changed_flags_t){-1});
+
setting_details_t *details = setting_details.next;
if(details) do {
if(details->restore)
details->restore();
+ if(details->on_changed)
+ details->on_changed(&settings, restore.defaults ? (settings_changed_flags_t){-1} : (settings_changed_flags_t){0});
} while((details = details->next));
nvs_buffer_sync_physical();
diff --git a/settings.h b/settings.h
index 8f67ad6..6efdd0b 100644
--- a/settings.h
+++ b/settings.h
@@ -459,17 +459,53 @@ typedef enum {
Setting_PWMOffValue1 = 734,
Setting_PWMMinValue1 = 735,
Setting_PWMMaxValue1 = 736,
+
// Optional driver implemented settings for piecewise linear spindle PWM algorithm
Setting_LinearSpindle1Piece1 = 737,
Setting_LinearSpindle1Piece2 = 738,
Setting_LinearSpindle1Piece3 = 739,
Setting_LinearSpindle1Piece4 = 740,
+
+ Setting_Action0 = 750,
+ Setting_ActionBase = Setting_Action0,
+ Setting_Action1 = 751,
+ Setting_Action2 = 752,
+ Setting_Action3 = 753,
+ Setting_Action4 = 754,
+ Setting_Action5 = 755,
+ Setting_Action6 = 756,
+ Setting_Action7 = 757,
+ Setting_Action8 = 758,
+ Setting_Action9 = 759,
+
+ Setting_ActionPort0 = 760,
+ Setting_ActionPortBase = Setting_ActionPort0,
+ Setting_ActionPort1 = 761,
+ Setting_ActionPort2 = 762,
+ Setting_ActionPort3 = 763,
+ Setting_ActionPort4 = 764,
+ Setting_ActionPort5 = 765,
+ Setting_ActionPort6 = 766,
+ Setting_ActionPort7 = 767,
+ Setting_ActionPort8 = 768,
+ Setting_ActionPort9 = 769,
+
+ Setting_SpindleOffsetX = 770,
+ Setting_SpindleOffsetY = 771,
+//
+// 772-779 - reserved for spindle offset settings
+//
+
//
// 900-999 - reserved for automatic tool changers (ATC)
//
+
+// ---
Setting_SettingsMax,
Setting_SettingsAll = Setting_SettingsMax,
+// ---
+
// Calculated base values for core stepper settings
Setting_AxisStepsPerMM = Setting_AxisSettingsBase,
Setting_AxisMaxRate = Setting_AxisSettingsBase + AXIS_SETTINGS_INCREMENT,