Fixed regression that prevented builds with compatibiliy level set > 1.

Added [SIGNALS:xxx] element to the $I output.
This commit is contained in:
Terje Io
2023-12-29 19:33:27 +01:00
parent eb29390238
commit 57243a0fc2
12 changed files with 231 additions and 79 deletions
+29
View File
@@ -1,5 +1,34 @@
## grblHAL changelog
<a name="20231229"/>Build 20231229
Core:
* Fixed regression that prevented builds with compatibiliy level set > 1.
* Added `[SIGNALS:xxx]` element to the `$I` output, `xxx` uses the same letters as the `Pn:`
element in the [real time report](https://github.com/grblHAL/core/wiki/Report-extensions#realtime-report) and list all available from the controller except limits inputs.
Drivers:
* Most: added new configuration options in _my_machine.h_ for assigning optional signals to aux input ports. These are:
1. `SAFETY_DOOR_ENABLE` - bound to aux port in the map file for backwards comaptibility.
2. `MOTOR_FAULT_ENABLE` - bound to aux port in the map file since a single MCU input might be routed to several external inputs.
3. `MOTOR_WARNING_ENABLE` - bound to aux port in the map file since a single MCU input might be routed to several external inputs.
4. `PROBE_DISCONNECT_ENABLE` - assigned from unused ports.
5. `STOP_DISABLE_ENABLE` - assigned from unused ports.
6. `BLOCK_DELETE_ENABLE` - assigned from unused ports.
7. `SINGLE_BLOCK_ENABLE` - assigned from unused ports.
8. `LIMITS_OVERRIDE_ENABLE` - assigned from unused ports. Always active low.
If too many inputs are enabled assignment will fail silently for those who cannot be bound.
__NOTE:__ core functionality for some of these inputs might change after user input!
Tip: use the `$pins` command to output the mapping.
* ESP32: moved board maps and board specific code to separate folder.
---
<a name="20231226"/>20231226
Core:
+11
View File
@@ -177,9 +177,20 @@ the speed is not limited to 115200 baud. An example is native USB streaming.
#define CHECK_MODE_DELAY 0 // ms
#endif
/*! \def DEBOUNCE_DELAY
\brief
When > 0 adds a short delay when an input changes state to avoid switch bounce
or EMI triggering the related interrupt falsely or too many times.
*/
#if !defined DEBOUNCE_DELAY || defined __DOXYGEN__
#define DEBOUNCE_DELAY 40 // ms
#endif
// ---------------------------------------------------------------------------------------
// ADVANCED CONFIGURATION OPTIONS:
#define ENABLE_PATH_BLENDING Off // Do NOT enable unless working on adding this feature!
// Enables code for debugging purposes. Not for general use and always in constant flux.
//#define DEBUG // Uncomment to enable. Default disabled.
//#define DEBUGOUT 0 // Uncomment to claim serial port with given instance number and add HAL entry point for debug output.
+13
View File
@@ -127,3 +127,16 @@ limit_signals_t xbar_get_homing_source_from_cycle (axes_signals_t homing_cycle)
return source;
}
const char *xbar_fn_to_pinname (pin_function_t fn)
{
const char *name = NULL;
uint_fast8_t idx = sizeof(pin_names) / sizeof(pin_name_t);
do {
if(pin_names[--idx].function == fn)
name = pin_names[idx].name;
} while(idx && !name);
return name ? name : "N/A";
}
+1
View File
@@ -503,5 +503,6 @@ void xbar_set_homing_source (void);
limit_signals_t xbar_get_homing_source (void);
limit_signals_t xbar_get_homing_source_from_cycle (axes_signals_t homing_cycle);
axes_signals_t xbar_fn_to_axismask (pin_function_t id);
const char *xbar_fn_to_pinname (pin_function_t id);
#endif
+25
View File
@@ -379,9 +379,32 @@
#endif
#endif
// Optional control signals
#ifndef SAFETY_DOOR_ENABLE
#define SAFETY_DOOR_ENABLE 0
#endif
#ifndef PROBE_DISCONNECT_ENABLE
#define PROBE_DISCONNECT_ENABLE 0
#endif
#ifndef STOP_DISABLE_ENABLE
#define STOP_DISABLE_ENABLE 0
#endif
#ifndef BLOCK_DELETE_ENABLE
#define BLOCK_DELETE_ENABLE 0
#endif
#ifndef SINGLE_BLOCK_ENABLE
#define SINGLE_BLOCK_ENABLE 0
#endif
#ifndef MOTOR_FAULT_ENABLE
#define MOTOR_FAULT_ENABLE 0
#endif
#ifndef MOTOR_WARNING_ENABLE
#define MOTOR_WARNING_ENABLE 0
#endif
#ifndef LIMITS_OVERRIDE_ENABLE
#define LIMITS_OVERRIDE_ENABLE 0
#endif
#if SAFETY_DOOR_ENABLE && defined(NO_SAFETY_DOOR_SUPPORT)
#error "Driver does not support safety door functionality!"
@@ -397,6 +420,8 @@
#warning "Enabling ESTOP may not work with all senders!"
#endif
//
#ifndef WIFI_ENABLE
#define WIFI_ENABLE 0
#endif
+31 -15
View File
@@ -1084,12 +1084,7 @@ status_code_t gc_execute_block (char *block)
}
break;
case 61:
word_bit.modal_group.G13 = On;
if (mantissa != 0) // [G61.1 not supported]
FAIL(Status_GcodeUnsupportedCommand);
break;
/*
#if ENABLE_PATH_BLENDING
case 61:
word_bit.modal_group.G13 = On;
if (mantissa != 0 || mantissa != 10)
@@ -1101,7 +1096,13 @@ status_code_t gc_execute_block (char *block)
word_bit.modal_group.G13 = On;
gc_block.modal.control = ControlMode_PathBlending; // G64
break;
*/
#else
case 61:
word_bit.modal_group.G13 = On;
if (mantissa != 0) // [G61.1 not supported]
FAIL(Status_GcodeUnsupportedCommand);
break;
#endif
case 65: // NOTE: Mach 3/4 GCode
word_bit.modal_group.G0 = On;
@@ -2081,14 +2082,17 @@ status_code_t gc_execute_block (char *block)
}
// [16. Set path control mode ]: N/A. Only G61. G61.1 and G64 NOT SUPPORTED.
/*
if (command_words.G13) { // Check if called in block
#if ENABLE_PATH_BLENDING
if(command_words.G13) { // Check if called in block
if(gc_block.modal.control == ControlMode_PathBlending) {
gc_state.blending_tolerance = gc_block.words.p ? gc_block.values.p : 0.0f;
gc_block.words.p = Off;
}
gc_state.path_tolerance = gc_block.words.p ? gc_block.values.p : 0.0f;
gc_state.cam_tolerance = gc_block.words.q ? gc_block.values.q : 0.0f;
gc_block.words.p = gc_block.words.q = Off;
} else
gc_state.path_tolerance = gc_state.cam_tolerance = 0.0f;
}
*/
#endif
// [17. Set distance mode ]: N/A. Only G91.1. G90.1 NOT SUPPORTED.
// [18. Set retract mode ]: N/A.
@@ -2159,7 +2163,10 @@ status_code_t gc_execute_block (char *block)
} while(idx);
break;
case 1: case 10: case 11:
case 1: case 10:
#if COMPATIBILITY_LEVEL <= 1
case 11:
#endif
if(grbl.tool_table.n_tools) {
if(p_value == 0 || p_value > grbl.tool_table.n_tools)
FAIL(Status_GcodeIllegalToolTableEntry); // [Greater than max allowed tool number]
@@ -2172,8 +2179,10 @@ status_code_t gc_execute_block (char *block)
}
float g59_3_offset[N_AXIS];
#if COMPATIBILITY_LEVEL <= 1
if(gc_block.values.l == 11 && !settings_read_coord_data(CoordinateSystem_G59_3, &g59_3_offset))
FAIL(Status_SettingReadFail);
#endif
if(gc_block.values.l == 1)
grbl.tool_table.read(p_value, &grbl.tool_table.tool[p_value]);
@@ -3258,6 +3267,9 @@ status_code_t gc_execute_block (char *block)
// [16. Set path control mode ]: G61.1/G64 NOT SUPPORTED
// gc_state.modal.control = gc_block.modal.control; // NOTE: Always default.
#if ENABLE_PATH_BLENDING
gc_state.modal.control = gc_block.modal.control;
#endif
// [17. Set distance mode ]:
gc_state.modal.distance_incremental = gc_block.modal.distance_incremental;
@@ -3349,9 +3361,13 @@ status_code_t gc_execute_block (char *block)
gc_state.modal.motion = gc_block.modal.motion;
gc_state.modal.canned_cycle_active = gc_block.modal.canned_cycle_active;
if (gc_state.modal.motion != MotionMode_None && axis_command == AxisCommand_MotionMode) {
if(gc_state.modal.motion != MotionMode_None && axis_command == AxisCommand_MotionMode) {
plan_data.output_commands = output_commands;
#if ENABLE_PATH_BLENDING
plan_data.cam_tolerance = gc_state.cam_tolerance;
plan_data.path_tolerance = gc_state.path_tolerance;
#endif
output_commands = NULL;
pos_update_t gc_update_pos = GCUpdatePos_Target;
+9 -4
View File
@@ -380,8 +380,8 @@ typedef struct {
float ijk[3]; //!< I,J,K Axis arc offsets
float k; //!< G33 distance per revolution
float m; //!< G65 argument.
float p; //!< G10 or dwell parameters
float q; //!< User defined M-code parameter, M67 output value, G83 delta increment
float p; //!< G10, 664 or dwell parameters
float q; //!< User defined M-code parameter, M67 output value, G64 naive CAM tolerance, G83 delta increment
float r; //!< Arc radius or retract position
float s; //!< Spindle speed - single-meaning word
float xyz[N_AXIS]; //!< X,Y,Z (and A,B,C,U,V when enabled) translational axes
@@ -462,7 +462,9 @@ typedef struct {
//< uint8_t cutter_comp; //!< {G40} NOTE: Don't track. Only default supported.
tool_offset_mode_t tool_offset_mode; //!< {G43,G43.1,G49}
coord_system_t coord_system; //!< {G54,G55,G56,G57,G58,G59,G59.1,G59.2,G59.3}
// control_mode_t control; //!< {G61} NOTE: Don't track. Only default supported.
#if ENABLE_PATH_BLENDING
control_mode_t control; //!< {G61} NOTE: Don't track. Only default supported.
#endif
program_flow_t program_flow; //!< {M0,M1,M2,M30,M60}
coolant_state_t coolant; //!< {M7,M8,M9}
spindle_mode_t spindle; //!< {M3,M4,M5 and G96,G97}
@@ -532,7 +534,10 @@ typedef struct {
float feed_rate; //!< Millimeters/min
float distance_per_rev; //!< Millimeters/rev
float position[N_AXIS]; //!< Where the interpreter considers the tool to be at this point in the code
// float blending_tolerance; //!< Motion blending tolerance
#if ENABLE_PATH_BLENDING
float path_tolerance; //!< Path blending tolerance
float cam_tolerance; //!< Naive CAM tolerance
#endif
int32_t line_number; //!< Last line number sent
tool_id_t tool_pending; //!< Tool to be selected on next M6
#if NGC_EXPRESSIONS_ENABLE
+1 -1
View File
@@ -42,7 +42,7 @@
#else
#define GRBL_VERSION "1.1f"
#endif
#define GRBL_BUILD 20231222
#define GRBL_BUILD 20231229
#define GRBL_URL "https://github.com/grblHAL"
+90 -37
View File
@@ -89,14 +89,6 @@
#endif
#endif
#if SAFETY_DOOR_ENABLE && !defined(SAFETY_DOOR_BIT)
#ifdef SAFETY_DOOR_PIN
#define SAFETY_DOOR_BIT (1<<SAFETY_DOOR_PIN)
#else
#define SAFETY_DOOR_BIT 0
#endif
#endif
#ifndef ESTOP_BIT
#ifdef ESTOP_PIN
#define ESTOP_BIT (1<<ESTOP_PIN)
@@ -105,8 +97,43 @@
#endif
#endif
// Optional control signals
#ifndef SAFETY_DOOR_BIT
#if defined(SAFETY_DOOR_PIN) && !SAFETY_DOOR_ENABLE
#define SAFETY_DOOR_BIT (1<<SAFETY_DOOR_PIN)
#else
#define SAFETY_DOOR_BIT 0
#if !defined(SAFETY_DOOR_PIN) && SAFETY_DOOR_ENABLE
#warning "SAFETY_DOOR_PIN is not defined!"
#endif
#endif
#endif
#ifndef MOTOR_FAULT_BIT
#if defined(MOTOR_FAULT_PIN) && !MOTOR_FAULT_ENABLE
#define MOTOR_FAULT_BIT (1<<MOTOR_FAULT_PIN)
#else
#define MOTOR_FAULT_BIT 0
#if !defined(MOTOR_FAULT_PIN) && MOTOR_FAULT_ENABLE
#warning "MOTOR_FAULT_PIN is not defined!"
#endif
#endif
#endif
#ifndef MOTOR_WARNING_BIT
#if defined(MOTOR_WARNING_PIN) && !MOTOR_WARNING_ENABLE
#define MOTOR_WARNING_BIT (1<<MOTOR_WARNING_PIN)
#else
#define MOTOR_WARNING_BIT 0
#if !defined(MOTOR_WARNING_PIN) && MOTOR_WARNING_ENABLE
#warning "MOTOR_WARNING_PIN is not defined!"
#endif
#endif
#endif
#ifndef PROBE_DISCONNECT_BIT
#ifdef PROBE_DISCONNECT_PIN
#if defined(PROBE_DISCONNECT_PIN) && !PROBE_DISCONNECT_ENABLE
#define PROBE_DISCONNECT_BIT (1<<PROBE_DISCONNECT_PIN)
#else
#define PROBE_DISCONNECT_BIT 0
@@ -114,7 +141,7 @@
#endif
#ifndef STOP_DISABLE_BIT
#ifdef STOP_DISABLE_PIN
#if defined(STOP_DISABLE_PIN) && !STOP_DISABLE_ENABLE
#define STOP_DISABLE_BIT (1<<STOP_DISABLE_PIN)
#else
#define STOP_DISABLE_BIT 0
@@ -122,7 +149,7 @@
#endif
#ifndef BLOCK_DELETE_BIT
#ifdef BLOCK_DELETE_PIN
#if defined(BLOCK_DELETE_PIN) && !BLOCK_DELETE_ENABLE
#define BLOCK_DELETE_BIT (1<<BLOCK_DELETE_PIN)
#else
#define BLOCK_DELETE_BIT 0
@@ -130,37 +157,71 @@
#endif
#ifndef SINGLE_BLOCK_BIT
#ifdef SINGLE_BLOCK_PIN
#if defined(SINGLE_BLOCK_PIN) && !SINGLE_BLOCK_ENABLE
#define SINGLE_BLOCK_BIT (1<<SINGLE_BLOCK_PIN)
#else
#define SINGLE_BLOCK_BIT 0
#endif
#endif
#ifndef MOTOR_FAULT_BIT
#ifdef MOTOR_FAULT_PIN
#define MOTOR_FAULT_BIT (1<<MOTOR_FAULT_PIN)
#else
#define MOTOR_FAULT_BIT 0
#endif
#endif
#ifndef MOTOR_WARNING_BIT
#ifdef MOTOR_WARNING_PIN
#define MOTOR_WARNING_BIT (1<<MOTOR_WARNING_PIN)
#else
#define MOTOR_WARNING_BIT 0
#endif
#endif
#ifndef LIMITS_OVERRIDE_BIT
#ifdef LIMITS_OVERRIDE_PIN
#if defined(LIMITS_OVERRIDE_PIN) && !LIMITS_OVERRIDE_ENABLE
#define LIMITS_OVERRIDE_BIT (1<<LIMITS_OVERRIDE_PIN)
#else
#define LIMITS_OVERRIDE_BIT 0
#endif
#endif
#if SAFETY_DOOR_ENABLE || MOTOR_FAULT_ENABLE || MOTOR_WARNING_ENABLE || PROBE_DISCONNECT_ENABLE || \
STOP_DISABLE_ENABLE || BLOCK_DELETE_ENABLE || SINGLE_BLOCK_PIN || LIMITS_OVERRIDE_ENABLE || defined __DOXYGEN__
#define AUX_CONTROLS_ENABLED 1
#if PROBE_DISCONNECT_ENABLE || STOP_DISABLE_ENABLE || BLOCK_DELETE_ENABLE || SINGLE_BLOCK_PIN || LIMITS_OVERRIDE_ENABLE
#define AUX_CONTROLS_SCAN 3 // start index for scanned inputs
#else
#define AUX_CONTROLS_SCAN 0
#endif
typedef enum {
AuxCtrl_SafetyDoor = 0,
AuxCtrl_MotorFault,
AuxCtrl_MotorWarning,
AuxCtrl_ProbeDisconnect,
AuxCtrl_StopDisable,
AuxCtrl_BlockDelete,
AuxCtrl_SingleBlock,
AuxCtrl_LimitsOverride,
AuxCtrl_NumEntries,
} aux_ctrl_signals_t;
typedef struct {
bool enabled;
bool debouncing;
uint8_t port;
pin_irq_mode_t irq_mode;
control_signals_t cap;
pin_function_t function;
} aux_ctrl_t;
static aux_ctrl_t aux_ctrl[] = {
{ .enabled = SAFETY_DOOR_ENABLE, .port = 0xFF, .irq_mode = (pin_irq_mode_t)(IRQ_Mode_Rising|IRQ_Mode_Falling), .cap = { .safety_door_ajar = On }, .function = Input_SafetyDoor },
{ .enabled = MOTOR_FAULT_ENABLE, .port = 0xFF, .irq_mode = (pin_irq_mode_t)(IRQ_Mode_Rising|IRQ_Mode_Falling), .cap = { .motor_fault = On }, .function = Input_MotorFault },
{ .enabled = MOTOR_WARNING_ENABLE, .port = 0xFF, .irq_mode = (pin_irq_mode_t)(IRQ_Mode_Rising|IRQ_Mode_Falling), .cap = { .motor_warning = On }, .function = Input_MotorWarning },
{ .enabled = PROBE_DISCONNECT_ENABLE, .port = 0xFF, .irq_mode = (pin_irq_mode_t)(IRQ_Mode_Rising|IRQ_Mode_Falling), .cap = { .motor_fault = On }, .function = Input_ProbeDisconnect },
{ .enabled = STOP_DISABLE_ENABLE, .port = 0xFF, .irq_mode = IRQ_Mode_None, .cap = { .stop_disable = On }, .function = Input_StopDisable },
{ .enabled = BLOCK_DELETE_ENABLE, .port = 0xFF, .irq_mode = IRQ_Mode_None, .cap = { .block_delete = On }, .function = Input_BlockDelete },
{ .enabled = SINGLE_BLOCK_ENABLE, .port = 0xFF, .irq_mode = IRQ_Mode_None, .cap = { .single_block = On }, .function = Input_SingleBlock },
{ .enabled = LIMITS_OVERRIDE_ENABLE, .port = 0xFF, .irq_mode = IRQ_Mode_None, .cap = { .limits_override = On }, .function = Input_LimitsOverride }
};
#else
#define AUX_CONTROLS_ENABLED 0
#define AUX_CONTROLS_SCAN 0
#endif
//
#ifndef CONTROL_MASK
#if SAFETY_DOOR_ENABLE
#define CONTROL_MASK (RESET_BIT|FEED_HOLD_BIT|CYCLE_START_BIT|ESTOP_BIT|PROBE_DISCONNECT_BIT|STOP_DISABLE_BIT|BLOCK_DELETE_BIT|SINGLE_BLOCK_BIT|MOTOR_FAULT_BIT|MOTOR_WARNING_BIT|LIMITS_OVERRIDE_BIT|SAFETY_DOOR_BIT)
@@ -199,14 +260,6 @@
// IRQ enabled input singnals
#if SAFETY_DOOR_ENABLE
#ifndef SAFETY_DOOR_BIT
#define SAFETY_DOOR_BIT (1<<SAFETY_DOOR_PIN)
#endif
#else
#define SAFETY_DOOR_BIT 0
#endif
#ifndef MPG_MODE_PIN
#define MPG_MODE_BIT 0
#elif !defined(MPG_MODE_BIT)
+4 -1
View File
@@ -87,7 +87,10 @@ typedef struct {
#ifdef KINEMATICS_API
float rate_multiplier; // Feed rate multiplier.
#endif
// float blending_tolerance; // Motion blending tolerance
#if ENABLE_PATH_BLENDING
float path_tolerance; //!< Path blending tolerance.
float cam_tolerance; //!< Naive CAM tolerance.
#endif
spindle_t spindle; // Desired spindle parameters, such as RPM, through line motion.
planner_cond_t condition; // Bitfield variable to indicate planner conditions. See defines above.
gc_override_flags_t overrides; // Block bitfield variable for overrides
+10 -18
View File
@@ -175,7 +175,7 @@ inline static char *axis_signals_tostring (char *buf, axes_signals_t signals)
// Convert control signals bits to string representation.
// NOTE: returns pointer to null terminator!
inline static char *control_signals_tostring (char *buf, control_signals_t signals)
inline static char *control_signals_tostring (char *buf, control_signals_t signals, bool all)
{
static const char signals_map[] = "RHSDLTE FM P ";
@@ -200,7 +200,7 @@ inline static char *control_signals_tostring (char *buf, control_signals_t signa
break;
case 'L':
if(sys.flags.block_delete_enabled)
if(all || sys.flags.block_delete_enabled)
*buf++ = *map;
break;
@@ -976,6 +976,11 @@ void report_build_info (char *line, bool extended)
grbl.on_report_options(true);
hal.stream.write("]" ASCII_EOL);
hal.stream.write("[SIGNALS:");
control_signals_tostring(buf, hal.signals_cap, true);
hal.stream.write(buf);
hal.stream.write("]" ASCII_EOL);
hal.stream.write("[FIRMWARE:grblHAL]" ASCII_EOL);
if(!(nvs->type == NVS_None || nvs->type == NVS_Emulated)) {
@@ -1232,7 +1237,7 @@ void report_realtime_status (void)
append = axis_signals_tostring(append, lim_pin_state);
if(ctrl_pin_state.value)
append = control_signals_tostring(append, ctrl_pin_state);
append = control_signals_tostring(append, ctrl_pin_state, false);
*append = '\0';
hal.stream.write_all(buf);
@@ -2074,7 +2079,7 @@ status_code_t report_last_signals_event (sys_state_t state, char *args)
strcpy(buf, "[LASTEVENTS:");
append = control_signals_tostring(append, sys.last_event.control);
append = control_signals_tostring(append, sys.last_event.control, false);
*append++ = ',';
append = add_limits(append, sys.last_event.limits);
@@ -2141,19 +2146,6 @@ status_code_t report_spindle_data (sys_state_t state, char *args)
return spindle->get_data ? Status_OK : Status_InvalidStatement;
}
static const char *get_pinname (pin_function_t function)
{
const char *name = NULL;
uint_fast8_t idx = sizeof(pin_names) / sizeof(pin_name_t);
do {
if(pin_names[--idx].function == function)
name = pin_names[idx].name;
} while(idx && !name);
return name ? name : "N/A";
}
static void report_pin (xbar_t *pin, void *data)
{
hal.stream.write("[PIN:");
@@ -2161,7 +2153,7 @@ static void report_pin (xbar_t *pin, void *data)
hal.stream.write((char *)pin->port);
hal.stream.write(uitoa(pin->pin));
hal.stream.write(",");
hal.stream.write(get_pinname(pin->function));
hal.stream.write(xbar_fn_to_pinname(pin->function));
if(pin->description) {
hal.stream.write(",");
hal.stream.write(pin->description);
+7 -3
View File
@@ -42,6 +42,8 @@
settings_t settings;
static const control_signals_t limits_override = { .limits_override = On };
const settings_restore_t settings_all = {
.defaults = SETTINGS_RESTORE_DEFAULTS,
.parameters = SETTINGS_RESTORE_PARAMETERS,
@@ -968,7 +970,7 @@ static status_code_t set_ngc_debug_out (setting_id_t id, uint_fast16_t int_value
static status_code_t set_control_invert (setting_id_t id, uint_fast16_t int_value)
{
settings.control_invert.mask = int_value & hal.signals_cap.mask;
settings.control_invert.mask = (int_value & hal.signals_cap.mask) | limits_override.mask;
return Status_OK;
}
@@ -1584,7 +1586,7 @@ static uint32_t get_int (setting_id_t id)
break;
case Setting_ControlInvertMask:
value = settings.control_invert.mask & hal.signals_cap.mask;
value = (settings.control_invert.mask & hal.signals_cap.mask) & ~limits_override.mask;
break;
case Setting_SpindleInvertMask:
@@ -2140,6 +2142,8 @@ bool read_global_settings ()
settings.steppers.enable_invert.mask = AXES_BITMASK;
#endif
settings.control_invert.mask |= limits_override.mask;
return ok && settings.version == SETTINGS_VERSION;
}
@@ -2172,7 +2176,7 @@ void settings_restore (settings_restore_t restore)
memcpy(&settings, &defaults, sizeof(settings_t));
settings.control_invert.mask &= hal.signals_cap.mask;
settings.control_invert.mask = (settings.control_invert.mask & hal.signals_cap.mask) | limits_override.mask;
settings.spindle.invert.ccw &= spindle_get_caps(false).direction;
settings.spindle.invert.pwm &= spindle_get_caps(false).pwm_invert;
#if ENABLE_BACKLASH_COMPENSATION