diff --git a/README.md b/README.md index 9da5e82..683143f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## grblHAL ## -Latest build date is 20250109, see the [changelog](changelog.md) for details. +Latest build date is 20250110, see the [changelog](changelog.md) for details. > [!NOTE] > A settings reset will be performed on an update of builds prior to 20241208. Backup and restore of settings is recommended. diff --git a/changelog.md b/changelog.md index a87b551..400af13 100644 --- a/changelog.md +++ b/changelog.md @@ -1,9 +1,12 @@ ## grblHAL changelog -20250110 +Build 20250110 Core: +* Delayed execution of startup scripts `$N0` and `$N1` till after any startup tasks has completed. +E.g. this allows for auto mounting the SD card before any `G65` macro calls in such scripts are run. + * Non-functional changes: some configuration warnings suppressed in Web Builder builds, delta kinematics updated to not use deprecated functionality. Drivers: @@ -14,6 +17,8 @@ Plugins: * SD card, YModem protocol: changed to use local input buffer due to not working when Laserburn cluster plugin was enabled. Ref. [ioSender issue #443](https://github.com/terjeio/ioSender/issues/433). +* SD card, FS macros: fixed regression causing tool change macros to fail. Ref. issue [#7](https://github.com/grblHAL/Plugin_SD_card/issues/7). + --- Build 20250109 @@ -28,7 +33,7 @@ Drivers: * ESP32: added tentative support for Trinamic SPI driver configurations with individual chip select signals. Ref. issue [#133](https://github.com/grblHAL/ESP32/issues/133). -* STM32F4xx: updated LongBoard32 definitions to use explicit auxilary pin mappings for keypad macros. Ref. issue [#207](https://github.com/grblHAL/STM32F4xx/issues/207). +* STM32F4xx: updated LongBoard32 definitions to use explicit auxiliary pin mappings for keypad macros. Ref. issue [#207](https://github.com/grblHAL/STM32F4xx/issues/207). Plugins: diff --git a/grbl.h b/grbl.h index e266f43..3b78118 100644 --- a/grbl.h +++ b/grbl.h @@ -42,7 +42,7 @@ #else #define GRBL_VERSION "1.1f" #endif -#define GRBL_BUILD 20250109 +#define GRBL_BUILD 20250110 #define GRBL_URL "https://github.com/grblHAL" diff --git a/protocol.c b/protocol.c index b84ad98..6c27f48 100644 --- a/protocol.c +++ b/protocol.c @@ -196,7 +196,7 @@ bool protocol_main_loop (void) } #endif // All systems go! - system_execute_startup(); // Execute startup script. + protocol_enqueue_foreground_task(system_execute_startup, NULL); // Schedule startup script for execution. } // Ensure spindle and coolant is switched off on a cold start diff --git a/system.c b/system.c index b253af5..77b1b5c 100644 --- a/system.c +++ b/system.c @@ -129,7 +129,7 @@ ISR_CODE void ISR_FUNC(control_interrupt_handler)(control_signals_t signals) /*! \brief Executes user startup scripts, if stored. */ -void system_execute_startup (void) +void system_execute_startup (void *data) { if(hal.nvs.type != NVS_None) { @@ -448,7 +448,7 @@ static status_code_t go_home (sys_state_t state, axes_signals_t axes) grbl.report.feedback_message(Message_None); // Execute startup scripts after successful homing. if (sys.homing.mask && (sys.homing.mask & sys.homed.mask) == sys.homing.mask) - system_execute_startup(); + system_execute_startup(NULL); else if(limits_homing_required()) { // Keep alarm state active if homing is required and not all axes homed. sys.alarm = Alarm_HomingRequired; state_set(STATE_ALARM); diff --git a/system.h b/system.h index 24a5ef6..ca22791 100644 --- a/system.h +++ b/system.h @@ -366,7 +366,7 @@ typedef struct sys_commands_str { extern system_t sys; status_code_t system_execute_line (char *line); -void system_execute_startup (void); +void system_execute_startup (void *data); void system_flag_wco_change (void); void system_convert_array_steps_to_mpos (float *position, int32_t *steps); bool system_xy_at_fixture (coord_system_id_t id, float tolerance);