Filament Runout Inverting => State (#18537)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Robby Candra
2020-07-06 05:42:19 +07:00
committed by GitHub
parent c8f7aceb20
commit c02451b602
7 changed files with 19 additions and 8 deletions

View File

@@ -161,7 +161,7 @@ uint8_t MMU2::get_current_tool() {
}
#if EITHER(PRUSA_MMU2_S_MODE, MMU_EXTRUDER_SENSOR)
#define FILAMENT_PRESENT() (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_INVERTING)
#define FILAMENT_PRESENT() (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE)
#endif
void MMU2::mmu_loop() {

View File

@@ -148,7 +148,7 @@ class FilamentSensorBase {
// Return a bitmask of runout flag states (1 bits always indicates runout)
static inline uint8_t poll_runout_states() {
return poll_runout_pins() ^ uint8_t(TERN(FIL_RUNOUT_INVERTING, 0, _BV(NUM_RUNOUT_SENSORS) - 1));
return poll_runout_pins() ^ uint8_t(TERN(FIL_RUNOUT_STATE, 0, _BV(NUM_RUNOUT_SENSORS) - 1));
}
};