From cd88ea2106ccfa7693bb14001aae5ec3f270bea4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 27 Nov 2018 16:41:26 -0600 Subject: [PATCH] Fix runout debug output Followup to #12544 --- Marlin/src/feature/runout.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index 55bde42fa3..f7b1dd0f93 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -186,8 +186,12 @@ class FilamentSensorBase { old_state = new_state; #ifdef FILAMENT_RUNOUT_SENSOR_DEBUG - for (uint8_t e = 0; e < EXTRUDERS; e++) - if (TEST(change, e)) SERIAL_PROTOCOLLNPAIR("Motion detected T", e); + if (change) { + SERIAL_PROTOCOLPGM("Motion detected:"); + for (uint8_t e = 0; e < NUM_RUNOUT_SENSORS; e++) + if (TEST(change, e)) { SERIAL_CHAR(' '); SERIAL_CHAR('0' + e); } + SERIAL_EOL(); + } #endif motion_detected |= change;