Просмотр исходного кода

Fixes to FTDI Touch UI (#19134)

- Fix unused variable warning
- Fix for filament runout sound
- Fix for developer menu access
- Fix compilation error when using CALIBRATION_GCODE
- Remove material labels in change filament screen
- Add decimals to status screen Z coordinate
- Add more descriptive message on heater timeout
Marcio Teixeira 4 лет назад
Родитель
Сommit
b07dd44ec2

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h Просмотреть файл

@@ -144,8 +144,8 @@ class UIScreen {
144 144
     static bool onTouchEnd(uint8_t)    {return true;}
145 145
 };
146 146
 
147
-#define PUSH_SCREEN(screen)   current_screen.push(screen::onRedraw);
148
-#define GOTO_SCREEN(screen)   current_screen.goTo(screen::onRedraw);
147
+#define PUSH_SCREEN(screen)   current_screen.push(screen::onRedraw)
148
+#define GOTO_SCREEN(screen)   current_screen.goTo(screen::onRedraw)
149 149
 #define GOTO_PREVIOUS()       current_screen.goBack();
150 150
 #define AT_SCREEN(screen)     (current_screen.getType() == current_screen.lookupScreen(screen::onRedraw))
151 151
 #define IS_PARENT_SCREEN(screen) (current_screen.peek() == current_screen.lookupScreen(screen::onRedraw))

+ 0
- 3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/language/language_en.h Просмотреть файл

@@ -91,9 +91,6 @@ namespace Language_en {
91 91
   PROGMEM Language_Str MSG_UNITS_STEP_MM            = u8"st/mm";
92 92
   PROGMEM Language_Str MSG_UNITS_PERCENT            = u8"%";
93 93
   PROGMEM Language_Str MSG_UNITS_C                  = DEGREE_SIGN u8"C";
94
-  PROGMEM Language_Str MSG_MATERIAL_PLA             = u8"PLA";
95
-  PROGMEM Language_Str MSG_MATERIAL_ABS             = u8"ABS";
96
-  PROGMEM Language_Str MSG_MATERIAL_HIGH_TEMP       = u8"High";
97 94
   PROGMEM Language_Str MSG_IDLE                     = u8"idle";
98 95
   PROGMEM Language_Str MSG_SET_MAXIMUM              = u8"Set Maximum";
99 96
   PROGMEM Language_Str MSG_PRINT_SPEED              = u8"Print Speed";

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/marlin_events.cpp Просмотреть файл

@@ -92,7 +92,7 @@ namespace ExtUI {
92 92
     char lcd_msg[30];
93 93
     sprintf_P(lcd_msg, PSTR("Extruder %d Filament Error"), extruder + 1);
94 94
     StatusScreen::setStatusMessage(lcd_msg);
95
-    InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED);
95
+    InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED, FTDI::PLAY_SYNCHRONOUS);
96 96
   }
97 97
 
98 98
   void onFactoryReset() {

+ 2
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/about_screen.cpp Просмотреть файл

@@ -80,6 +80,7 @@ void AboutScreen::onRedraw(draw_mode_t) {
80 80
     #endif
81 81
     , OPT_CENTER, font_xlarge
82 82
   );
83
+  cmd.tag(3);
83 84
   draw_text_box(cmd, FW_VERS_POS,
84 85
   #ifdef TOUCH_UI_VERSION
85 86
     F(TOUCH_UI_VERSION)
@@ -87,6 +88,7 @@ void AboutScreen::onRedraw(draw_mode_t) {
87 88
     progmem_str(getFirmwareName_str())
88 89
   #endif
89 90
   , OPT_CENTER, font_medium);
91
+  cmd.tag(0);
90 92
   draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium);
91 93
   draw_text_box(cmd, INSET_POS(LICENSE_POS), GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny);
92 94
 

+ 3
- 3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.cpp Просмотреть файл

@@ -207,13 +207,13 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
207 207
     {
208 208
       char str[30];
209 209
 
210
-      format_temp_and_material(str, LOW_TEMP, GET_TEXT(MSG_MATERIAL_PLA));
210
+      format_temp(str, LOW_TEMP);
211 211
       cmd.tag(2) .TOG_STYLE(tog2) .button (BTN_POS(2,6), BTN_SIZE(1,1), str);
212 212
 
213
-      format_temp_and_material(str, MED_TEMP, GET_TEXT(MSG_MATERIAL_ABS));
213
+      format_temp(str, MED_TEMP);
214 214
       cmd.tag(3) .TOG_STYLE(tog3) .button (BTN_POS(2,5), BTN_SIZE(1,1), str);
215 215
 
216
-      format_temp_and_material(str, HIGH_TEMP, GET_TEXT(MSG_MATERIAL_HIGH_TEMP));
216
+      format_temp(str, HIGH_TEMP);
217 217
       cmd.tag(4) .TOG_STYLE(tog4) .button (BTN_POS(2,4), BTN_SIZE(1,1), str);
218 218
     }
219 219
     cmd.colors(normal_btn)

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_auto_calibration_dialog_box.cpp Просмотреть файл

@@ -38,7 +38,7 @@ bool ConfirmAutoCalibrationDialogBox::onTouchEnd(uint8_t tag) {
38 38
   switch (tag) {
39 39
     case 1:
40 40
       GOTO_SCREEN(StatusScreen);
41
-      injectCommands_P(PSTR(CALIBRATION_COMMANDS));
41
+      injectCommands_P(PSTR("G425"));
42 42
       return true;
43 43
     default:
44 44
       return DialogBoxBaseClass::onTouchEnd(tag);

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp Просмотреть файл

@@ -97,7 +97,7 @@ void StatusScreen::draw_axis_position(draw_mode_t what) {
97 97
       strcpy_P(y_str, PSTR("?"));
98 98
 
99 99
     if (isAxisPositionKnown(Z))
100
-      format_position(z_str, getAxisPosition_mm(Z));
100
+      format_position(z_str, getAxisPosition_mm(Z), 2);
101 101
     else
102 102
       strcpy_P(z_str, PSTR("?"));
103 103
 

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/string_format.cpp Просмотреть файл

@@ -61,8 +61,8 @@ void format_temp_and_material(char *str, float t1, const char *material) {
61 61
 /**
62 62
  * Formats a position value (e.g. "10 mm")
63 63
  */
64
-void format_position(char *str, float p) {
65
-  dtostrf(p, 5, 1, str);
64
+void format_position(char *str, float p, uint8_t decimals) {
65
+  dtostrf(p, 4 + decimals, decimals, str);
66 66
   strcat_P(str, PSTR(" "));
67 67
   strcat_P(str, GET_TEXT(MSG_UNITS_MM));
68 68
 }

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/string_format.h Просмотреть файл

@@ -25,5 +25,5 @@ void format_temp(char *str, float t1);
25 25
 void format_temp_and_idle(char *str, float t1);
26 26
 void format_temp_and_temp(char *str, float t1, float t2);
27 27
 void format_temp_and_material(char *str, float t1, const char *material);
28
-void format_position(char *str, float p);
28
+void format_position(char *str, float p, uint8_t decimals = 1);
29 29
 void format_position(char *str, float x, float y, float z);

+ 5
- 1
Marlin/src/lcd/language/language_en.h Просмотреть файл

@@ -647,7 +647,11 @@ namespace Language_en {
647 647
 
648 648
   PROGMEM Language_Str MSG_LEVEL_X_AXIS                    = _UxGT("Level X Axis");
649 649
   PROGMEM Language_Str MSG_AUTO_CALIBRATE                  = _UxGT("Auto Calibrate");
650
-  PROGMEM Language_Str MSG_HEATER_TIMEOUT                  = _UxGT("Heater Timeout");
650
+  #if ENABLED(TOUCH_UI_FTDI_EVE)
651
+    PROGMEM Language_Str MSG_HEATER_TIMEOUT                = _UxGT("Idle timeout, temperature decreased. Press Okay to reheat and again to resume.");
652
+  #else
653
+    PROGMEM Language_Str MSG_HEATER_TIMEOUT                = _UxGT("Heater Timeout");
654
+  #endif
651 655
   PROGMEM Language_Str MSG_REHEAT                          = _UxGT("Reheat");
652 656
   PROGMEM Language_Str MSG_REHEATING                       = _UxGT("Reheating...");
653 657
 }

Загрузка…
Отмена
Сохранить