mirror of
https://github.com/grblHAL/core.git
synced 2026-08-17 08:31:43 +08:00
Added preprocessor support for moving coolant outputs to auxiliary pool. Some minor bug fixes and code cleanup.
Those who have custom board maps must update pin assignments accordingly when updating to this or later versions.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Latest build date is 20241208, see the [changelog](changelog.md) for details.
|
||||
|
||||
> [!NOTE]
|
||||
> A settings reset will be performed on an update of builds prior to 20241208. Backup and restore of settings is recommended.
|
||||
> A settings reset will be performed on an update of builds prior to 20241217. Backup and restore of settings is recommended.
|
||||
|
||||
> [!NOTE]
|
||||
> Build 20240222 has moved the probe input to the ioPorts pool of inputs and will be allocated from it when configured.
|
||||
@@ -93,4 +93,4 @@ G/M-codes not supported by [legacy Grbl](https://github.com/gnea/grbl/wiki) are
|
||||
Some [plugins](https://github.com/grblHAL/plugins) implements additional M-codes.
|
||||
|
||||
---
|
||||
20241209
|
||||
20241217
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
## grblHAL changelog
|
||||
|
||||
<a name="20241217">Build 20241217
|
||||
|
||||
Core:
|
||||
|
||||
* Added preprocessor support for moving coolant outputs to auxiliary pool. Some minor bug fixes and code cleanup.
|
||||
Those who have custom board maps must update pin assignments accordingly when updating to this or later versions.
|
||||
|
||||
Drivers:
|
||||
|
||||
* Most: moved coolant outputs to auxiliary outputs pool for many boards.
|
||||
Web Builder functionality for assigning those outputs as coolant or as auxiliary (controlled by M62-M65) will be forthcoming.
|
||||
|
||||
* ESP32: added driver support for second PWM spindle, only configurable for the MKS DLC32 v2 board for now.
|
||||
|
||||
Plugins:
|
||||
|
||||
* Spindle: removed obsoleted code, fix for second PWM spindle w/o direction output.
|
||||
|
||||
<a name="20241214">Build 20241214
|
||||
|
||||
Core:
|
||||
|
||||
+2
-1
@@ -25,8 +25,9 @@
|
||||
|
||||
// if changed to > 8 bits planner_cond_t needs to be changed too
|
||||
typedef union {
|
||||
uint8_t bits; //!< Bitmask bits
|
||||
uint8_t mask; //!< Bitmask
|
||||
uint8_t value; //!< Bitmask value
|
||||
uint8_t mask; //!< Synonym for bitmask value
|
||||
struct {
|
||||
uint8_t flood :1, //!< Flood coolant.
|
||||
mist :1, //!< Mist coolant, optional.
|
||||
|
||||
+9
-1
@@ -165,7 +165,11 @@ typedef enum {
|
||||
Output_Aux9,
|
||||
Output_Aux10,
|
||||
Output_Aux11,
|
||||
Output_AuxMax = Output_Aux11,
|
||||
Output_Aux12,
|
||||
Output_Aux13,
|
||||
Output_Aux14,
|
||||
Output_Aux15,
|
||||
Output_AuxMax = Output_Aux15,
|
||||
Output_Analog_Aux0,
|
||||
Output_Analog_Aux1,
|
||||
Output_Analog_Aux2,
|
||||
@@ -376,6 +380,10 @@ PROGMEM static const pin_name_t pin_names[] = {
|
||||
{ .function = Output_Aux9, .name = "Aux out 9" },
|
||||
{ .function = Output_Aux10, .name = "Aux out 10" },
|
||||
{ .function = Output_Aux11, .name = "Aux out 11" },
|
||||
{ .function = Output_Aux12, .name = "Aux out 12" },
|
||||
{ .function = Output_Aux13, .name = "Aux out 13" },
|
||||
{ .function = Output_Aux14, .name = "Aux out 14" },
|
||||
{ .function = Output_Aux15, .name = "Aux out 15" },
|
||||
{ .function = Output_Analog_Aux0, .name = "Aux analog out 0" },
|
||||
{ .function = Output_Analog_Aux1, .name = "Aux analog out 1" },
|
||||
{ .function = Output_Analog_Aux2, .name = "Aux analog out 2" },
|
||||
|
||||
+74
-25
@@ -231,6 +231,51 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ESTOP_ENABLE
|
||||
#if COMPATIBILITY_LEVEL <= 1
|
||||
#define ESTOP_ENABLE 1
|
||||
#else
|
||||
#define ESTOP_ENABLE 0
|
||||
#endif
|
||||
#elif ESTOP_ENABLE && COMPATIBILITY_LEVEL > 1
|
||||
#warning "Enabling ESTOP may not work with all senders!"
|
||||
#endif
|
||||
|
||||
#define AUX_CONTROL_SPINDLE 0b0001
|
||||
#define AUX_CONTROL_COOLANT 0b0010
|
||||
#define AUX_CONTROL_DEVICES 0b0100
|
||||
#define AUX_CONTROL_INPUTS 0b1000
|
||||
|
||||
// Control signals, keep in sync with control_signals_t
|
||||
#define CONTROL_RESET 0b0000001
|
||||
#define CONTROL_FEEDHOLD 0b0000010
|
||||
#define CONTROL_CYCLESTART 0b0000100
|
||||
#define CONTROL_SAFETYDOOR 0b0001000
|
||||
#define CONTROL_BLOCKDELETE 0b0010000
|
||||
#define CONTROL_STOPDISABLE 0b0100000
|
||||
#define CONTROL_ESTOP 0b1000000
|
||||
|
||||
#ifndef CONTROL_ENABLE
|
||||
#if ESTOP_ENABLE
|
||||
#define CONTROL_ENABLE (CONTROL_FEEDHOLD|CONTROL_CYCLESTART|CONTROL_ESTOP)
|
||||
#else
|
||||
#define CONTROL_ENABLE (CONTROL_RESET|CONTROL_FEEDHOLD|CONTROL_CYCLESTART)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Coolant signals, keep in sync with coolant_state_t
|
||||
#define COOLANT_FLOOD 0b01
|
||||
#define COOLANT_MIST 0b10
|
||||
|
||||
#ifndef COOLANT_ENABLE
|
||||
#define COOLANT_ENABLE (COOLANT_FLOOD|COOLANT_MIST)
|
||||
#endif
|
||||
|
||||
// Spindle signals
|
||||
#define SPINDLE_ENA 0b001
|
||||
#define SPINDLE_PWM 0b010
|
||||
#define SPINDLE_DIR 0b100
|
||||
|
||||
#ifndef SPINDLE0_ENABLE
|
||||
#define SPINDLE0_ENABLE DEFAULT_SPINDLE
|
||||
#endif
|
||||
@@ -269,23 +314,29 @@
|
||||
|
||||
// Driver spindle 0
|
||||
|
||||
#if SPINDLE_ENABLE & ((1<<SPINDLE_PWM0)|(1<<SPINDLE_PWM0_NODIR)|(1<<SPINDLE_ONOFF0)|(1<<SPINDLE_ONOFF0_DIR))
|
||||
#define DRIVER_SPINDLE_ENABLE 1
|
||||
#if SPINDLE_ENABLE & (1<<SPINDLE_PWM0)
|
||||
#define DRIVER_SPINDLE_ENABLE (SPINDLE_ENA|SPINDLE_PWM|SPINDLE_DIR)
|
||||
#elif SPINDLE_ENABLE & (1<<SPINDLE_PWM0_NODIR)
|
||||
#define DRIVER_SPINDLE_ENABLE (SPINDLE_ENA|SPINDLE_PWM)
|
||||
#elif SPINDLE_ENABLE & (1<<SPINDLE_ONOFF0)
|
||||
#define DRIVER_SPINDLE_ENABLE SPINDLE_ENA
|
||||
#elif SPINDLE_ENABLE & (1<<SPINDLE_ONOFF0_DIR)
|
||||
#define DRIVER_SPINDLE_ENABLE (SPINDLE_ENA|SPINDLE_DIR)
|
||||
#else
|
||||
#define DRIVER_SPINDLE_ENABLE 0
|
||||
#endif
|
||||
|
||||
#if SPINDLE_ENABLE & ((1<<SPINDLE_PWM0)|(1<<SPINDLE_ONOFF0_DIR))
|
||||
#define DRIVER_SPINDLE_DIR_ENABLE 1
|
||||
#if DRIVER_SPINDLE_ENABLE & SPINDLE_DIR
|
||||
#define DRIVER_SPINDLE_DIR_ENABLE 1 // Deprecated
|
||||
#else
|
||||
#define DRIVER_SPINDLE_DIR_ENABLE 0
|
||||
#define DRIVER_SPINDLE_DIR_ENABLE 0 // Deprecated
|
||||
#endif
|
||||
|
||||
#if SPINDLE_ENABLE & ((1<<SPINDLE_PWM0)|(1<<SPINDLE_PWM0_NODIR))
|
||||
#define DRIVER_SPINDLE_PWM_ENABLE 1
|
||||
#if DRIVER_SPINDLE_ENABLE & SPINDLE_PWM
|
||||
#define DRIVER_SPINDLE_PWM_ENABLE 1 // Deprecated
|
||||
#define DRIVER_SPINDLE_NAME "PWM"
|
||||
#else
|
||||
#define DRIVER_SPINDLE_PWM_ENABLE 0
|
||||
#define DRIVER_SPINDLE_PWM_ENABLE 0 // Deprecated
|
||||
#if DRIVER_SPINDLE_ENABLE
|
||||
#define DRIVER_SPINDLE_NAME "Basic"
|
||||
#endif
|
||||
@@ -295,7 +346,15 @@
|
||||
|
||||
#if SPINDLE_ENABLE & ((1<<SPINDLE_PWM1)|(1<<SPINDLE_PWM1_NODIR)|(1<<SPINDLE_ONOFF1)|(1<<SPINDLE_ONOFF1_DIR))
|
||||
#if N_SPINDLE > 1
|
||||
#define DRIVER_SPINDLE1_ENABLE 1
|
||||
#if SPINDLE_ENABLE & (1<<SPINDLE_PWM1)
|
||||
#define DRIVER_SPINDLE1_ENABLE (SPINDLE_ENA|SPINDLE_PWM|SPINDLE_DIR)
|
||||
#elif SPINDLE_ENABLE & (1<<SPINDLE_PWM1_NODIR)
|
||||
#define DRIVER_SPINDLE1_ENABLE (SPINDLE_ENA|SPINDLE_PWM)
|
||||
#elif SPINDLE_ENABLE & (1<<SPINDLE_ONOFF1)
|
||||
#define DRIVER_SPINDLE1_ENABLE SPINDLE_ENA
|
||||
#elif SPINDLE_ENABLE & (1<<SPINDLE_ONOFF1_DIR)
|
||||
#define DRIVER_SPINDLE1_ENABLE (SPINDLE_ENA|SPINDLE_DIR)
|
||||
#endif
|
||||
#else
|
||||
#warning "Configure N_SPINDLE > 1 in grbl/config.h when enabling second driver spindle!"
|
||||
#endif
|
||||
@@ -303,17 +362,17 @@
|
||||
#define DRIVER_SPINDLE1_ENABLE 0
|
||||
#endif
|
||||
|
||||
#if DRIVER_SPINDLE1_ENABLE && (SPINDLE_ENABLE & ((1<<SPINDLE_PWM1)|(1<<SPINDLE_ONOFF1_DIR)))
|
||||
#define DRIVER_SPINDLE1_DIR_ENABLE 1
|
||||
#if DRIVER_SPINDLE1_ENABLE & SPINDLE_DIR
|
||||
#define DRIVER_SPINDLE1_DIR_ENABLE 1 // Deprecated
|
||||
#else
|
||||
#define DRIVER_SPINDLE1_DIR_ENABLE 0
|
||||
#define DRIVER_SPINDLE1_DIR_ENABLE 0 // Deprecated
|
||||
#endif
|
||||
|
||||
#if DRIVER_SPINDLE1_ENABLE && (SPINDLE_ENABLE & ((1<<SPINDLE_PWM1)|(1<<SPINDLE_PWM1_NODIR)))
|
||||
#define DRIVER_SPINDLE1_PWM_ENABLE 1
|
||||
#if DRIVER_SPINDLE1_ENABLE & SPINDLE_PWM
|
||||
#define DRIVER_SPINDLE1_PWM_ENABLE 1 // Deprecated
|
||||
#define DRIVER_SPINDLE1_NAME "PWM2"
|
||||
#else
|
||||
#define DRIVER_SPINDLE1_PWM_ENABLE 0
|
||||
#define DRIVER_SPINDLE1_PWM_ENABLE 0 // Deprecated
|
||||
#if DRIVER_SPINDLE1_ENABLE
|
||||
#define DRIVER_SPINDLE1_NAME "Basic2"
|
||||
#endif
|
||||
@@ -416,16 +475,6 @@
|
||||
#error "Driver does not support safety door functionality!"
|
||||
#endif
|
||||
|
||||
#ifndef ESTOP_ENABLE
|
||||
#if COMPATIBILITY_LEVEL <= 1
|
||||
#define ESTOP_ENABLE 1
|
||||
#else
|
||||
#define ESTOP_ENABLE 0
|
||||
#endif
|
||||
#elif ESTOP_ENABLE && COMPATIBILITY_LEVEL > 1
|
||||
#warning "Enabling ESTOP may not work with all senders!"
|
||||
#endif
|
||||
|
||||
//
|
||||
|
||||
#ifndef WIFI_ENABLE
|
||||
|
||||
+10
-12
@@ -25,28 +25,20 @@
|
||||
// NOTE: do NOT change options here - edit the driver specific my_machine.h instead!
|
||||
//
|
||||
|
||||
#if DRIVER_SPINDLE_ENABLE && !defined(SPINDLE_ENABLE_PIN)
|
||||
#if (DRIVER_SPINDLE_ENABLE & SPINDLE_ENA) && !defined(SPINDLE_ENABLE_PIN)
|
||||
#warning "Selected spindle is not supported!"
|
||||
#undef DRIVER_SPINDLE_ENABLE
|
||||
#define DRIVER_SPINDLE_ENABLE 0
|
||||
#endif
|
||||
|
||||
#if DRIVER_SPINDLE_DIR_ENABLE && !defined(SPINDLE_DIRECTION_PIN)
|
||||
#if (DRIVER_SPINDLE_ENABLE & SPINDLE_DIR) && !defined(SPINDLE_DIRECTION_PIN)
|
||||
#warning "Selected spindle is not fully supported - no direction output!"
|
||||
#undef DRIVER_SPINDLE_DIR_ENABLE
|
||||
#define DRIVER_SPINDLE_DIR_ENABLE 0
|
||||
#endif
|
||||
|
||||
#if DRIVER_SPINDLE_PWM_ENABLE && (!DRIVER_SPINDLE_ENABLE || !defined(SPINDLE_PWM_PIN))
|
||||
#if (DRIVER_SPINDLE_ENABLE & SPINDLE_PWM) && !defined(SPINDLE_PWM_PIN)
|
||||
#warning "Selected spindle is not supported!"
|
||||
#undef DRIVER_SPINDLE_PWM_ENABLE
|
||||
#define DRIVER_SPINDLE_PWM_ENABLE 0
|
||||
#endif
|
||||
|
||||
#if DRIVER_SPINDLE_PWM1_ENABLE && (!DRIVER_SPINDLE1_ENABLE || !defined(SPINDLE1_PWM_PIN))
|
||||
#if (DRIVER_SPINDLE1_ENABLE & SPINDLE_PWM) && !defined(SPINDLE_PWM_PIN)
|
||||
#warning "Selected spindle 1 is not supported!"
|
||||
#undef DRIVER_SPINDLE_PWM1_ENABLE
|
||||
#define DRIVER_SPINDLE_PWM1_ENABLE 0
|
||||
#endif
|
||||
|
||||
#if MPG_ENABLE == 1 && !defined(MPG_MODE_PIN)
|
||||
@@ -146,6 +138,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(COPROC_RESET_PIN) && defined(COPROC_BOOT0_PIN)
|
||||
#define COPROC_PASSTHRU 1
|
||||
#else
|
||||
#define COPROC_PASSTHRU 0
|
||||
#endif
|
||||
|
||||
#ifndef COPROC_STREAM
|
||||
#if USB_SERIAL_CDC
|
||||
#define COPROC_STREAM 0
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#else
|
||||
#define GRBL_VERSION "1.1f"
|
||||
#endif
|
||||
#define GRBL_BUILD 20241214
|
||||
#define GRBL_BUILD 20241217
|
||||
|
||||
#define GRBL_URL "https://github.com/grblHAL"
|
||||
|
||||
|
||||
+1
-1
@@ -558,7 +558,7 @@ status_code_t limits_go_home (axes_signals_t cycle)
|
||||
// If axes in cycle has different feed rates home them separately
|
||||
if(axis0 == 254) {
|
||||
|
||||
status_code_t status;
|
||||
status_code_t status = Status_OK;
|
||||
|
||||
idx = 0;
|
||||
while(cycle.mask) {
|
||||
|
||||
+59
-18
@@ -392,42 +392,83 @@ static inline control_signals_t aux_ctrl_scan_status (control_signals_t signals)
|
||||
#define AUX_CONTROLS_SCAN 0
|
||||
#endif
|
||||
|
||||
#ifdef AUX_CONTROLS_OUT
|
||||
#if defined(AUX_CONTROLS_OUT) && !defined(AUX_CONTROLS)
|
||||
#define AUX_CONTROLS AUX_CONTROL_SPINDLE
|
||||
#elif !defined(AUX_CONTROLS)
|
||||
#define AUX_CONTROLS 0
|
||||
#endif
|
||||
|
||||
#if AUX_CONTROLS
|
||||
|
||||
// The following pins are bound explicitly to aux output pins
|
||||
static aux_ctrl_out_t aux_ctrl_out[] = {
|
||||
#if DRIVER_SPINDLE_ENABLE
|
||||
#if AUX_CONTROLS & AUX_CONTROL_SPINDLE
|
||||
#ifdef SPINDLE_ENABLE_PIN
|
||||
#ifndef SPINDLE_ENABLE_PORT
|
||||
#define SPINDLE_ENABLE_PORT NULL
|
||||
#endif
|
||||
{ .function = Output_SpindleOn, .aux_port = 0xFF, .pin = SPINDLE_ENABLE_PIN, .port = SPINDLE_ENABLE_PORT },
|
||||
#if DRIVER_SPINDLE_PWM_ENABLE
|
||||
#endif
|
||||
#ifdef SPINDLE_PWM_PIN
|
||||
#ifndef SPINDLE_PWM_PORT
|
||||
#define SPINDLE_PWM_PORT NULL
|
||||
#endif
|
||||
{ .function = Output_SpindlePWM, .aux_port = 0xFF, .pin = SPINDLE_PWM_PIN, .port = SPINDLE_PWM_PORT },
|
||||
#endif
|
||||
#if DRIVER_SPINDLE_DIR_ENABLE
|
||||
#ifdef SPINDLE_DIRECTION_PIN
|
||||
#ifndef SPINDLE_DIRECTION_PORT
|
||||
#define SPINDLE_DIRECTION_PORT NULL
|
||||
#endif
|
||||
{ .function = Output_SpindleDir, .aux_port = 0xFF, .pin = SPINDLE_DIRECTION_PIN, .port = SPINDLE_DIRECTION_PORT },
|
||||
#endif
|
||||
#endif // DRIVER_SPINDLE_ENABLE
|
||||
#if DRIVER_SPINDLE1_ENABLE
|
||||
|
||||
#ifdef SPINDLE1_ENABLE_PIN
|
||||
#ifndef SPINDLE1_ENABLE_PORT
|
||||
#define SPINDLE1_ENABLE_PORT NULL
|
||||
#endif
|
||||
{ .function = Output_Spindle1On, .aux_port = 0xFF, .pin = SPINDLE1_ENABLE_PIN, .port = SPINDLE1_ENABLE_PORT },
|
||||
#if DRIVER_SPINDLE1_PWM_ENABLE
|
||||
#endif
|
||||
#ifdef SPINDLE1_PWM_PIN
|
||||
#ifndef SPINDLE1_PWM_PORT
|
||||
#define SPINDLE1_PWM_PORT NULL
|
||||
#endif
|
||||
{ .function = Output_Spindle1PWM, .aux_port = 0xFF, .pin = SPINDLE1_PWM_PIN, .port = SPINDLE1_PWM_PORT },
|
||||
#endif
|
||||
#if DRIVER_SPINDLE1_DIR_ENABLE
|
||||
#ifdef SPINDLE1_DIRECTION_PIN
|
||||
#ifndef SPINDLE1_DIRECTION_PORT
|
||||
#define SPINDLE1_DIRECTION_PORT NULL
|
||||
#endif
|
||||
{ .function = Output_Spindle1Dir, .aux_port = 0xFF, .pin = SPINDLE1_DIRECTION_PIN, .port = SPINDLE1_DIRECTION_PORT },
|
||||
#endif
|
||||
#endif // DRIVER_SPINDLE1_DIR_ENABLE
|
||||
#endif // SPINDLES
|
||||
|
||||
#if AUX_CONTROLS & AUX_CONTROL_COOLANT
|
||||
#ifdef COOLANT_FLOOD_PIN
|
||||
#ifndef COOLANT_FLOOD_PORT
|
||||
#define COOLANT_FLOOD_PORT NULL
|
||||
#endif
|
||||
{ .function = Output_CoolantFlood, .aux_port = 0xFF, .pin = COOLANT_FLOOD_PIN, .port = COOLANT_FLOOD_PORT },
|
||||
#endif
|
||||
#ifdef COOLANT_MIST_PIN
|
||||
#ifndef COOLANT_MIST_PORT
|
||||
#define COOLANT_MIST_PORT NULL
|
||||
#endif
|
||||
{ .function = Output_CoolantMist, .aux_port = 0xFF, .pin = COOLANT_MIST_PIN, .port = COOLANT_MIST_PORT },
|
||||
#endif
|
||||
#endif // COOLANT
|
||||
|
||||
#ifdef COPROC_RESET_PIN
|
||||
#ifndef COPROC_RESET_PORT
|
||||
#define COPROC_RESET_PORT NULL
|
||||
#endif
|
||||
{ .function = Output_CoProc_Reset, .aux_port = 0xFF, .pin = COPROC_RESET_PIN, .port = COPROC_RESET_PORT },
|
||||
#endif
|
||||
#ifdef COPROC_BOOT0_PIN
|
||||
#ifndef COPROC_BOOT0_PORT
|
||||
#define COPROC_BOOT0_PORT NULL
|
||||
#endif
|
||||
{ .function = Output_CoProc_Boot0, .aux_port = 0xFF, .pin = COPROC_BOOT0_PIN, .port = COPROC_BOOT0_PORT },
|
||||
#endif
|
||||
/*
|
||||
#ifdef COOLANT_FLOOD_PIN
|
||||
{ .function = Output_CoolantFlood, .aux_port = 0xFF, .pin = COOLANT_FLOOD_PIN, .port = COOLANT_FLOOD_PORT },
|
||||
#endif
|
||||
#ifdef COOLANT_MIST_PIN
|
||||
{ .function = Output_CoolantMist, .aux_port = 0xFF, .pin = COOLANT_MIST_PIN, .port = COOLANT_MIST_PORT },
|
||||
#endif
|
||||
*/
|
||||
};
|
||||
|
||||
static inline aux_ctrl_out_t *aux_out_remap_explicit (void *port, uint8_t pin, uint8_t aux_port, void *output)
|
||||
@@ -473,7 +514,7 @@ static inline void aux_ctrl_claim_out_ports (aux_claim_explicit_out_ptr aux_clai
|
||||
}
|
||||
}
|
||||
|
||||
#endif // AUX_CONTROLS_OUT
|
||||
#endif // AUX_CONTROLS
|
||||
|
||||
//
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@
|
||||
onoff_spindle_init();
|
||||
#endif
|
||||
|
||||
#if SPINDLE_ENABLE & (1<<SPINDLE_PWM2)
|
||||
#if SPINDLE_ENABLE & ((1<<SPINDLE_PWM2)|(1<<SPINDLE_PWM2_NODIR))
|
||||
extern void pwm_spindle_init (void);
|
||||
pwm_spindle_init();
|
||||
#endif
|
||||
|
||||
+8
-4
@@ -2912,14 +2912,18 @@ status_code_t setting_validate (setting_id_t id, float value, char *svalue)
|
||||
|
||||
static bool settings_changed_spindle (void)
|
||||
{
|
||||
static spindle_settings_t spindle_settings = {0};
|
||||
static spindle_settings_t spindle_settings = {};
|
||||
static spindle_pwm_settings_t spindle_pwm_settings = {};
|
||||
|
||||
bool changed;
|
||||
bool base_changed, pwm_changed;
|
||||
|
||||
if((changed = memcmp(&spindle_settings, &settings.spindle, sizeof(spindle_settings_t))) != 0)
|
||||
if((base_changed = memcmp(&spindle_settings, &settings.spindle, sizeof(spindle_settings_t))) != 0)
|
||||
memcpy(&spindle_settings, &settings.spindle, sizeof(spindle_settings_t));
|
||||
|
||||
return changed;
|
||||
if((pwm_changed = memcmp(&spindle_pwm_settings, &settings.pwm_spindle, sizeof(spindle_pwm_settings_t))) != 0)
|
||||
memcpy(&spindle_pwm_settings, &settings.pwm_spindle, sizeof(spindle_pwm_settings_t));
|
||||
|
||||
return base_changed || pwm_changed;
|
||||
}
|
||||
|
||||
// A helper method to set settings from command line
|
||||
|
||||
@@ -831,10 +831,6 @@ bool spindle_precompute_pwm_values (spindle_ptrs_t *spindle, spindle_pwm_t *pwm_
|
||||
pwm_data->compute_value = compute_dummy_pwm_value;
|
||||
}
|
||||
|
||||
pwm_data->flags.invert_pwm = pwm_data->flags.invert_pwm;
|
||||
pwm_data->flags.always_on = pwm_data->flags.always_on;
|
||||
pwm_data->flags.cloned = pwm_data->flags.cloned;
|
||||
|
||||
spindle->context.pwm = pwm_data;
|
||||
|
||||
#if ENABLE_SPINDLE_LINEARIZATION
|
||||
|
||||
Reference in New Issue
Block a user