From 3a7a65ea7c3312987cd7b4e7b9552e63e4639fb9 Mon Sep 17 00:00:00 2001 From: Terje Io Date: Thu, 25 Apr 2024 20:49:03 +0200 Subject: [PATCH] Now reports WCO along with radius/diameter mode changes. Ref. issue #500. --- changelog.md | 18 ++++++++++++++++++ gcode.c | 2 -- grbl.h | 2 +- system.c | 26 ++++++++++++++++++++------ 4 files changed, 39 insertions(+), 9 deletions(-) diff --git a/changelog.md b/changelog.md index dc23abf..dc45c8b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,23 @@ ## grblHAL changelog +Build 20240425 + +Core: + +* Now reports WCO along with radius/diameter mode changes. Ref. issue [#500](https://github.com/grblHAL/core/issues/500). + +Drivers: + +STM32F1xx: + +* Fix for broken handling of control signals for RC variant processors. Ref. issue [#51](https://github.com/grblHAL/STM32F1xx/issues/51) and discussion [#499](https://github.com/grblHAL/core/discussions/499). + +Plugins: + +* File system macros: added inbuilt `G65P1Q` macro for reading numeric setting value. `` is setting number. Ref. issue [#493](https://github.com/grblHAL/core/issues/493). + +--- + Build 20240420 Core: diff --git a/gcode.c b/gcode.c index 75c6ac8..9179ba7 100644 --- a/gcode.c +++ b/gcode.c @@ -3355,10 +3355,8 @@ status_code_t gc_execute_block (char *block) case NonModal_MacroCall: { -#if NGC_EXPRESSIONS_ENABLE ngc_named_param_set("_value", 0.0f); ngc_named_param_set("_value_returned", 0.0f); -#endif status_code_t status = grbl.on_macro_execute((macro_id_t)gc_block.values.p); return status == Status_Unhandled ? Status_GcodeValueOutOfRange : status; diff --git a/grbl.h b/grbl.h index 4c6cef5..0d32a04 100644 --- a/grbl.h +++ b/grbl.h @@ -42,7 +42,7 @@ #else #define GRBL_VERSION "1.1f" #endif -#define GRBL_BUILD 20240420 +#define GRBL_BUILD 20240425 #define GRBL_URL "https://github.com/grblHAL" diff --git a/system.c b/system.c index 220126b..d56e13e 100644 --- a/system.c +++ b/system.c @@ -1221,12 +1221,26 @@ Fires the \ref grbl.on_rt_reports_added event. */ void system_add_rt_report (report_tracking_t report) { - if(report == Report_ClearAll) - sys.report.value = 0; - else if(report == Report_MPGMode) - sys.report.mpg_mode = hal.driver_cap.mpg_mode; - else - sys.report.value |= (uint32_t)report; + switch(report) { + + case Report_ClearAll: + sys.report.value = 0; + return; + + case Report_MPGMode: + if(!hal.driver_cap.mpg_mode) + return; + break; + + case Report_LatheXMode: + sys.report.wco = settings.status_report.work_coord_offset; + break; + + default: + break; + } + + sys.report.value |= (uint32_t)report; if(sys.report.value && grbl.on_rt_reports_added) grbl.on_rt_reports_added((report_tracking_flags_t)((uint32_t)report));