Browse Source

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.
vanilla_fb_2.0.x
Marcio Teixeira 4 years ago
committed by Scott Lahteine
parent
commit
0364ae4908
  1. 7
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.cpp
  2. 4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp
  3. 4
      Marlin/src/lcd/extui/ui_api.cpp
  4. 1
      Marlin/src/lcd/extui/ui_api.h

7
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.cpp

@ -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:
if (ExtUI::isPrintingPaused()) {
// The TuneMenu will call ExtUI::setUserConfirmed()
GOTO_SCREEN(TuneMenu);
current_screen.forget();
}
else {
ExtUI::setUserConfirmed(); ExtUI::setUserConfirmed();
GOTO_PREVIOUS(); GOTO_PREVIOUS();
}
return true; return true;
case 2: GOTO_PREVIOUS(); return true; case 2: GOTO_PREVIOUS(); return true;
default: return false; default: return false;

4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp

@ -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();

4
Marlin/src/lcd/extui/ui_api.cpp

@ -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);
} }

1
Marlin/src/lcd/extui/ui_api.h

@ -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…
Cancel
Save