Skip to content

Commit da0835e

Browse files
committed
Fixed ONLY_POWERED_WHEN_MOVING bug
1 parent bd01ee7 commit da0835e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

g2core/stepper.h

+4
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,10 @@ struct Stepper {
509509
if (_power_mode == MOTOR_POWERED_IN_CYCLE) {
510510
this->enable();
511511
_power_state = MOTOR_POWER_TIMEOUT_START;
512+
} else if (_power_mode == MOTOR_POWERED_ONLY_WHEN_MOVING) {
513+
if (_power_state == MOTOR_RUNNING) {
514+
_power_state = MOTOR_POWER_TIMEOUT_START;
515+
}
512516
}
513517
};
514518

0 commit comments

Comments
 (0)