Browse Source

Tweak M42 var

Scott Lahteine 7 years ago
parent
commit
3269d8dd62
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/src/gcode/control/M42.cpp

+ 3
- 3
Marlin/src/gcode/control/M42.cpp View File

@@ -37,10 +37,10 @@ void GcodeSuite::M42() {
37 37
   if (!parser.seenval('S')) return;
38 38
   const byte pin_status = parser.value_byte();
39 39
 
40
-  int pin_number = PARSED_PIN_INDEX('P', GET_PIN_MAP_INDEX(LED_PIN));
41
-  if (pin_number < 0) return;
40
+  const int pin_index = PARSED_PIN_INDEX('P', GET_PIN_MAP_INDEX(LED_PIN));
41
+  if (pin_index < 0) return;
42 42
 
43
-  const pin_t pin = GET_PIN_MAP_PIN(pin_number);
43
+  const pin_t pin = GET_PIN_MAP_PIN(pin_index);
44 44
   if (pin_is_protected(pin)) {
45 45
     SERIAL_ERROR_START();
46 46
     SERIAL_ERRORLNPGM(MSG_ERR_PROTECTED_PIN);

Loading…
Cancel
Save