Skip to content

Commit

Permalink
Delayed execution of startup scripts $N0 and $N1 till after any start…
Browse files Browse the repository at this point in the history
…up tasks has completed.
terjeio committed Jan 10, 2025
1 parent aed6f71 commit 6cbbc63
Showing 6 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 7 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## grblHAL changelog

<a name="20250110">20250110
<a name="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).

---

<a name="20250109">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:

2 changes: 1 addition & 1 deletion grbl.h
Original file line number Diff line number Diff line change
@@ -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"

2 changes: 1 addition & 1 deletion protocol.c
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions system.c
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 1 addition & 1 deletion system.h
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 6cbbc63

Please sign in to comment.