Browse Source

💥 Change 'M42 M' to 'M42 T'

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

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

52
  *  S<byte> Pin status from 0 - 255
52
  *  S<byte> Pin status from 0 - 255
53
  *  I       Flag to ignore Marlin's pin protection
53
  *  I       Flag to ignore Marlin's pin protection
54
  *
54
  *
55
- *  M<mode> Pin mode: 0=INPUT  1=OUTPUT  2=INPUT_PULLUP  3=INPUT_PULLDOWN
55
+ *  T<mode> Pin mode: 0=INPUT  1=OUTPUT  2=INPUT_PULLUP  3=INPUT_PULLDOWN
56
  */
56
  */
57
 void GcodeSuite::M42() {
57
 void GcodeSuite::M42() {
58
   const int pin_index = PARSED_PIN_INDEX('P', GET_PIN_MAP_INDEX(LED_PIN));
58
   const int pin_index = PARSED_PIN_INDEX('P', GET_PIN_MAP_INDEX(LED_PIN));
63
   if (!parser.boolval('I') && pin_is_protected(pin)) return protected_pin_err();
63
   if (!parser.boolval('I') && pin_is_protected(pin)) return protected_pin_err();
64
 
64
 
65
   bool avoidWrite = false;
65
   bool avoidWrite = false;
66
-  if (parser.seenval('M')) {
66
+  if (parser.seenval('T')) {
67
     switch (parser.value_byte()) {
67
     switch (parser.value_byte()) {
68
       case 0: pinMode(pin, INPUT); avoidWrite = true; break;
68
       case 0: pinMode(pin, INPUT); avoidWrite = true; break;
69
       case 1: pinMode(pin, OUTPUT); break;
69
       case 1: pinMode(pin, OUTPUT); break;

Loading…
Cancel
Save