|
@@ -32,6 +32,7 @@
|
32
|
32
|
* P1_20 as M42 P120, etc.
|
33
|
33
|
*
|
34
|
34
|
* S<byte> Pin status from 0 - 255
|
|
35
|
+ * I Flag to ignore Marlin's pin protection
|
35
|
36
|
*/
|
36
|
37
|
void GcodeSuite::M42() {
|
37
|
38
|
if (!parser.seenval('S')) return;
|
|
@@ -42,7 +43,7 @@ void GcodeSuite::M42() {
|
42
|
43
|
|
43
|
44
|
const pin_t pin = GET_PIN_MAP_PIN(pin_index);
|
44
|
45
|
|
45
|
|
- if (pin_is_protected(pin)) return protected_pin_err();
|
|
46
|
+ if (!parser.boolval('I') && pin_is_protected(pin)) return protected_pin_err();
|
46
|
47
|
|
47
|
48
|
pinMode(pin, OUTPUT);
|
48
|
49
|
digitalWrite(pin, pin_status);
|