🧑‍💻 Remove servo macros

This commit is contained in:
Scott Lahteine
2022-06-09 00:51:08 -05:00
committed by Scott Lahteine
parent d886320799
commit ea22640d78
10 changed files with 25 additions and 28 deletions

View File

@ -56,14 +56,14 @@ void GcodeSuite::M280() {
while (PENDING(now, end)) {
safe_delay(50);
now = _MIN(millis(), end);
MOVE_SERVO(servo_index, LROUND(aold + (anew - aold) * (float(now - start) / t)));
servo[servo_index].move(LROUND(aold + (anew - aold) * (float(now - start) / t)));
}
}
#endif // POLARGRAPH
MOVE_SERVO(servo_index, anew);
servo[servo_index].move(anew);
}
else
DETACH_SERVO(servo_index);
servo[servo_index].detach();
}
else
SERIAL_ECHO_MSG(" Servo ", servo_index, ": ", servo[servo_index].read());

View File

@ -36,7 +36,7 @@ void GcodeSuite::M282() {
const int servo_index = parser.value_int();
if (WITHIN(servo_index, 0, NUM_SERVOS - 1))
DETACH_SERVO(servo_index);
servo[servo_index].detach();
else
SERIAL_ECHO_MSG("Servo ", servo_index, " out of range");