Skip to content

Commit

Permalink
🩹 Fix runout state in menu (MarlinFirmware#26394)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and eoyilmaz committed Nov 21, 2023
1 parent a58e2ea commit 23732d2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Marlin/src/lcd/menu/menu_filament.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,18 +250,21 @@ static FSTR_P pause_header() {
}while(0)

void menu_pause_option() {
#if HAS_FILAMENT_SENSOR
const bool still_out = runout.filament_ran_out;
#else
constexpr bool still_out = false;
#endif

START_MENU();
#if LCD_HEIGHT > 2
STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER);
#endif
ACTION_ITEM(MSG_FILAMENT_CHANGE_OPTION_PURGE, []{ pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; });

#if HAS_FILAMENT_SENSOR
const bool still_out = runout.filament_ran_out;
if (still_out)
EDIT_ITEM(bool, MSG_RUNOUT_SENSOR, &runout.enabled, runout.reset);
#else
constexpr bool still_out = false;
#endif

if (!still_out)
Expand Down

0 comments on commit 23732d2

Please sign in to comment.