ソースを参照

Tweak M42 var

Scott Lahteine 7年前
コミット
3269d8dd62
1個のファイルの変更3行の追加3行の削除
  1. 3
    3
      Marlin/src/gcode/control/M42.cpp

+ 3
- 3
Marlin/src/gcode/control/M42.cpp ファイルの表示

@@ -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);

読み込み中…
キャンセル
保存