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.
This commit is contained in:
parent
9bbe9455cf
commit
d03c3980de
|
@ -36,8 +36,15 @@ void ConfirmUserRequestAlertBox::onRedraw(draw_mode_t mode) {
|
||||||
bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) {
|
bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) {
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case 1:
|
case 1:
|
||||||
ExtUI::setUserConfirmed();
|
if (ExtUI::isPrintingPaused()) {
|
||||||
GOTO_PREVIOUS();
|
// The TuneMenu will call ExtUI::setUserConfirmed()
|
||||||
|
GOTO_SCREEN(TuneMenu);
|
||||||
|
current_screen.forget();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ExtUI::setUserConfirmed();
|
||||||
|
GOTO_PREVIOUS();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
case 2: GOTO_PREVIOUS(); return true;
|
case 2: GOTO_PREVIOUS(); return true;
|
||||||
default: return false;
|
default: return false;
|
||||||
|
|
|
@ -143,7 +143,9 @@ void TuneMenu::pausePrint() {
|
||||||
|
|
||||||
void TuneMenu::resumePrint() {
|
void TuneMenu::resumePrint() {
|
||||||
sound.play(twinkle, PLAY_ASYNCHRONOUS);
|
sound.play(twinkle, PLAY_ASYNCHRONOUS);
|
||||||
if (ExtUI::isPrintingFromMedia())
|
if (ExtUI::awaitingUserConfirm())
|
||||||
|
ExtUI::setUserConfirmed();
|
||||||
|
else if (ExtUI::isPrintingFromMedia())
|
||||||
ExtUI::resumePrint();
|
ExtUI::resumePrint();
|
||||||
#ifdef ACTION_ON_RESUME
|
#ifdef ACTION_ON_RESUME
|
||||||
else host_action_resume();
|
else host_action_resume();
|
||||||
|
|
|
@ -943,6 +943,10 @@ namespace ExtUI {
|
||||||
feedrate_percentage = constrain(value, 10, 500);
|
feedrate_percentage = constrain(value, 10, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool awaitingUserConfirm() {
|
||||||
|
return wait_for_user;
|
||||||
|
}
|
||||||
|
|
||||||
void setUserConfirmed() {
|
void setUserConfirmed() {
|
||||||
TERN_(HAS_RESUME_CONTINUE, wait_for_user = false);
|
TERN_(HAS_RESUME_CONTINUE, wait_for_user = false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,6 +197,7 @@ namespace ExtUI {
|
||||||
void setTravelAcceleration_mm_s2(const float);
|
void setTravelAcceleration_mm_s2(const float);
|
||||||
void setFeedrate_percent(const float);
|
void setFeedrate_percent(const float);
|
||||||
void setFlow_percent(const int16_t, const extruder_t);
|
void setFlow_percent(const int16_t, const extruder_t);
|
||||||
|
bool awaitingUserConfirm();
|
||||||
void setUserConfirmed();
|
void setUserConfirmed();
|
||||||
|
|
||||||
#if ENABLED(LIN_ADVANCE)
|
#if ENABLED(LIN_ADVANCE)
|
||||||
|
|
Loading…
Reference in a new issue