🧑‍💻 Remove LOOP macros (#25917)

This commit is contained in:
Scott Lahteine
2023-06-02 14:30:34 -05:00
committed by GitHub
parent 2691167afe
commit 86c811660e
122 changed files with 362 additions and 367 deletions
+5 -5
View File
@@ -61,7 +61,7 @@ inline void toggle_pins() {
end = PARSED_PIN_INDEX('L', NUM_DIGITAL_PINS - 1),
wait = parser.intval('W', 500);
LOOP_S_LE_N(i, start, end) {
for (uint8_t i = start; i <= end; ++i) {
pin_t pin = GET_PIN_MAP_PIN_M43(i);
if (!VALID_PIN(pin)) continue;
if (M43_NEVER_TOUCH(i) || (!ignore_protection && pin_is_protected(pin))) {
@@ -189,7 +189,7 @@ inline void servo_probe_test() {
// DEPLOY and STOW 4 times and see if the signal follows
// Then it is a mechanical switch
SERIAL_ECHOLNPGM(". Deploy & stow 4 times");
LOOP_L_N(i, 4) {
for (uint8_t i = 0; i < 4; ++i) {
servo[probe_index].move(servo_angles[Z_PROBE_SERVO_NR][0]); // Deploy
safe_delay(500);
deploy_state = READ(PROBE_TEST_PIN);
@@ -328,7 +328,7 @@ void GcodeSuite::M43() {
const uint8_t pin_count = last_pin - first_pin + 1;
uint8_t pin_state[pin_count];
bool can_watch = false;
LOOP_S_LE_N(i, first_pin, last_pin) {
for (uint8_t i = first_pin; i <= last_pin; ++i) {
pin_t pin = GET_PIN_MAP_PIN_M43(i);
if (!VALID_PIN(pin)) continue;
if (M43_NEVER_TOUCH(i) || (!ignore_protection && pin_is_protected(pin))) continue;
@@ -371,7 +371,7 @@ void GcodeSuite::M43() {
#endif
for (;;) {
LOOP_S_LE_N(i, first_pin, last_pin) {
for (uint8_t i = first_pin; i <= last_pin; ++i) {
const pin_t pin = GET_PIN_MAP_PIN_M43(i);
if (!VALID_PIN(pin)) continue;
if (M43_NEVER_TOUCH(i) || (!ignore_protection && pin_is_protected(pin))) continue;
@@ -400,7 +400,7 @@ void GcodeSuite::M43() {
}
else {
// Report current state of selected pin(s)
LOOP_S_LE_N(i, first_pin, last_pin) {
for (uint8_t i = first_pin; i <= last_pin; ++i) {
const pin_t pin = GET_PIN_MAP_PIN_M43(i);
if (VALID_PIN(pin)) report_pin_state_extended(pin, ignore_protection, true);
}