From f52cba6aff5e8e3675070a965e8b74adc810d728 Mon Sep 17 00:00:00 2001 From: Marcio T Date: Sun, 28 Feb 2021 19:52:59 -0700 Subject: [PATCH] Minor FTDI EVE Touch UI fixes (#21232) --- Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp | 2 +- .../ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp | 2 +- .../ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.h | 2 +- .../ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.cpp | 2 +- .../ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp | 5 ++--- .../src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp | 1 + 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp index 0fef87b64..6cbc53411 100644 --- a/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp @@ -20,7 +20,7 @@ * */ -#include "../../../../inc/MarlinConfigPre.h" +#include "../../../../../inc/MarlinConfigPre.h" #if ENABLED(DGUS_LCD_UI_MKS) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp index 8b87c4ae4..d9c01366b 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp @@ -187,7 +187,7 @@ bool LoadChocolateScreen::onTouchHeld(uint8_t tag) { break; } case 3: { - if (get_chocolate_fill_level() > 0.9) { + if (get_chocolate_fill_level() > 0.75) { mydata.repeat_tag = 0; return false; } diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.h index 582a62fe0..819464495 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.h +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.h @@ -32,12 +32,12 @@ struct LoadChocolateScreenData { class LoadChocolateScreen : public BaseScreen, public CachedScreen { private: - static void setManualFeedrateAndIncrement(float feedrate_mm_s, float &increment); static void draw_syringe(draw_mode_t what); static void draw_arrows(draw_mode_t what); static void draw_buttons(draw_mode_t what); static void draw_text(draw_mode_t what); public: + static void setManualFeedrateAndIncrement(float feedrate_mm_s, float &increment); static void onEntry(); static void onIdle(); static void onRedraw(draw_mode_t); diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.cpp index d199b492e..2621ef64f 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.cpp @@ -34,7 +34,7 @@ constexpr static MoveAxisScreenData &mydata = screen_data.MoveAxisScreen; void MoveEScreen::onRedraw(draw_mode_t what) { widgets_t w(what); - w.precision(1); + w.precision(1, DEFAULT_MIDRANGE); w.units(GET_TEXT_F(MSG_UNITS_MM)); w.heading( GET_TEXT_F(MSG_E_MOVE)); w.color(Theme::e_axis); diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp index 7caa9c794..5a0fe485f 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp @@ -235,7 +235,7 @@ bool StatusScreen::onTouchStart(uint8_t) { bool StatusScreen::onTouchEnd(uint8_t tag) { switch (tag) { - case 1: SpinnerDialogBox::enqueueAndWait_P(F("G0 X0 Y0")); break; + case 1: SpinnerDialogBox::enqueueAndWait_P(F("G28 O\nG27")); break; case 2: GOTO_SCREEN(LoadChocolateScreen); break; case 3: GOTO_SCREEN(PreheatMenu); break; case 4: GOTO_SCREEN(MainMenu); break; @@ -274,8 +274,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) { bool StatusScreen::onTouchHeld(uint8_t tag) { if (tag == 8 && !ExtUI::isMoving()) { - increment = 0.05; - MoveAxisScreen::setManualFeedrate(E0, increment); + LoadChocolateScreen::setManualFeedrateAndIncrement(1, increment); UI_INCREMENT(AxisPosition_mm, E0); current_screen.onRefresh(); } diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp index 2c9d88117..889ed734c 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp +++ b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp @@ -100,6 +100,7 @@ SCREEN_TABLE { DECL_SCREEN_IF_INCLUDED(FTDI_BIO_CONFIRMOME_E) DECL_SCREEN_IF_INCLUDED(FTDI_COCOA_STATUS_SCREEN) DECL_SCREEN_IF_INCLUDED(FTDI_COCOA_MAIN_MENU) + DECL_SCREEN_IF_INCLUDED(FTDI_COCOA_ADVANCED_SETTINGS_MENU) DECL_SCREEN_IF_INCLUDED(FTDI_COCOA_PREHEAT_MENU) DECL_SCREEN_IF_INCLUDED(FTDI_COCOA_PREHEAT_SCREEN) DECL_SCREEN_IF_INCLUDED(FTDI_COCOA_UNLOAD_CARTRIDGE_SCREEN)