Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression introduced in 3.13.0 where mFilamentPrompt menu times out after 30 seconds #4728

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 47 additions & 48 deletions Firmware/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1813,60 +1813,59 @@ void lcd_print_target_temps_first_line() {
}
}

static void mFilamentPrompt()
{
lcd_print_target_temps_first_line();
lcd_puts_at_P(0,1, _T(MSG_PRESS_KNOB));
lcd_set_cursor(0,2);
switch(eFilamentAction)
{
case FilamentAction::Load:
case FilamentAction::AutoLoad:
case FilamentAction::MmuLoad:
case FilamentAction::MmuLoadingTest:
lcd_puts_P(_T(MSG_TO_LOAD_FIL));
break;
case FilamentAction::UnLoad:
case FilamentAction::MmuUnLoad:
lcd_puts_P(_T(MSG_TO_UNLOAD_FIL));
break;
case FilamentAction::MmuEject:
case FilamentAction::MmuCut:
case FilamentAction::None:
case FilamentAction::Preheat:
case FilamentAction::Lay1Cal:
break;
}
static void mFilamentPrompt() {
lcd_timeoutToStatus.stop();
lcd_print_target_temps_first_line();
lcd_puts_at_P(0,1, _T(MSG_PRESS_KNOB));
lcd_set_cursor(0,2);
switch(eFilamentAction) {
case FilamentAction::Load:
case FilamentAction::AutoLoad:
case FilamentAction::MmuLoad:
case FilamentAction::MmuLoadingTest:
lcd_puts_P(_T(MSG_TO_LOAD_FIL));
break;
case FilamentAction::UnLoad:
case FilamentAction::MmuUnLoad:
lcd_puts_P(_T(MSG_TO_UNLOAD_FIL));
break;
case FilamentAction::MmuEject:
case FilamentAction::MmuCut:
case FilamentAction::None:
case FilamentAction::Preheat:
case FilamentAction::Lay1Cal:
break;
}

if(lcd_clicked()
#ifdef FILAMENT_SENSOR
/// @todo leptun - add this as a specific retest item
|| (((eFilamentAction == FilamentAction::Load) || (eFilamentAction == FilamentAction::AutoLoad)) && fsensor.getFilamentLoadEvent())
#endif //FILAMENT_SENSOR
) {
menu_back(bFilamentPreheatState ? 2 : 3);
switch(eFilamentAction)
{
case FilamentAction::AutoLoad:
// loading no longer cancellable
eFilamentAction = FilamentAction::Load;
// FALLTHRU
case FilamentAction::Load:
enquecommand_P(MSG_M701); // load filament
break;
case FilamentAction::UnLoad:
enquecommand_P(MSG_M702); // unload filament
break;
case FilamentAction::MmuLoad:
case FilamentAction::MmuLoadingTest:
case FilamentAction::MmuUnLoad:
case FilamentAction::MmuEject:
case FilamentAction::MmuCut:
case FilamentAction::None:
case FilamentAction::Preheat:
case FilamentAction::Lay1Cal:
break;
}
}
menu_back(bFilamentPreheatState ? 2 : 3);
switch(eFilamentAction) {
case FilamentAction::AutoLoad:
// loading no longer cancellable
eFilamentAction = FilamentAction::Load;
[[fallthrough]];
case FilamentAction::Load:
enquecommand_P(MSG_M701); // load filament
break;
case FilamentAction::UnLoad:
enquecommand_P(MSG_M702); // unload filament
break;
case FilamentAction::MmuLoad:
case FilamentAction::MmuLoadingTest:
case FilamentAction::MmuUnLoad:
case FilamentAction::MmuEject:
case FilamentAction::MmuCut:
case FilamentAction::None:
case FilamentAction::Preheat:
case FilamentAction::Lay1Cal:
break;
}
}
}

static void setFilamentAction(FilamentAction action) {
Expand Down
Loading