Allow servo features in combination (#16960)

This commit is contained in:
Scott Lahteine
2020-02-26 06:26:54 -06:00
committed by GitHub
parent daa32013b1
commit 0a7e7a6fa5
6 changed files with 56 additions and 40 deletions

View File

@ -30,6 +30,12 @@ void GcodeSuite::M281() {
if (!parser.seenval('P')) return;
const int servo_index = parser.value_int();
if (WITHIN(servo_index, 0, NUM_SERVOS - 1)) {
#if ENABLED(BLTOUCH)
if (servo_index == Z_PROBE_SERVO_NR) {
SERIAL_ERROR_MSG("BLTouch angles can't be changed.");
return;
}
#endif
bool angle_change = false;
if (parser.seen('L')) {
servo_angles[servo_index][0] = parser.value_int();