Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
Some minor bug fixes
Browse files Browse the repository at this point in the history
Added missing G43 & G49 codes to parser state report $G.
Fix for missing report of backlash settings, issue #47.
  • Loading branch information
terjeio committed May 21, 2020
1 parent 7e4ee4e commit 73604aa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions grbl/report.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,14 @@ void report_gcode_modes (void)

#if COMPATIBILITY_LEVEL < 10

if(gc_state.modal.tool_offset_mode == ToolLengthOffset_Cancel)
hal.stream.write(" G49");
else {
hal.stream.write(" G43");
if(gc_state.modal.tool_offset_mode != ToolLengthOffset_Enable)
hal.stream.write(gc_state.modal.tool_offset_mode == ToolLengthOffset_EnableDynamic ? ".1" : ".2");
}

hal.stream.write(gc_state.canned.retract_mode == CCRetractMode_RPos ? " G99" : " G98");

hal.stream.write(gc_state.modal.scaling_active ? " G51" : " G50");
Expand Down
6 changes: 5 additions & 1 deletion grbl/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
settings.h - eeprom configuration handling
Part of Grbl
Copyright (c) 2017-2019 Terje Io
Copyright (c) 2017-2020 Terje Io
Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC
Copyright (c) 2009-2011 Simen Svale Skogsrud
Expand Down Expand Up @@ -78,7 +78,11 @@ typedef enum {
#define N_COORDINATE_SYSTEMS (SettingIndex_NCoord - 3) // Number of supported work coordinate systems (from index 1)

// Define Grbl axis settings numbering scheme. Starts at Setting_AxisSettingsBase, every INCREMENT, over N_SETTINGS.
#ifdef ENABLE_BACKLASH_COMPENSATION
#define AXIS_N_SETTINGS 6
#else
#define AXIS_N_SETTINGS 4
#endif
#define AXIS_SETTINGS_INCREMENT 10 // Must be greater than the number of axis settings TODO: change to 100 to allow for a logical wider range of parameters?

typedef enum {
Expand Down

0 comments on commit 73604aa

Please sign in to comment.