diff --git a/Grbl_Esp32/src/Spindles/10vSpindle.cpp b/Grbl_Esp32/src/Spindles/10vSpindle.cpp index ae3abcbb..bdc4ebbd 100644 --- a/Grbl_Esp32/src/Spindles/10vSpindle.cpp +++ b/Grbl_Esp32/src/Spindles/10vSpindle.cpp @@ -29,6 +29,7 @@ #include "../Pins/Ledc.h" #include "../Report.h" #include "../System.h" // sys.spindle_speed +#include "../GCode.h" // gc_state.modal namespace Spindles { void _10v::init() { @@ -66,14 +67,12 @@ namespace Spindles { _pwm_precision); } -#ifdef LATER // This appears identical to the code in PWMSpindle.cpp but // it uses the 10v versions of set_enable and set_output void IRAM_ATTR _10v::setSpeedfromISR(uint32_t dev_speed) { set_enable(gc_state.modal.spindle != SpindleState::Disable); set_output(dev_speed); } -#endif void _10v::set_enable(bool enable) { if (_disable_with_zero_speed && sys.spindle_speed == 0) { diff --git a/Grbl_Esp32/src/Spindles/10vSpindle.h b/Grbl_Esp32/src/Spindles/10vSpindle.h index 03bb98df..628a40ac 100644 --- a/Grbl_Esp32/src/Spindles/10vSpindle.h +++ b/Grbl_Esp32/src/Spindles/10vSpindle.h @@ -40,6 +40,7 @@ namespace Spindles { void init() override; void config_message() override; + void setSpeedfromISR(uint32_t dev_speed) override; void deinit() override; @@ -60,8 +61,6 @@ namespace Spindles { protected: void set_enable(bool enable_pin); void set_direction(bool Clockwise); - // XXX Do we need to override this to do something with enables? - // virtual void set_output(uint32_t) override; Pin _forward_pin; Pin _reverse_pin;