Marcio Teixeira 5 роки тому
джерело
коміт
bd1ced14e7

+ 0
- 4
Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/flash_storage.h Переглянути файл

@@ -20,8 +20,6 @@
20 20
  *   location: <http://www.gnu.org/licenses/>.                              *
21 21
  ****************************************************************************/
22 22
 
23
-#ifdef LULZBOT_TOUCH_UI
24
-
25 23
 class SPIFlash {
26 24
   public:
27 25
     static constexpr uint32_t erase_unit_size = 4 * 1024; // Minimum erase unit
@@ -106,5 +104,3 @@ class UIFlashStorage::BootMediaReader {
106 104
 
107 105
     static int16_t read(void *obj, void *buffer, const size_t size);
108 106
 };
109
-
110
-#endif // LULZBOT_TOUCH_UI

+ 6
- 2
Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/media_file_reader.h Переглянути файл

@@ -22,8 +22,12 @@
22 22
 
23 23
 #pragma once
24 24
 
25
-#include "../../../../../sd/SdFile.h"
26
-#include "../../../../../sd/cardreader.h"
25
+#include "../../../../../inc/MarlinConfigPre.h"
26
+
27
+#if ENABLED(SDSUPPORT)
28
+  #include "../../../../../sd/SdFile.h"
29
+  #include "../../../../../sd/cardreader.h"
30
+#endif
27 31
 
28 32
 class MediaFileReader {
29 33
   private:

+ 5
- 13
Marlin/src/lcd/extensible_ui/lib/lulzbot/compat.h Переглянути файл

@@ -35,21 +35,13 @@
35 35
 #endif
36 36
 
37 37
 #ifdef __MARLIN_FIRMWARE__
38
-    // If __MARLIN_FIRMWARE__ exists, then we are being
39
-    // compiled inside Marlin.
40
-    #include "pin_mappings.h"
38
+  // __MARLIN_FIRMWARE__ exists when compiled within Marlin.
39
+  #include "pin_mappings.h"
41 40
 #else
42 41
   // Messages that are declared in Marlin
43
-  #define WELCOME_MSG     "Printer Ready"
44
-  #define MSG_SD_INSERTED "Media Inserted"
45
-  #define MSG_SD_REMOVED  "Media Removed"
46
-
47
-  // Define macros for compatibility
48
-  #define EXTENSIBLE_UI
49
-  #define _CAT(a, ...) a ## __VA_ARGS__
50
-  #define SWITCH_ENABLED_      1
51
-  #define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
52
-  #define DISABLED(b) !ENABLED(b)
42
+  #define WELCOME_MSG        "Printer Ready"
43
+  #define MSG_MEDIA_INSERTED "Media Inserted"
44
+  #define MSG_MEDIA_REMOVED  "Media Removed"
53 45
 
54 46
   namespace UI {
55 47
     static inline uint32_t safe_millis() {return millis();};

+ 2
- 3
Marlin/src/lcd/extensible_ui/lib/lulzbot/config.h Переглянути файл

@@ -80,9 +80,8 @@
80 80
 // This is a recommended for smaller displays.
81 81
 //#define TOUCH_UI_PASSCODE
82 82
 
83
-// Define number of seconds after which the menu screens
84
-// timeout and returns the user to the status screen
85
-//#define LCD_TIMEOUT_TO_STATUS 120
83
+// The timeout (in ms) to return to the status screen from sub-menus
84
+//#define LCD_TIMEOUT_TO_STATUS 15000
86 85
 
87 86
 // Enable this to debug the event framework
88 87
 //#define UI_FRAMEWORK_DEBUG

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.cpp Переглянути файл

@@ -1160,7 +1160,7 @@ void CLCD::default_display_orientation() {
1160 1160
       cmd.execute();
1161 1161
     }
1162 1162
     else {
1163
-      #ifdef TOUCH_UI_INVERTED
1163
+      #if ENABLED(TOUCH_UI_INVERTED)
1164 1164
         mem_write_32(REG::ROTATE, 1);
1165 1165
       #endif
1166 1166
     }

+ 14
- 3
Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/compat.h Переглянути файл

@@ -20,13 +20,15 @@
20 20
 #include "../config.h"
21 21
 
22 22
 #ifdef __MARLIN_FIRMWARE__
23
-  // Marlin will define the I/O functions for us
24 23
 
24
+  // Marlin will define the I/O functions for us
25 25
   #if ENABLED(LULZBOT_TOUCH_UI)
26 26
     #define FTDI_BASIC
27 27
     #define FTDI_EXTENDED
28 28
   #endif
29
-#else
29
+
30
+#else // !__MARLIN_FIRMWARE__
31
+
30 32
   #include "Arduino.h"
31 33
 
32 34
   #if !defined(CLCD_USE_SOFT_SPI)
@@ -200,6 +202,14 @@
200 202
 
201 203
   #define safe_delay delay
202 204
 
205
+  // Define macros for compatibility
206
+
207
+  #define _CAT(a, ...)       a ## __VA_ARGS__
208
+  #define SWITCH_ENABLED_    1
209
+  #define ENABLED(b)         _CAT(SWITCH_ENABLED_, b)
210
+  #define DISABLED(b)        !ENABLED(b)
211
+  #define ANY(A,B)           ENABLED(A) || ENABLED(B)
212
+
203 213
   // Remove compiler warning on an unused variable
204 214
   #ifndef UNUSED
205 215
     #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
@@ -208,4 +218,5 @@
208 218
       #define UNUSED(x) ((void)(x))
209 219
     #endif
210 220
   #endif
211
-#endif //!defined(__MARLIN_FIRMWARE__)
221
+
222
+#endif // !__MARLIN_FIRMWARE__

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_screen.cpp Переглянути файл

@@ -63,7 +63,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t
63 63
 void BaseScreen::onIdle() {
64 64
   #ifdef LCD_TIMEOUT_TO_STATUS
65 65
     const uint32_t elapsed = millis() - last_interaction;
66
-    if (elapsed > uint32_t(LCD_TIMEOUT_TO_STATUS) * 1000) {
66
+    if (elapsed > uint32_t(LCD_TIMEOUT_TO_STATUS)) {
67 67
       reset_menu_timeout();
68 68
       GOTO_SCREEN(StatusScreen);
69 69
     }

+ 0
- 6
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/endstop_state_screen.cpp Переглянути файл

@@ -32,16 +32,10 @@ using namespace ExtUI;
32 32
 
33 33
 void EndstopStatesScreen::onEntry() {
34 34
   BaseScreen::onEntry();
35
-  #ifdef LULZBOT_SET_PROBE_PINS_STATE
36
-    LULZBOT_SET_PROBE_PINS_STATE(true)
37
-  #endif
38 35
 }
39 36
 
40 37
 void EndstopStatesScreen::onExit() {
41 38
   BaseScreen::onExit();
42
-  #ifdef LULZBOT_SET_PROBE_PINS_STATE
43
-    LULZBOT_SET_PROBE_PINS_STATE(false)
44
-  #endif
45 39
 }
46 40
 
47 41
 void EndstopStatesScreen::onRedraw(draw_mode_t) {

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/status_screen.cpp Переглянути файл

@@ -30,7 +30,7 @@
30 30
 #include "../archim2-flash/flash_storage.h"
31 31
 
32 32
 #if ENABLED(SDSUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
33
-  #include "../../../../sd/cardreader.h"
33
+  #include "../../../../../sd/cardreader.h"
34 34
 #endif
35 35
 
36 36
 using namespace FTDI;

Завантаження…
Відмінити
Зберегти