Set power state during motion stopped when MOTOR_POWER_REDUCED_WHEN_IDLE

This commit is contained in:
Rob Giseburt
2020-01-10 19:24:35 -06:00
parent 675677b580
commit 4e038af760
@@ -294,8 +294,7 @@ struct StepDirStepper final : Stepper {
if (_power_mode == MOTOR_POWERED_IN_CYCLE) {
this->enable();
} else if (_power_mode == MOTOR_POWER_REDUCED_WHEN_IDLE) {
// _power_state = MOTOR_POWER_TIMEOUT_START;
// ^^^ will get set during periodicCheck when all motors have stopped
_power_state = MOTOR_POWER_TIMEOUT_START;
} else if (_power_mode == MOTOR_POWERED_ONLY_WHEN_MOVING) {
if (_power_state == MOTOR_RUNNING) {
// flag for periodicCheck - not actually using a timeout