mirror of
https://github.com/grblHAL/core.git
synced 2026-02-06 00:52:35 +08:00
Delayed calling hal.driver_reset until alarm and abort state has been established.
This commit is contained in:
18
changelog.md
18
changelog.md
@@ -1,5 +1,21 @@
|
||||
## grblHAL changelog
|
||||
|
||||
20220616:
|
||||
|
||||
Core:
|
||||
|
||||
* Delayed calling `hal.driver_reset` until alarm and abort states has been established.
|
||||
|
||||
Drivers:
|
||||
|
||||
* STM32F4xx : Fix for [issue #77](https://github.com/grblHAL/STM32F4xx/issues/77) - serial port clock selection.
|
||||
|
||||
Plugins:
|
||||
|
||||
* Spindle plugin: Fix for [issue #9](https://github.com/grblHAL/plugins/issues/9) - VFD spindle not stopped on STOP command.
|
||||
|
||||
---
|
||||
|
||||
20220612:
|
||||
|
||||
Core:
|
||||
@@ -20,6 +36,8 @@ Drivers:
|
||||
|
||||
* ESP32 : Added missing file \(corexy.c\) to filelist, fixed incorrect URL in readme.
|
||||
|
||||
---
|
||||
|
||||
20220416:
|
||||
|
||||
Drivers:
|
||||
|
||||
2
grbl.h
2
grbl.h
@@ -34,7 +34,7 @@
|
||||
#else
|
||||
#define GRBL_VERSION "1.1f"
|
||||
#endif
|
||||
#define GRBL_BUILD 20220612
|
||||
#define GRBL_BUILD 20220616
|
||||
|
||||
// The following symbols are set here if not already set by the compiler or in config.h
|
||||
// Do NOT change here!
|
||||
|
||||
11
protocol.c
11
protocol.c
@@ -412,8 +412,6 @@ bool protocol_exec_rt_system (void)
|
||||
killed = true;
|
||||
hal.spindle.set_state((spindle_state_t){0}, 0.0f);
|
||||
hal.coolant.set_state((coolant_state_t){0});
|
||||
// Tell driver/plugins about reset.
|
||||
hal.driver_reset();
|
||||
}
|
||||
|
||||
// System alarm. Everything has shutdown by something that has gone severely wrong. Report
|
||||
@@ -421,6 +419,9 @@ bool protocol_exec_rt_system (void)
|
||||
// loop until system reset/abort.
|
||||
system_raise_alarm((alarm_code_t)rt_exec);
|
||||
|
||||
if(killed) // Tell driver/plugins about reset.
|
||||
hal.driver_reset();
|
||||
|
||||
// Halt everything upon a critical event flag. Currently hard and soft limits flag this.
|
||||
if ((alarm_code_t)rt_exec == Alarm_HardLimit ||
|
||||
(alarm_code_t)rt_exec == Alarm_SoftLimit ||
|
||||
@@ -463,12 +464,11 @@ bool protocol_exec_rt_system (void)
|
||||
|
||||
// Execute system abort.
|
||||
if (rt_exec & EXEC_RESET) {
|
||||
|
||||
if(!killed) {
|
||||
// Kill spindle and coolant.
|
||||
hal.spindle.set_state((spindle_state_t){0}, 0.0f);
|
||||
hal.coolant.set_state((coolant_state_t){0});
|
||||
// Tell driver/plugins about reset.
|
||||
hal.driver_reset();
|
||||
}
|
||||
|
||||
// Only place sys.abort is set true, when E-stop is not asserted.
|
||||
@@ -483,6 +483,9 @@ bool protocol_exec_rt_system (void)
|
||||
grbl.report.feedback_message(Message_MotorFault);
|
||||
}
|
||||
|
||||
if(!killed) // Tell driver/plugins about reset.
|
||||
hal.driver_reset();
|
||||
|
||||
return !sys.abort; // Nothing else to do but exit.
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user