Skip to content
Snippets Groups Projects
Commit 3269d8dd authored by Scott Lahteine's avatar Scott Lahteine
Browse files

Tweak M42 var

parent cf2c5266
Branches
Tags
No related merge requests found
...@@ -37,10 +37,10 @@ void GcodeSuite::M42() { ...@@ -37,10 +37,10 @@ void GcodeSuite::M42() {
if (!parser.seenval('S')) return; if (!parser.seenval('S')) return;
const byte pin_status = parser.value_byte(); const byte pin_status = parser.value_byte();
int pin_number = PARSED_PIN_INDEX('P', GET_PIN_MAP_INDEX(LED_PIN)); const int pin_index = PARSED_PIN_INDEX('P', GET_PIN_MAP_INDEX(LED_PIN));
if (pin_number < 0) return; if (pin_index < 0) return;
const pin_t pin = GET_PIN_MAP_PIN(pin_number); const pin_t pin = GET_PIN_MAP_PIN(pin_index);
if (pin_is_protected(pin)) { if (pin_is_protected(pin)) {
SERIAL_ERROR_START(); SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_PROTECTED_PIN); SERIAL_ERRORLNPGM(MSG_ERR_PROTECTED_PIN);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment