try REPEAT

This commit is contained in:
Scott Lahteine
2022-04-18 22:35:23 -05:00
committed by InsanityAutomation
parent 0df5153222
commit 60360658d2
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -210,7 +210,6 @@ class FilamentSensorBase {
#undef _INIT_RUNOUT_PIN
#undef INIT_RUNOUT_PIN
}
// Return a bitmask of runout pin states
static uint8_t poll_runout_pins() {
@@ -221,7 +220,7 @@ class FilamentSensorBase {
// Return a bitmask of runout flag states (1 bits always indicates runout)
static uint8_t poll_runout_states() {
#define _OR_INVERT(N) | (runout.out_state(N-1) ? 0 : _BV(N-1))
#define _OR_INVERT(N) | (runout.out_state((N) - 1) ? 0 : _BV((N) - 1))
return poll_runout_pins() ^ uint8_t(0 REPEAT_1(NUM_RUNOUT_SENSORS, _OR_INVERT));
#undef _OR_INVERT
}
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm