浏览代码

🎨 Fix and improve FTDI Eve Touch UI (#22223)

Marcio T 4 年前
父节点
当前提交
a37cc76cb9
没有帐户链接到提交者的电子邮件

+ 105
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/screens.h 查看文件

1
+/*************
2
+ * screens.h *
3
+ *************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+/********************************* DL CACHE SLOTS ******************************/
24
+
25
+// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This
26
+// is done using the CLCD::DLCache class, which takes a unique ID for each
27
+// cache location. These IDs are defined here:
28
+
29
+enum {
30
+  STATUS_SCREEN_CACHE,
31
+  MENU_SCREEN_CACHE,
32
+  TUNE_SCREEN_CACHE,
33
+  ALERT_BOX_CACHE,
34
+  SPINNER_CACHE,
35
+  ADVANCED_SETTINGS_SCREEN_CACHE,
36
+  TEMPERATURE_SCREEN_CACHE,
37
+  STEPS_SCREEN_CACHE,
38
+  MAX_FEEDRATE_SCREEN_CACHE,
39
+  MAX_VELOCITY_SCREEN_CACHE,
40
+  MAX_ACCELERATION_SCREEN_CACHE,
41
+  DEFAULT_ACCELERATION_SCREEN_CACHE,
42
+  FLOW_PERCENT_SCREEN_CACHE,
43
+  ZOFFSET_SCREEN_CACHE,
44
+  STEPPER_CURRENT_SCREEN_CACHE,
45
+  STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE,
46
+  PRINTING_SCREEN_CACHE,
47
+  FILES_SCREEN_CACHE,
48
+  INTERFACE_SETTINGS_SCREEN_CACHE,
49
+  INTERFACE_SOUNDS_SCREEN_CACHE,
50
+  LOCK_SCREEN_CACHE,
51
+  DISPLAY_TIMINGS_SCREEN_CACHE
52
+};
53
+
54
+// To save MCU RAM, the status message is "baked" in to the status screen
55
+// cache, so we reserve a large chunk of memory for the DL cache
56
+
57
+#define STATUS_SCREEN_DL_SIZE        4096
58
+#define ALERT_BOX_DL_SIZE            3072
59
+#define SPINNER_DL_SIZE              3072
60
+#define FILE_SCREEN_DL_SIZE          4160
61
+#define PRINTING_SCREEN_DL_SIZE      2048
62
+
63
+/************************* MENU SCREEN DECLARATIONS *************************/
64
+
65
+#include "../generic/base_screen.h"
66
+#include "../generic/base_numeric_adjustment_screen.h"
67
+#include "../generic/dialog_box_base_class.h"
68
+#include "../generic/boot_screen.h"
69
+#include "../generic/about_screen.h"
70
+#include "../generic/kill_screen.h"
71
+#include "../generic/alert_dialog_box.h"
72
+#include "../generic/spinner_dialog_box.h"
73
+#include "../generic/restore_failsafe_dialog_box.h"
74
+#include "../generic/save_settings_dialog_box.h"
75
+#include "../generic/confirm_start_print_dialog_box.h"
76
+#include "../generic/confirm_abort_print_dialog_box.h"
77
+#include "../generic/confirm_user_request_alert_box.h"
78
+#include "../generic/touch_calibration_screen.h"
79
+#include "../generic/move_axis_screen.h"
80
+#include "../generic/steps_screen.h"
81
+#include "../generic/feedrate_percent_screen.h"
82
+#include "../generic/max_velocity_screen.h"
83
+#include "../generic/max_acceleration_screen.h"
84
+#include "../generic/default_acceleration_screen.h"
85
+#include "../generic/temperature_screen.h"
86
+#include "../generic/interface_sounds_screen.h"
87
+#include "../generic/interface_settings_screen.h"
88
+#include "../generic/lock_screen.h"
89
+#include "../generic/endstop_state_screen.h"
90
+#include "../generic/display_tuning_screen.h"
91
+#include "../generic/media_player_screen.h"
92
+#include "../generic/statistics_screen.h"
93
+#include "../generic/stepper_current_screen.h"
94
+#include "../generic/stepper_bump_sensitivity_screen.h"
95
+#include "../generic/leveling_menu.h"
96
+#include "../generic/z_offset_screen.h"
97
+#include "../generic/files_screen.h"
98
+
99
+#include "bio_status_screen.h"
100
+#include "bio_main_menu.h"
101
+#include "bio_tune_menu.h"
102
+#include "bio_advanced_settings.h"
103
+#include "bio_printing_dialog_box.h"
104
+#include "bio_confirm_home_xyz.h"
105
+#include "bio_confirm_home_e.h"

+ 0
- 10
Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp 查看文件

84
 void PreheatTimerScreen::draw_adjuster(draw_mode_t what, uint8_t tag, progmem_str label, float value, int16_t x, int16_t y, int16_t w, int16_t h) {
84
 void PreheatTimerScreen::draw_adjuster(draw_mode_t what, uint8_t tag, progmem_str label, float value, int16_t x, int16_t y, int16_t w, int16_t h) {
85
     #define SUB_COLS          9
85
     #define SUB_COLS          9
86
     #define SUB_ROWS          2
86
     #define SUB_ROWS          2
87
-    #define SUB_GRID_W(W)     ((W)*w/SUB_COLS)
88
-    #define SUB_GRID_H(H)     ((H)*h/SUB_ROWS)
89
-    #define SUB_GRID_X(X)     (SUB_GRID_W((X)-1) + x)
90
-    #define SUB_GRID_Y(Y)     (SUB_GRID_H((Y)-1) + y)
91
-    #define SUB_X(X)          (SUB_GRID_X(X) + MARGIN_L)
92
-    #define SUB_Y(Y)          (SUB_GRID_Y(Y) + MARGIN_T)
93
-    #define SUB_W(W)          (SUB_GRID_W(W) - MARGIN_L - MARGIN_R)
94
-    #define SUB_H(H)          (SUB_GRID_H(H) - MARGIN_T - MARGIN_B)
95
-    #define SUB_POS(X,Y)      SUB_X(X), SUB_Y(Y)
96
-    #define SUB_SIZE(W,H)     SUB_W(W), SUB_H(H)
97
 
87
 
98
     CommandProcessor cmd;
88
     CommandProcessor cmd;
99
     cmd.tag(0)
89
     cmd.tag(0)

+ 135
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h 查看文件

1
+/*************
2
+ * screens.h *
3
+ *************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+
26
+/********************************* DL CACHE SLOTS ******************************/
27
+
28
+// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This
29
+// is done using the CLCD::DLCache class, which takes a unique ID for each
30
+// cache location. These IDs are defined here:
31
+
32
+enum {
33
+  STATUS_SCREEN_CACHE,
34
+  MENU_SCREEN_CACHE,
35
+  TUNE_SCREEN_CACHE,
36
+  ALERT_BOX_CACHE,
37
+  SPINNER_CACHE,
38
+  ADVANCED_SETTINGS_SCREEN_CACHE,
39
+  MOVE_AXIS_SCREEN_CACHE,
40
+  TEMPERATURE_SCREEN_CACHE,
41
+  STEPS_SCREEN_CACHE,
42
+  MAX_FEEDRATE_SCREEN_CACHE,
43
+  MAX_VELOCITY_SCREEN_CACHE,
44
+  MAX_ACCELERATION_SCREEN_CACHE,
45
+  DEFAULT_ACCELERATION_SCREEN_CACHE,
46
+  FLOW_PERCENT_SCREEN_CACHE,
47
+  LEVELING_SCREEN_CACHE,
48
+  ZOFFSET_SCREEN_CACHE,
49
+  BED_MESH_VIEW_SCREEN_CACHE,
50
+  BED_MESH_EDIT_SCREEN_CACHE,
51
+  STEPPER_CURRENT_SCREEN_CACHE,
52
+  #if HAS_JUNCTION_DEVIATION
53
+    JUNC_DEV_SCREEN_CACHE,
54
+  #else
55
+    JERK_SCREEN_CACHE,
56
+  #endif
57
+  CASE_LIGHT_SCREEN_CACHE,
58
+  FILAMENT_MENU_CACHE,
59
+  LINEAR_ADVANCE_SCREEN_CACHE,
60
+  PREHEAT_MENU_CACHE,
61
+  PREHEAT_TIMER_SCREEN_CACHE,
62
+  LOAD_CHOCOLATE_SCREEN_CACHE,
63
+  MOVE_XYZ_SCREEN_CACHE,
64
+  MOVE_E_SCREEN_CACHE,
65
+  FILES_SCREEN_CACHE,
66
+  INTERFACE_SETTINGS_SCREEN_CACHE,
67
+  INTERFACE_SOUNDS_SCREEN_CACHE,
68
+  LOCK_SCREEN_CACHE,
69
+  DISPLAY_TIMINGS_SCREEN_CACHE
70
+};
71
+
72
+// To save MCU RAM, the status message is "baked" in to the status screen
73
+// cache, so we reserve a large chunk of memory for the DL cache
74
+
75
+#define STATUS_SCREEN_DL_SIZE        4096
76
+#define ALERT_BOX_DL_SIZE            3072
77
+#define SPINNER_DL_SIZE              3072
78
+#define FILE_SCREEN_DL_SIZE          4160
79
+#define PRINTING_SCREEN_DL_SIZE      2048
80
+
81
+/************************* MENU SCREEN DECLARATIONS *************************/
82
+
83
+#include "../generic/base_screen.h"
84
+#include "../generic/base_numeric_adjustment_screen.h"
85
+#include "../generic/dialog_box_base_class.h"
86
+#include "../generic/boot_screen.h"
87
+#include "../generic/about_screen.h"
88
+#include "../generic/kill_screen.h"
89
+#include "../generic/alert_dialog_box.h"
90
+#include "../generic/spinner_dialog_box.h"
91
+#include "../generic/restore_failsafe_dialog_box.h"
92
+#include "../generic/save_settings_dialog_box.h"
93
+#include "../generic/confirm_start_print_dialog_box.h"
94
+#include "../generic/confirm_abort_print_dialog_box.h"
95
+#include "../generic/confirm_user_request_alert_box.h"
96
+#include "../generic/touch_calibration_screen.h"
97
+#include "../generic/move_axis_screen.h"
98
+#include "../generic/steps_screen.h"
99
+#include "../generic/feedrate_percent_screen.h"
100
+#include "../generic/max_velocity_screen.h"
101
+#include "../generic/max_acceleration_screen.h"
102
+#include "../generic/default_acceleration_screen.h"
103
+#include "../generic/temperature_screen.h"
104
+#include "../generic/interface_sounds_screen.h"
105
+#include "../generic/interface_settings_screen.h"
106
+#include "../generic/lock_screen.h"
107
+#include "../generic/endstop_state_screen.h"
108
+#include "../generic/display_tuning_screen.h"
109
+#include "../generic/statistics_screen.h"
110
+#include "../generic/stepper_current_screen.h"
111
+#include "../generic/leveling_menu.h"
112
+#include "../generic/z_offset_screen.h"
113
+#include "../generic/bed_mesh_base.h"
114
+#include "../generic/bed_mesh_view_screen.h"
115
+#include "../generic/bed_mesh_edit_screen.h"
116
+#include "../generic/case_light_screen.h"
117
+#include "../generic/linear_advance_screen.h"
118
+#include "../generic/files_screen.h"
119
+#include "../generic/move_axis_screen.h"
120
+#include "../generic/flow_percent_screen.h"
121
+#include "../generic/tune_menu.h"
122
+#if HAS_JUNCTION_DEVIATION
123
+  #include "../generic/junction_deviation_screen.h"
124
+#else
125
+  #include "../generic/jerk_screen.h"
126
+#endif
127
+
128
+#include "status_screen.h"
129
+#include "main_menu.h"
130
+#include "advanced_settings_menu.h"
131
+#include "preheat_menu.h"
132
+#include "preheat_screen.h"
133
+#include "load_chocolate.h"
134
+#include "move_xyz_screen.h"
135
+#include "move_e_screen.h"

+ 13
- 14
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp 查看文件

45
   }
45
   }
46
 
46
 
47
   void onMediaInserted() {
47
   void onMediaInserted() {
48
-    if (AT_SCREEN(StatusScreen))
48
+    #if ENABLED(SDSUPPORT)
49
-      StatusScreen::setStatusMessage(GET_TEXT_F(MSG_MEDIA_INSERTED));
49
+      sound.play(media_inserted, PLAY_ASYNCHRONOUS);
50
-    sound.play(media_inserted, PLAY_ASYNCHRONOUS);
50
+      StatusScreen::onMediaInserted();
51
+    #endif
51
   }
52
   }
52
 
53
 
53
   void onMediaRemoved() {
54
   void onMediaRemoved() {
54
-    if (isPrintingFromMedia()) {
55
-      stopPrint();
56
-      InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED);
57
-    }
58
-    else
59
-      sound.play(media_removed, PLAY_ASYNCHRONOUS);
60
-
61
-    if (AT_SCREEN(StatusScreen) || isPrintingFromMedia())
62
-      StatusScreen::setStatusMessage(GET_TEXT_F(MSG_MEDIA_REMOVED));
63
-
64
     #if ENABLED(SDSUPPORT)
55
     #if ENABLED(SDSUPPORT)
65
-      if (AT_SCREEN(FilesScreen)) GOTO_SCREEN(StatusScreen);
56
+      if (isPrintingFromMedia()) {
57
+        stopPrint();
58
+        InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED);
59
+      }
60
+      else
61
+        sound.play(media_removed, PLAY_ASYNCHRONOUS);
62
+
63
+      StatusScreen::onMediaRemoved();
64
+      FilesScreen::onMediaRemoved();
66
     #endif
65
     #endif
67
   }
66
   }
68
 
67
 

+ 8
- 6
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp 查看文件

91
   draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium);
91
   draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium);
92
   draw_text_box(cmd, INSET_POS(LICENSE_POS), GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny);
92
   draw_text_box(cmd, INSET_POS(LICENSE_POS), GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny);
93
 
93
 
94
-  cmd.font(font_medium)
94
+  cmd.font(font_medium);
95
-     .colors(normal_btn)
95
+  #if ENABLED(PRINTCOUNTER) && defined(FTDI_STATISTICS_SCREEN)
96
-     .tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU))
96
+    cmd.colors(normal_btn)
97
-     .colors(action_btn)
97
+       .tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU));
98
+  #endif
99
+  cmd.colors(action_btn)
98
      .tag(1).button(BACK_POS,  GET_TEXT_F(MSG_BACK));
100
      .tag(1).button(BACK_POS,  GET_TEXT_F(MSG_BACK));
99
 }
101
 }
100
 
102
 
101
 bool AboutScreen::onTouchEnd(uint8_t tag) {
103
 bool AboutScreen::onTouchEnd(uint8_t tag) {
102
   switch (tag) {
104
   switch (tag) {
103
     case 1: GOTO_PREVIOUS(); break;
105
     case 1: GOTO_PREVIOUS(); break;
104
-    #if ENABLED(PRINTCOUNTER)
106
+    #if ENABLED(PRINTCOUNTER) && defined(FTDI_STATISTICS_SCREEN)
105
       case 2: GOTO_SCREEN(StatisticsScreen); break;
107
       case 2: GOTO_SCREEN(StatisticsScreen); break;
106
     #endif
108
     #endif
107
-    #if ENABLED(TOUCH_UI_DEVELOPER_MENU)
109
+    #if ENABLED(TOUCH_UI_DEVELOPER_MENU) && defined(FTDI_DEVELOPER_MENU)
108
       case 3: GOTO_SCREEN(DeveloperMenu); break;
110
       case 3: GOTO_SCREEN(DeveloperMenu); break;
109
     #endif
111
     #endif
110
     default: return false;
112
     default: return false;

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.cpp 查看文件

76
 
76
 
77
 /****************** COLOR SCALE ***********************/
77
 /****************** COLOR SCALE ***********************/
78
 
78
 
79
-uint32_t getWarmColor(uint16_t temp, uint16_t cool, uint16_t low, uint16_t med, uint16_t high) {
79
+uint32_t ChangeFilamentScreen::getWarmColor(uint16_t temp, uint16_t cool, uint16_t low, uint16_t med, uint16_t high) {
80
   rgb_t R0, R1, mix;
80
   rgb_t R0, R1, mix;
81
 
81
 
82
   float t;
82
   float t;

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.h 查看文件

38
     static uint8_t getSoftenTemp();
38
     static uint8_t getSoftenTemp();
39
     static ExtUI::extruder_t getExtruder();
39
     static ExtUI::extruder_t getExtruder();
40
     static void drawTempGradient(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
40
     static void drawTempGradient(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
41
-    static uint32_t getTempColor(uint32_t temp);
42
     static void doPurge();
41
     static void doPurge();
43
   public:
42
   public:
43
+    static uint32_t getWarmColor(uint16_t temp, uint16_t cool, uint16_t low, uint16_t med, uint16_t high);
44
     static void onEntry();
44
     static void onEntry();
45
     static void onExit();
45
     static void onExit();
46
     static void onRedraw(draw_mode_t);
46
     static void onRedraw(draw_mode_t);

+ 4
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp 查看文件

262
   #endif
262
   #endif
263
 }
263
 }
264
 
264
 
265
+void FilesScreen::onMediaRemoved() {
266
+  if (AT_SCREEN(FilesScreen)) GOTO_SCREEN(StatusScreen);
267
+}
268
+
265
 #endif // FTDI_FILES_SCREEN
269
 #endif // FTDI_FILES_SCREEN

+ 1
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.h 查看文件

72
     static void onRedraw(draw_mode_t);
72
     static void onRedraw(draw_mode_t);
73
     static bool onTouchEnd(uint8_t tag);
73
     static bool onTouchEnd(uint8_t tag);
74
     static void onIdle();
74
     static void onIdle();
75
+    static void onMediaRemoved();
75
 };
76
 };

+ 27
- 13
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp 查看文件

86
   }
86
   }
87
 
87
 
88
   if (what & FOREGROUND) {
88
   if (what & FOREGROUND) {
89
-    #if ENABLED(TOUCH_UI_PORTRAIT)
89
+    #if defined(FTDI_LOCK_SCREEN) || DISABLED(TOUCH_UI_NO_BOOTSCREEN)
90
-      constexpr uint8_t w = 2;
90
+      #if ENABLED(TOUCH_UI_PORTRAIT)
91
-    #else
91
+        constexpr uint8_t w = 2;
92
-      constexpr uint8_t w = 1;
92
+      #else
93
+        constexpr uint8_t w = 1;
94
+      #endif
93
     #endif
95
     #endif
94
 
96
 
95
     cmd.font(font_medium)
97
     cmd.font(font_medium)
99
        .tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), mydata.brightness, 128)
101
        .tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), mydata.brightness, 128)
100
     #endif
102
     #endif
101
        .tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), mydata.volume,     0xFF)
103
        .tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), mydata.volume,     0xFF)
104
+    #ifdef FTDI_LOCK_SCREEN
102
        .colors(ui_toggle)
105
        .colors(ui_toggle)
103
        .tag(4).toggle2(BTN_POS(3,4), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), LockScreen::is_enabled())
106
        .tag(4).toggle2(BTN_POS(3,4), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), LockScreen::is_enabled())
107
+    #endif
104
     #if DISABLED(TOUCH_UI_NO_BOOTSCREEN)
108
     #if DISABLED(TOUCH_UI_NO_BOOTSCREEN)
105
        .tag(5).toggle2(BTN_POS(3,5), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), UIData::animations_enabled())
109
        .tag(5).toggle2(BTN_POS(3,5), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), UIData::animations_enabled())
106
     #endif
110
     #endif
122
 bool InterfaceSettingsScreen::onTouchEnd(uint8_t tag) {
126
 bool InterfaceSettingsScreen::onTouchEnd(uint8_t tag) {
123
   switch (tag) {
127
   switch (tag) {
124
     case 1: GOTO_PREVIOUS(); return true;
128
     case 1: GOTO_PREVIOUS(); return true;
125
-    case 4:
129
+    #ifdef FTDI_LOCK_SCREEN
126
-      if (!LockScreen::is_enabled())
130
+      case 4:
127
-        LockScreen::enable();
131
+        if (!LockScreen::is_enabled())
128
-      else
132
+          LockScreen::enable();
129
-        LockScreen::disable();
133
+        else
130
-      break;
134
+          LockScreen::disable();
135
+        break;
136
+    #endif
131
     case 5: UIData::enable_animations(!UIData::animations_enabled());; break;
137
     case 5: UIData::enable_animations(!UIData::animations_enabled());; break;
132
     case 6: GOTO_SCREEN(InterfaceSoundsScreen); return true;
138
     case 6: GOTO_SCREEN(InterfaceSoundsScreen); return true;
133
     default:
139
     default:
191
 }
197
 }
192
 
198
 
193
 void InterfaceSettingsScreen::defaultSettings() {
199
 void InterfaceSettingsScreen::defaultSettings() {
194
-  LockScreen::passcode = 0;
200
+  #ifdef FTDI_LOCK_SCREEN
201
+    LockScreen::passcode = 0;
202
+  #endif
195
   SoundPlayer::set_volume(255);
203
   SoundPlayer::set_volume(255);
196
   CLCD::set_brightness(255);
204
   CLCD::set_brightness(255);
197
   UIData::reset_persistent_data();
205
   UIData::reset_persistent_data();
210
 
218
 
211
   persistent_data_t eeprom;
219
   persistent_data_t eeprom;
212
 
220
 
213
-  eeprom.passcode             = LockScreen::passcode;
221
+  #ifdef FTDI_LOCK_SCREEN
222
+    eeprom.passcode           = LockScreen::passcode;
223
+  #else
224
+    eeprom.passcode           = 0;
225
+  #endif
214
   eeprom.sound_volume         = SoundPlayer::get_volume();
226
   eeprom.sound_volume         = SoundPlayer::get_volume();
215
   eeprom.display_brightness   = CLCD::get_brightness();
227
   eeprom.display_brightness   = CLCD::get_brightness();
216
   eeprom.bit_flags            = UIData::get_persistent_data();
228
   eeprom.bit_flags            = UIData::get_persistent_data();
239
 
251
 
240
   SERIAL_ECHOLNPGM("Loading setting from EEPROM");
252
   SERIAL_ECHOLNPGM("Loading setting from EEPROM");
241
 
253
 
242
-  LockScreen::passcode = eeprom.passcode;
254
+  #ifdef FTDI_LOCK_SCREEN
255
+    LockScreen::passcode = eeprom.passcode;
256
+  #endif
243
   SoundPlayer::set_volume(eeprom.sound_volume);
257
   SoundPlayer::set_volume(eeprom.sound_volume);
244
   UIData::set_persistent_data(eeprom.bit_flags);
258
   UIData::set_persistent_data(eeprom.bit_flags);
245
   CLCD::set_brightness(eeprom.display_brightness);
259
   CLCD::set_brightness(eeprom.display_brightness);

+ 224
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h 查看文件

1
+/*************
2
+ * screens.h *
3
+ *************/
4
+
5
+/****************************************************************************
6
+ *   Written By Mark Pelletier  2017 - Aleph Objects, Inc.                  *
7
+ *   Written By Marcio Teixeira 2018 - Aleph Objects, Inc.                  *
8
+ *                                                                          *
9
+ *   This program is free software: you can redistribute it and/or modify   *
10
+ *   it under the terms of the GNU General Public License as published by   *
11
+ *   the Free Software Foundation, either version 3 of the License, or      *
12
+ *   (at your option) any later version.                                    *
13
+ *                                                                          *
14
+ *   This program is distributed in the hope that it will be useful,        *
15
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
16
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
17
+ *   GNU General Public License for more details.                           *
18
+ *                                                                          *
19
+ *   To view a copy of the GNU General Public License, go to the following  *
20
+ *   location: <https://www.gnu.org/licenses/>.                             *
21
+ ****************************************************************************/
22
+
23
+#pragma once
24
+
25
+/********************************* DL CACHE SLOTS ******************************/
26
+
27
+// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This
28
+// is done using the CLCD::DLCache class, which takes a unique ID for each
29
+// cache location. These IDs are defined here:
30
+
31
+enum {
32
+  STATUS_SCREEN_CACHE,
33
+  MENU_SCREEN_CACHE,
34
+  TUNE_SCREEN_CACHE,
35
+  ALERT_BOX_CACHE,
36
+  SPINNER_CACHE,
37
+  ADVANCED_SETTINGS_SCREEN_CACHE,
38
+  MOVE_AXIS_SCREEN_CACHE,
39
+  TEMPERATURE_SCREEN_CACHE,
40
+  STEPS_SCREEN_CACHE,
41
+  MAX_FEEDRATE_SCREEN_CACHE,
42
+  MAX_VELOCITY_SCREEN_CACHE,
43
+  MAX_ACCELERATION_SCREEN_CACHE,
44
+  DEFAULT_ACCELERATION_SCREEN_CACHE,
45
+  FLOW_PERCENT_SCREEN_CACHE,
46
+  #if HAS_LEVELING
47
+    LEVELING_SCREEN_CACHE,
48
+    #if HAS_BED_PROBE
49
+      ZOFFSET_SCREEN_CACHE,
50
+    #endif
51
+    #if HAS_MESH
52
+      BED_MESH_VIEW_SCREEN_CACHE,
53
+      BED_MESH_EDIT_SCREEN_CACHE,
54
+    #endif
55
+  #endif
56
+  #if ENABLED(BABYSTEPPING)
57
+    ADJUST_OFFSETS_SCREEN_CACHE,
58
+  #endif
59
+  #if HAS_TRINAMIC_CONFIG
60
+    STEPPER_CURRENT_SCREEN_CACHE,
61
+    STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE,
62
+  #endif
63
+  #if HAS_MULTI_HOTEND
64
+    NOZZLE_OFFSET_SCREEN_CACHE,
65
+  #endif
66
+  #if ENABLED(BACKLASH_GCODE)
67
+    BACKLASH_COMPENSATION_SCREEN_CACHE,
68
+  #endif
69
+  #if HAS_JUNCTION_DEVIATION
70
+    JUNC_DEV_SCREEN_CACHE,
71
+  #else
72
+    JERK_SCREEN_CACHE,
73
+  #endif
74
+  #if ENABLED(CASE_LIGHT_ENABLE)
75
+    CASE_LIGHT_SCREEN_CACHE,
76
+  #endif
77
+  #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
78
+    FILAMENT_MENU_CACHE,
79
+  #endif
80
+  #if ENABLED(LIN_ADVANCE)
81
+    LINEAR_ADVANCE_SCREEN_CACHE,
82
+  #endif
83
+  #if ENABLED(FILAMENT_RUNOUT_SENSOR)
84
+    FILAMENT_RUNOUT_SCREEN_CACHE,
85
+  #endif
86
+  #if ENABLED(SDSUPPORT)
87
+    FILES_SCREEN_CACHE,
88
+  #endif
89
+  #if ENABLED(CUSTOM_MENU_MAIN)
90
+    CUSTOM_USER_MENUS_SCREEN_CACHE,
91
+  #endif
92
+  CHANGE_FILAMENT_SCREEN_CACHE,
93
+  INTERFACE_SETTINGS_SCREEN_CACHE,
94
+  INTERFACE_SOUNDS_SCREEN_CACHE,
95
+  LOCK_SCREEN_CACHE,
96
+  DISPLAY_TIMINGS_SCREEN_CACHE
97
+};
98
+
99
+// To save MCU RAM, the status message is "baked" in to the status screen
100
+// cache, so we reserve a large chunk of memory for the DL cache
101
+
102
+#define STATUS_SCREEN_DL_SIZE        4096
103
+#define ALERT_BOX_DL_SIZE            3072
104
+#define SPINNER_DL_SIZE              3072
105
+#define FILE_SCREEN_DL_SIZE          4160
106
+#define PRINTING_SCREEN_DL_SIZE      2048
107
+
108
+/************************* MENU SCREEN DECLARATIONS *************************/
109
+
110
+#include "base_screen.h"
111
+#include "base_numeric_adjustment_screen.h"
112
+#include "dialog_box_base_class.h"
113
+#include "status_screen.h"
114
+#include "main_menu.h"
115
+#include "advanced_settings_menu.h"
116
+#include "tune_menu.h"
117
+#include "boot_screen.h"
118
+#include "about_screen.h"
119
+#include "kill_screen.h"
120
+#include "alert_dialog_box.h"
121
+#include "spinner_dialog_box.h"
122
+#include "restore_failsafe_dialog_box.h"
123
+#include "save_settings_dialog_box.h"
124
+#include "confirm_start_print_dialog_box.h"
125
+#include "confirm_abort_print_dialog_box.h"
126
+#include "confirm_user_request_alert_box.h"
127
+#include "touch_calibration_screen.h"
128
+#include "touch_registers_screen.h"
129
+#include "change_filament_screen.h"
130
+#include "move_axis_screen.h"
131
+#include "steps_screen.h"
132
+#include "feedrate_percent_screen.h"
133
+#include "max_velocity_screen.h"
134
+#include "max_acceleration_screen.h"
135
+#include "default_acceleration_screen.h"
136
+#include "temperature_screen.h"
137
+#include "interface_sounds_screen.h"
138
+#include "interface_settings_screen.h"
139
+#include "lock_screen.h"
140
+#include "endstop_state_screen.h"
141
+#include "display_tuning_screen.h"
142
+#include "media_player_screen.h"
143
+
144
+#if ENABLED(PRINTCOUNTER)
145
+  #include "statistics_screen.h"
146
+#endif
147
+
148
+#if HAS_TRINAMIC_CONFIG
149
+  #include "stepper_current_screen.h"
150
+  #include "stepper_bump_sensitivity_screen.h"
151
+#endif
152
+
153
+#if HAS_MULTI_HOTEND
154
+  #include "nozzle_offsets_screen.h"
155
+#endif
156
+
157
+#if HAS_LEVELING
158
+  #if ENABLED(TOUCH_UI_SYNDAVER_LEVEL)
159
+    #include "syndaver_level/leveling_menu.h"
160
+  #else
161
+    #include "leveling_menu.h"
162
+  #endif
163
+  #if HAS_BED_PROBE
164
+    #include "z_offset_screen.h"
165
+  #endif
166
+  #if HAS_MESH
167
+    #include "bed_mesh_base.h"
168
+    #include "bed_mesh_view_screen.h"
169
+    #include "bed_mesh_edit_screen.h"
170
+  #endif
171
+#endif
172
+
173
+#if ENABLED(CALIBRATION_GCODE)
174
+  #include "confirm_auto_calibration_dialog_box.h"
175
+#endif
176
+
177
+#if ENABLED(BABYSTEPPING)
178
+  #include "nudge_nozzle_screen.h"
179
+#endif
180
+
181
+#if ENABLED(BACKLASH_GCODE)
182
+  #include "backlash_compensation_screen.h"
183
+#endif
184
+
185
+#if HAS_JUNCTION_DEVIATION
186
+  #include "junction_deviation_screen.h"
187
+#else
188
+  #include "jerk_screen.h"
189
+#endif
190
+
191
+#if ENABLED(CASE_LIGHT_ENABLE)
192
+  #include "case_light_screen.h"
193
+#endif
194
+
195
+#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
196
+  #include "filament_menu.h"
197
+#endif
198
+
199
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
200
+  #include "filament_runout_screen.h"
201
+#endif
202
+
203
+#if ENABLED(LIN_ADVANCE)
204
+  #include "linear_advance_screen.h"
205
+#endif
206
+
207
+#if ENABLED(SDSUPPORT)
208
+  #include "files_screen.h"
209
+#endif
210
+
211
+#if ENABLED(CUSTOM_MENU_MAIN)
212
+  #include "custom_user_menus.h"
213
+#endif
214
+
215
+#if ENABLED(TOUCH_UI_DEVELOPER_MENU)
216
+  #include "developer_menu.h"
217
+  #include "confirm_erase_flash_dialog_box.h"
218
+  #include "widget_demo_screen.h"
219
+  #include "stress_test_screen.h"
220
+#endif
221
+
222
+#if NUM_LANGUAGES > 1
223
+  #include "language_menu.h"
224
+#endif

+ 10
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp 查看文件

461
   return true;
461
   return true;
462
 }
462
 }
463
 
463
 
464
+void StatusScreen::onMediaInserted() {
465
+  if (AT_SCREEN(StatusScreen))
466
+    setStatusMessage(GET_TEXT_F(MSG_MEDIA_INSERTED));
467
+}
468
+
469
+void StatusScreen::onMediaRemoved() {
470
+  if (AT_SCREEN(StatusScreen) || ExtUI::isPrintingFromMedia())
471
+    setStatusMessage(GET_TEXT_F(MSG_MEDIA_REMOVED));
472
+}
473
+
464
 #endif // FTDI_STATUS_SCREEN
474
 #endif // FTDI_STATUS_SCREEN

+ 2
- 0
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.h 查看文件

42
     static void onEntry();
42
     static void onEntry();
43
     static void onIdle();
43
     static void onIdle();
44
     static bool onTouchEnd(uint8_t tag);
44
     static bool onTouchEnd(uint8_t tag);
45
+    static void onMediaInserted();
46
+    static void onMediaRemoved();
45
 };
47
 };

+ 5
- 231
Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h 查看文件

37
 
37
 
38
 extern tiny_timer_t refresh_timer;
38
 extern tiny_timer_t refresh_timer;
39
 
39
 
40
-/********************************* DL CACHE SLOTS ******************************/
41
-
42
-// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This
43
-// is done using the CLCD::DLCache class, which takes a unique ID for each
44
-// cache location. These IDs are defined here:
45
-
46
-enum {
47
-  STATUS_SCREEN_CACHE,
48
-  MENU_SCREEN_CACHE,
49
-  TUNE_SCREEN_CACHE,
50
-  ALERT_BOX_CACHE,
51
-  SPINNER_CACHE,
52
-  ADVANCED_SETTINGS_SCREEN_CACHE,
53
-  MOVE_AXIS_SCREEN_CACHE,
54
-  TEMPERATURE_SCREEN_CACHE,
55
-  STEPS_SCREEN_CACHE,
56
-  MAX_FEEDRATE_SCREEN_CACHE,
57
-  MAX_VELOCITY_SCREEN_CACHE,
58
-  MAX_ACCELERATION_SCREEN_CACHE,
59
-  DEFAULT_ACCELERATION_SCREEN_CACHE,
60
-  FLOW_PERCENT_SCREEN_CACHE,
61
-  #if HAS_LEVELING
62
-    LEVELING_SCREEN_CACHE,
63
-    #if HAS_BED_PROBE
64
-      ZOFFSET_SCREEN_CACHE,
65
-    #endif
66
-    #if HAS_MESH
67
-      BED_MESH_VIEW_SCREEN_CACHE,
68
-      BED_MESH_EDIT_SCREEN_CACHE,
69
-    #endif
70
-  #endif
71
-  #if ENABLED(BABYSTEPPING)
72
-    ADJUST_OFFSETS_SCREEN_CACHE,
73
-  #endif
74
-  #if HAS_TRINAMIC_CONFIG
75
-    STEPPER_CURRENT_SCREEN_CACHE,
76
-    STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE,
77
-  #endif
78
-  #if HAS_MULTI_HOTEND
79
-    NOZZLE_OFFSET_SCREEN_CACHE,
80
-  #endif
81
-  #if ENABLED(BACKLASH_GCODE)
82
-    BACKLASH_COMPENSATION_SCREEN_CACHE,
83
-  #endif
84
-  #if HAS_JUNCTION_DEVIATION
85
-    JUNC_DEV_SCREEN_CACHE,
86
-  #else
87
-    JERK_SCREEN_CACHE,
88
-  #endif
89
-  #if ENABLED(CASE_LIGHT_ENABLE)
90
-    CASE_LIGHT_SCREEN_CACHE,
91
-  #endif
92
-  #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
93
-    FILAMENT_MENU_CACHE,
94
-  #endif
95
-  #if ENABLED(LIN_ADVANCE)
96
-    LINEAR_ADVANCE_SCREEN_CACHE,
97
-  #endif
98
-  #if ENABLED(FILAMENT_RUNOUT_SENSOR)
99
-    FILAMENT_RUNOUT_SCREEN_CACHE,
100
-  #endif
101
-  #if ENABLED(TOUCH_UI_LULZBOT_BIO)
102
-    PRINTING_SCREEN_CACHE,
103
-  #endif
104
-  #if ENABLED(TOUCH_UI_COCOA_PRESS)
105
-    PREHEAT_MENU_CACHE,
106
-    PREHEAT_TIMER_SCREEN_CACHE,
107
-    LOAD_CHOCOLATE_SCREEN_CACHE,
108
-    MOVE_XYZ_SCREEN_CACHE,
109
-    MOVE_E_SCREEN_CACHE,
110
-  #endif
111
-  #if ENABLED(SDSUPPORT)
112
-    FILES_SCREEN_CACHE,
113
-  #endif
114
-  #if ENABLED(CUSTOM_MENU_MAIN)
115
-    CUSTOM_USER_MENUS_SCREEN_CACHE,
116
-  #endif
117
-  CHANGE_FILAMENT_SCREEN_CACHE,
118
-  INTERFACE_SETTINGS_SCREEN_CACHE,
119
-  INTERFACE_SOUNDS_SCREEN_CACHE,
120
-  LOCK_SCREEN_CACHE,
121
-  DISPLAY_TIMINGS_SCREEN_CACHE
122
-};
123
-
124
-// To save MCU RAM, the status message is "baked" in to the status screen
125
-// cache, so we reserve a large chunk of memory for the DL cache
126
-
127
-#define STATUS_SCREEN_DL_SIZE        4096
128
-#define ALERT_BOX_DL_SIZE            3072
129
-#define SPINNER_DL_SIZE              3072
130
-#define FILE_SCREEN_DL_SIZE          4160
131
-#define PRINTING_SCREEN_DL_SIZE      2048
132
-
133
-/************************* MENU SCREEN DECLARATIONS *************************/
134
-
135
-#include "generic/base_screen.h"
136
-#include "generic/base_numeric_adjustment_screen.h"
137
-#include "generic/dialog_box_base_class.h"
138
-
139
 #if ENABLED(TOUCH_UI_LULZBOT_BIO)
40
 #if ENABLED(TOUCH_UI_LULZBOT_BIO)
140
-  #include "bio_status_screen.h"
41
+  #include "bioprinter/screens.h"
141
-  #include "bio_main_menu.h"
142
-  #include "bio_tune_menu.h"
143
-  #include "bio_advanced_settings.h"
144
-  #include "bio_printing_dialog_box.h"
145
-  #include "bio_confirm_home_xyz.h"
146
-  #include "bio_confirm_home_e.h"
147
-
148
 #elif ENABLED(TOUCH_UI_COCOA_PRESS)
42
 #elif ENABLED(TOUCH_UI_COCOA_PRESS)
149
-  #include "generic/move_axis_screen.h"
43
+  #include "cocoapress/screens.h"
150
-  #include "generic/flow_percent_screen.h"
44
+#elif ENABLED(TOUCH_UI_SYNDAVER_LEVEL)
151
-  #include "generic/tune_menu.h"
45
+  #include "syndaver_level/screens.h"
152
-  #include "cocoa_press/status_screen.h"
153
-  #include "cocoa_press/main_menu.h"
154
-  #include "cocoa_press/advanced_settings_menu.h"
155
-  #include "cocoa_press/preheat_menu.h"
156
-  #include "cocoa_press/preheat_screen.h"
157
-  #include "cocoa_press/load_chocolate.h"
158
-  #include "cocoa_press/move_xyz_screen.h"
159
-  #include "cocoa_press/move_e_screen.h"
160
-  #include "cocoa_press/leveling_menu.h"
161
-
162
 #else
46
 #else
163
-  #include "generic/status_screen.h"
47
+  #include "generic/screens.h"
164
-  #include "generic/main_menu.h"
165
-  #include "generic/advanced_settings_menu.h"
166
-  #include "generic/tune_menu.h"
167
-#endif
168
-
169
-#include "generic/boot_screen.h"
170
-#include "generic/about_screen.h"
171
-#include "generic/kill_screen.h"
172
-#include "generic/alert_dialog_box.h"
173
-#include "generic/spinner_dialog_box.h"
174
-#include "generic/restore_failsafe_dialog_box.h"
175
-#include "generic/save_settings_dialog_box.h"
176
-#include "generic/confirm_start_print_dialog_box.h"
177
-#include "generic/confirm_abort_print_dialog_box.h"
178
-#include "generic/confirm_user_request_alert_box.h"
179
-#include "generic/touch_calibration_screen.h"
180
-#include "generic/touch_registers_screen.h"
181
-#include "generic/change_filament_screen.h"
182
-#include "generic/move_axis_screen.h"
183
-#include "generic/steps_screen.h"
184
-#include "generic/feedrate_percent_screen.h"
185
-#include "generic/max_velocity_screen.h"
186
-#include "generic/max_acceleration_screen.h"
187
-#include "generic/default_acceleration_screen.h"
188
-#include "generic/temperature_screen.h"
189
-#include "generic/interface_sounds_screen.h"
190
-#include "generic/interface_settings_screen.h"
191
-#include "generic/lock_screen.h"
192
-#include "generic/endstop_state_screen.h"
193
-#include "generic/display_tuning_screen.h"
194
-#include "generic/media_player_screen.h"
195
-
196
-#if ENABLED(PRINTCOUNTER)
197
-  #include "generic/statistics_screen.h"
198
-#endif
199
-
200
-#if HAS_TRINAMIC_CONFIG
201
-  #include "generic/stepper_current_screen.h"
202
-  #include "generic/stepper_bump_sensitivity_screen.h"
203
-#endif
204
-
205
-#if HAS_MULTI_HOTEND
206
-  #include "generic/nozzle_offsets_screen.h"
207
-#endif
208
-
209
-#if HAS_LEVELING
210
-  #if DISABLED(TOUCH_UI_COCOA_PRESS)
211
-    #include "generic/leveling_menu.h"
212
-  #endif
213
-  #if HAS_BED_PROBE
214
-    #include "generic/z_offset_screen.h"
215
-  #endif
216
-  #if HAS_MESH
217
-    #include "generic/bed_mesh_base.h"
218
-    #include "generic/bed_mesh_view_screen.h"
219
-    #include "generic/bed_mesh_edit_screen.h"
220
-  #endif
221
-#endif
222
-
223
-#if ENABLED(CALIBRATION_GCODE)
224
-  #include "generic/confirm_auto_calibration_dialog_box.h"
225
-#endif
226
-
227
-#if ENABLED(BABYSTEPPING)
228
-  #include "generic/nudge_nozzle_screen.h"
229
-#endif
230
-
231
-#if ENABLED(BACKLASH_GCODE)
232
-  #include "generic/backlash_compensation_screen.h"
233
-#endif
234
-
235
-#if HAS_JUNCTION_DEVIATION
236
-  #include "generic/junction_deviation_screen.h"
237
-#else
238
-  #include "generic/jerk_screen.h"
239
-#endif
240
-
241
-#if ENABLED(CASE_LIGHT_ENABLE)
242
-  #include "generic/case_light_screen.h"
243
-#endif
244
-
245
-#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
246
-  #include "generic/filament_menu.h"
247
-#endif
248
-
249
-#if ENABLED(FILAMENT_RUNOUT_SENSOR)
250
-  #include "generic/filament_runout_screen.h"
251
-#endif
252
-
253
-#if ENABLED(LIN_ADVANCE)
254
-  #include "generic/linear_advance_screen.h"
255
-#endif
256
-
257
-#if ENABLED(SDSUPPORT)
258
-  #include "generic/files_screen.h"
259
-#endif
260
-
261
-#if ENABLED(CUSTOM_MENU_MAIN)
262
-  #include "generic/custom_user_menus.h"
263
-#endif
264
-
265
-#if ENABLED(TOUCH_UI_DEVELOPER_MENU)
266
-  #include "generic/developer_menu.h"
267
-  #include "generic/confirm_erase_flash_dialog_box.h"
268
-  #include "generic/widget_demo_screen.h"
269
-  #include "generic/stress_test_screen.h"
270
-#endif
271
-
272
-#if NUM_LANGUAGES > 1
273
-  #include "generic/language_menu.h"
274
 #endif
48
 #endif
275
 
49
 
276
 #endif // TOUCH_UI_FTDI_EVE
50
 #endif // TOUCH_UI_FTDI_EVE

+ 1
- 1
Marlin/src/lcd/extui/ui_api.cpp 查看文件

305
   }
305
   }
306
 
306
 
307
   float getAxisPosition_mm(const axis_t axis) {
307
   float getAxisPosition_mm(const axis_t axis) {
308
-    return TERN0(JOYSTICK, flags.jogging) ? destination[axis] : current_position[axis];
308
+    return current_position[axis];
309
   }
309
   }
310
 
310
 
311
   float getAxisPosition_mm(const extruder_t extruder) {
311
   float getAxisPosition_mm(const extruder_t extruder) {

+ 6
- 4
Marlin/src/lcd/marlinui.cpp 查看文件

1616
 
1616
 
1617
     if (status) {
1617
     if (status) {
1618
       if (old_status < 2) {
1618
       if (old_status < 2) {
1619
-        TERN_(EXTENSIBLE_UI, ExtUI::onMediaInserted()); // ExtUI response
1619
+        #if ENABLED(EXTENSIBLE_UI)
1620
-        #if ENABLED(BROWSE_MEDIA_ON_INSERT)
1620
+          ExtUI::onMediaInserted();
1621
+        #elif ENABLED(BROWSE_MEDIA_ON_INSERT)
1621
           clear_menu_history();
1622
           clear_menu_history();
1622
           quick_feedback();
1623
           quick_feedback();
1623
           goto_screen(MEDIA_MENU_GATEWAY);
1624
           goto_screen(MEDIA_MENU_GATEWAY);
1628
     }
1629
     }
1629
     else {
1630
     else {
1630
       if (old_status < 2) {
1631
       if (old_status < 2) {
1631
-        TERN_(EXTENSIBLE_UI, ExtUI::onMediaRemoved()); // ExtUI response
1632
+        #if ENABLED(EXTENSIBLE_UI)
1632
-        #if PIN_EXISTS(SD_DETECT)
1633
+          ExtUI::onMediaRemoved();
1634
+        #elif PIN_EXISTS(SD_DETECT)
1633
           LCD_MESSAGEPGM(MSG_MEDIA_REMOVED);
1635
           LCD_MESSAGEPGM(MSG_MEDIA_REMOVED);
1634
           #if HAS_LCD_MENU
1636
           #if HAS_LCD_MENU
1635
             if (!defer_return_to_status) return_to_status();
1637
             if (!defer_return_to_status) return_to_status();

正在加载...
取消
保存