Please sign in to comment.
Remove conflicting bool spindle_on
Bool `spindle_on` is initialized in `SpindleControl` and is shared between `SpindleControl` and whichever control method (PWM, Modbus, Huanyang, or Analog) is configured. Initializing `spindle_on` in `PWMSpindleControl` as well clobbers the shared variable and leads to `SpindleControl` and `PWMSpingleControl` having different values for `spindle_on` and thus the spindle is never actually turned on when sending M3 commands. This can be confirmed via M957 which will always show that the current PWM is 0, no matter what the current and target RPM. Removing this superfluous initializion causes `spindle_on` from `SpindleControl` to be shared as expeced and the module then works as can be confirmed with M957 showing appropriate PWM values responding to current and target RPM.
- Loading branch information...
Showing with 0 additions and 1 deletion.