Improve filament runout handling in FTDI EVE Touch UI

- On filament runout, take the user to the tune menu where they can initiate a filament change or resume the print.
2.0.x
Marcio Teixeira 4 years ago committed by Scott Lahteine
parent 9bbe9455cf
commit d03c3980de

@ -36,8 +36,15 @@ void ConfirmUserRequestAlertBox::onRedraw(draw_mode_t mode) {
bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1:
if (ExtUI::isPrintingPaused()) {
// The TuneMenu will call ExtUI::setUserConfirmed()
GOTO_SCREEN(TuneMenu);
current_screen.forget();
}
else {
ExtUI::setUserConfirmed();
GOTO_PREVIOUS();
}
return true;
case 2: GOTO_PREVIOUS(); return true;
default: return false;

@ -143,7 +143,9 @@ void TuneMenu::pausePrint() {
void TuneMenu::resumePrint() {
sound.play(twinkle, PLAY_ASYNCHRONOUS);
if (ExtUI::isPrintingFromMedia())
if (ExtUI::awaitingUserConfirm())
ExtUI::setUserConfirmed();
else if (ExtUI::isPrintingFromMedia())
ExtUI::resumePrint();
#ifdef ACTION_ON_RESUME
else host_action_resume();

@ -943,6 +943,10 @@ namespace ExtUI {
feedrate_percentage = constrain(value, 10, 500);
}
bool awaitingUserConfirm() {
return wait_for_user;
}
void setUserConfirmed() {
TERN_(HAS_RESUME_CONTINUE, wait_for_user = false);
}

@ -197,6 +197,7 @@ namespace ExtUI {
void setTravelAcceleration_mm_s2(const float);
void setFeedrate_percent(const float);
void setFlow_percent(const int16_t, const extruder_t);
bool awaitingUserConfirm();
void setUserConfirmed();
#if ENABLED(LIN_ADVANCE)

Loading…
Cancel
Save