Protected pin err for M226
This commit is contained in:
parent
4b90cd8ead
commit
968a5d2e63
5 changed files with 28 additions and 32 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue