Moved @ G59.3 probing event call earlier in code, added check for X and Y homed.

Minor "bug fix" for real-time report, no longer sends `WCO` and `Ov` elements in the same response.
This commit is contained in:
Terje Io
2021-10-24 18:20:22 +02:00
parent baf5a36698
commit 6fe592cd2c
8 changed files with 30 additions and 17 deletions

View File

@@ -11,7 +11,7 @@ It has been written to complement grblHAL and has features such as proper keyboa
---
Latest build date is 20211019, see the [changelog](changelog.md) for details.
Latest build date is 20211024, see the [changelog](changelog.md) for details.
__NOTE:__ Drivers built with more than three axes configured \(`N_AXIS` > `3`\) will force a settings reset when upgraded. Backup and restore of settings is recommended for these.
---
@@ -80,4 +80,4 @@ List of Supported G-Codes:
Some [plugins](https://github.com/grblHAL/plugins) implements additional M-codes.
---
2021-10-19
2021-10-24

View File

@@ -1,5 +1,20 @@
## grblHAL changelog
Build 2021024:
Core:
* Moved @ G59.3 probing event call earlier in code, added check for X and Y homed.
* Minor "bug fix" for real-time report, no longer sends `WCO` and `Ov` elements in the same response.
Plugins:
* A bit of cleanup in the websocket protocol code.
* Fixed some miscopied lines in the Trinamic driver from a manual merge of [PR#3](https://github.com/grblHAL/Plugins_motor/pull/3).
Drivers:
* Added map file for [GRBLHAL2000](https://github.com/Expatria-Technologies/grblhal_2000_PrintNC) board to iMRXT1062 driver \(Teensy 4.1\) From [PR#23](https://github.com/grblHAL/iMXRT1062/pull/23) by @andrewmarles
---
Build 2021019:
Core:

2
grbl.h
View File

@@ -34,7 +34,7 @@
#else
#define GRBL_VERSION "1.1f"
#endif
#define GRBL_VERSION_BUILD "20211019"
#define GRBL_VERSION_BUILD "20211024"
// The following symbols are set here if not already set by the compiler or in config.h
// Do NOT change here!

View File

@@ -866,6 +866,13 @@ gc_probe_t mc_probe_cycle (float *target, plan_line_data_t *pl_data, gc_parser_f
sys.flags.probe_succeeded = Off; // Re-initialize probe history before beginning cycle.
hal.probe.configure(parser_flags.probe_is_away, true);
#if COMPATIBILITY_LEVEL <= 1
bool at_g59_3 = false, probe_fixture = grbl.on_probe_fixture != NULL && state_get() != STATE_TOOL_CHANGE && (sys.homed.mask & (X_AXIS_BIT|Y_AXIS_BIT));
if(probe_fixture)
grbl.on_probe_fixture(NULL, at_g59_3 = system_xy_at_fixture(CoordinateSystem_G59_3, TOOLSETTER_RADIUS), true);
#endif
// After syncing, check if probe is already triggered or not connected. If so, halt and issue alarm.
// NOTE: This probe initialization error applies to all probing cycles.
probe_state_t probe = hal.probe.get_state();
@@ -883,13 +890,6 @@ gc_probe_t mc_probe_cycle (float *target, plan_line_data_t *pl_data, gc_parser_f
// Activate the probing state monitor in the stepper module.
sys.probing_state = Probing_Active;
#if COMPATIBILITY_LEVEL <= 1
bool at_g59_3 = false, probe_fixture = grbl.on_probe_fixture != NULL && state_get() != STATE_TOOL_CHANGE;
if(probe_fixture)
grbl.on_probe_fixture(NULL, at_g59_3 = system_xy_at_fixture(CoordinateSystem_G59_3, TOOLSETTER_RADIUS), true);
#endif
// Perform probing cycle. Wait here until probe is triggered or motion completes.
system_set_exec_state_flag(EXEC_CYCLE_START);
do {

View File

@@ -57,7 +57,7 @@
#endif
#endif
#ifdef __MSP430F5529__
#if defined(__MSP430F5529__) || defined(__MSP432P401R__) || defined(__MSP432E401Y__) || defined(PART_TM4C123GH6PM) || defined(PART_TM4C1294NCPDT)
#define isnanf(x) __isnanf(x)
#define isinff(x) __isinff(x)
#endif

View File

@@ -160,7 +160,7 @@ bool protocol_main_loop (void)
while(true) {
// Process one line of incoming stream data, as the data becomes available. Performs an
// initial filtering by removing spaces and comments and capitalizing all letters.
// initial filtering by removing leading spaces and control characters.
while((c = hal.stream.read()) != SERIAL_NO_DATA) {
if(c == ASCII_CAN) {

View File

@@ -1249,8 +1249,7 @@ void report_realtime_status (void)
if (override_counter > 0 && !sys.report.overrides)
override_counter--;
else {
sys.report.overrides = On;
else if((sys.report.overrides = !sys.report.wco)) {
sys.report.spindle = sys.report.spindle || hal.spindle.get_state().on;
sys.report.coolant = sys.report.coolant || hal.coolant.get_state().value != 0;
override_counter = state_get() & (STATE_HOMING|STATE_CYCLE|STATE_HOLD|STATE_JOG|STATE_SAFETY_DOOR)

View File

@@ -240,10 +240,9 @@ PROGMEM static const sys_command_t sys_commands[] = {
void system_command_help (void)
{
hal.stream.write("$I - output system information" ASCII_EOL);
hal.stream.write("$I+ - output extended system information" ASCII_EOL);
hal.stream.write("$<n> - output setting <n> value" ASCII_EOL);
hal.stream.write("$<n>=<value> - assign <value> to settings <n>" ASCII_EOL);
hal.stream.write("$I - output system information" ASCII_EOL);
hal.stream.write("$I+ - output extended system information" ASCII_EOL);
hal.stream.write("$$ - output all setting values" ASCII_EOL);
hal.stream.write("$+ - output all setting values" ASCII_EOL);
hal.stream.write("$$=<n> - output setting details for setting <n>" ASCII_EOL);
@@ -259,7 +258,7 @@ void system_command_help (void)
hal.stream.write("$SLP - enter sleep mode" ASCII_EOL);
hal.stream.write("$HELP - output help topics" ASCII_EOL);
hal.stream.write("$HELP <topic> - output help for <topic>" ASCII_EOL);
hal.stream.write("$RST=* - restore/reset all" ASCII_EOL);
hal.stream.write("$RST=* - restore/reset all settings" ASCII_EOL);
hal.stream.write("$RST=$ - restore default settings" ASCII_EOL);
if(settings_get_details()->on_get_settings)
hal.stream.write("$RST=& - restore driver and plugin default settings" ASCII_EOL);