Merge upstream changes from Marlin 2.1.2
This commit is contained in:
@@ -313,9 +313,16 @@ void GcodeSuite::M43() {
|
||||
|
||||
// 'P' Get the range of pins to test or watch
|
||||
uint8_t first_pin = PARSED_PIN_INDEX('P', 0),
|
||||
last_pin = parser.seenval('P') ? first_pin : TERN(HAS_HIGH_ANALOG_PINS, NUM_DIGITAL_PINS, NUMBER_PINS_TOTAL) - 1;
|
||||
last_pin = parser.seenval('L') ? PARSED_PIN_INDEX('L', 0) : parser.seenval('P') ? first_pin : (NUMBER_PINS_TOTAL) - 1;
|
||||
|
||||
if (first_pin > last_pin) return;
|
||||
NOMORE(first_pin, (NUMBER_PINS_TOTAL) - 1);
|
||||
NOMORE(last_pin, (NUMBER_PINS_TOTAL) - 1);
|
||||
|
||||
if (first_pin > last_pin) {
|
||||
const uint8_t f = first_pin;
|
||||
first_pin = last_pin;
|
||||
last_pin = f;
|
||||
}
|
||||
|
||||
// 'I' to ignore protected pins
|
||||
const bool ignore_protection = parser.boolval('I');
|
||||
|
Reference in New Issue
Block a user