🩹 Fix runout state in menu (#26394)

Fixes #26386
This commit is contained in:
Scott Lahteine 2023-11-16 16:05:31 -06:00 committed by GitHub
parent 3e8a5b6151
commit 7fe07dc4ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -250,6 +250,12 @@ 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);
@ -257,11 +263,8 @@ void menu_pause_option() {
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)