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
d03c3980de
  1. 11
      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

11
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) {
switch (tag) {
case 1:
ExtUI::setUserConfirmed();
GOTO_PREVIOUS();
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;

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

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

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

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

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

@ -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