Protected pin err for M226

This commit is contained in:
Scott Lahteine
2018-06-10 17:45:39 -05:00
parent 4b90cd8ead
commit 968a5d2e63
5 changed files with 28 additions and 32 deletions

View File

@@ -41,11 +41,8 @@ void GcodeSuite::M42() {
if (pin_index < 0) return;
const pin_t pin = GET_PIN_MAP_PIN(pin_index);
if (pin_is_protected(pin)) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_PROTECTED_PIN);
return;
}
if (pin_is_protected(pin_number)) return protected_pin_err();
pinMode(pin, OUTPUT);
digitalWrite(pin, pin_status);