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

@ -459,7 +459,7 @@ void _O2 Endstops::report_states() {
#endif
#if HAS_FILAMENT_SENSOR
#if NUM_RUNOUT_SENSORS == 1
print_es_state(READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_INVERTING, PSTR(STR_FILAMENT_RUNOUT_SENSOR));
print_es_state(READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE, PSTR(STR_FILAMENT_RUNOUT_SENSOR));
#else
#define _CASE_RUNOUT(N) case N: pin = FIL_RUNOUT##N##_PIN; break;
LOOP_S_LE_N(i, 1, NUM_RUNOUT_SENSORS) {
@ -470,7 +470,7 @@ void _O2 Endstops::report_states() {
}
SERIAL_ECHOPGM(STR_FILAMENT_RUNOUT_SENSOR);
if (i > 1) SERIAL_CHAR(' ', '0' + i);
print_es_state(extDigitalRead(pin) != FIL_RUNOUT_INVERTING);
print_es_state(extDigitalRead(pin) != FIL_RUNOUT_STATE);
}
#undef _CASE_RUNOUT
#endif