Browse Source

Misc patches preceding DGUS PR

Scott Lahteine 4 years ago
parent
commit
5b75a018b7

+ 4
- 4
Marlin/src/HAL/HAL_AVR/HAL.h View File

@@ -91,19 +91,19 @@ typedef int8_t pin_t;
91 91
   #define NUM_SERIAL 1
92 92
 #else
93 93
   #if !WITHIN(SERIAL_PORT, -1, 3)
94
-    #error "SERIAL_PORT must be from -1 to 3"
94
+    #error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
95 95
   #endif
96 96
 
97 97
   #define MYSERIAL0 customizedSerial1
98 98
 
99 99
   #ifdef SERIAL_PORT_2
100 100
     #if !WITHIN(SERIAL_PORT_2, -1, 3)
101
-      #error "SERIAL_PORT_2 must be from -1 to 3"
101
+      #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
102 102
     #elif SERIAL_PORT_2 == SERIAL_PORT
103
-      #error "SERIAL_PORT_2 must be different than SERIAL_PORT"
103
+      #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
104 104
     #endif
105
-    #define NUM_SERIAL 2
106 105
     #define MYSERIAL1 customizedSerial2
106
+    #define NUM_SERIAL 2
107 107
   #else
108 108
     #define NUM_SERIAL 1
109 109
   #endif

+ 1
- 2
Marlin/src/HAL/HAL_DUE/HAL.h View File

@@ -56,8 +56,7 @@
56 56
 #ifdef SERIAL_PORT_2
57 57
   #if SERIAL_PORT_2 == SERIAL_PORT
58 58
     #error "SERIAL_PORT_2 must be different from SERIAL_PORT. Please update your configuration."
59
-  #endif
60
-  #if SERIAL_PORT_2 == -1
59
+  #elif SERIAL_PORT_2 == -1
61 60
     #define MYSERIAL1 customizedSerial2
62 61
   #elif SERIAL_PORT_2 == 0
63 62
     #define MYSERIAL1 Serial

+ 1
- 1
Marlin/src/HAL/HAL_ESP32/HAL.h View File

@@ -48,8 +48,8 @@ extern portMUX_TYPE spinlock;
48 48
 #define MYSERIAL0 flushableSerial
49 49
 
50 50
 #if ENABLED(WIFISUPPORT)
51
-  #define NUM_SERIAL 2
52 51
   #define MYSERIAL1 webSocketSerial
52
+  #define NUM_SERIAL 2
53 53
 #else
54 54
   #define NUM_SERIAL 1
55 55
 #endif

+ 8
- 11
Marlin/src/HAL/HAL_LPC1768/HAL.h View File

@@ -61,10 +61,6 @@ extern "C" volatile uint32_t _millis;
61 61
   #define ST7920_DELAY_3 DELAY_NS(750)
62 62
 #endif
63 63
 
64
-#if !WITHIN(SERIAL_PORT, -1, 3)
65
-  #error "SERIAL_PORT must be from -1 to 3"
66
-#endif
67
-
68 64
 #if SERIAL_PORT == -1
69 65
   #define MYSERIAL0 UsbSerial
70 66
 #elif SERIAL_PORT == 0
@@ -75,16 +71,14 @@ extern "C" volatile uint32_t _millis;
75 71
   #define MYSERIAL0 MSerial2
76 72
 #elif SERIAL_PORT == 3
77 73
   #define MYSERIAL0 MSerial3
74
+#else
75
+  #error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
78 76
 #endif
79 77
 
80 78
 #ifdef SERIAL_PORT_2
81
-  #if !WITHIN(SERIAL_PORT_2, -1, 3)
82
-    #error "SERIAL_PORT_2 must be from -1 to 3"
83
-  #elif SERIAL_PORT_2 == SERIAL_PORT
84
-    #error "SERIAL_PORT_2 must be different than SERIAL_PORT"
85
-  #endif
86
-  #define NUM_SERIAL 2
87
-  #if SERIAL_PORT_2 == -1
79
+  #if SERIAL_PORT_2 == SERIAL_PORT
80
+    #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
81
+  #elif SERIAL_PORT_2 == -1
88 82
     #define MYSERIAL1 UsbSerial
89 83
   #elif SERIAL_PORT_2 == 0
90 84
     #define MYSERIAL1 MSerial
@@ -94,7 +88,10 @@ extern "C" volatile uint32_t _millis;
94 88
     #define MYSERIAL1 MSerial2
95 89
   #elif SERIAL_PORT_2 == 3
96 90
     #define MYSERIAL1 MSerial3
91
+  #else
92
+    #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
97 93
   #endif
94
+  #define NUM_SERIAL 2
98 95
 #else
99 96
   #define NUM_SERIAL 1
100 97
 #endif

+ 11
- 12
Marlin/src/HAL/HAL_SAMD51/HAL.h View File

@@ -33,11 +33,9 @@
33 33
   #include "MarlinSerial_AGCM4.h"
34 34
 
35 35
   // Serial ports
36
-  #if !WITHIN(SERIAL_PORT, -1, 3)
37
-    #error "SERIAL_PORT must be from -1 to 3"
38
-  #endif
39 36
 
40 37
   // MYSERIAL0 required before MarlinSerial includes!
38
+
41 39
   #if SERIAL_PORT == -1
42 40
     #define MYSERIAL0 Serial
43 41
   #elif SERIAL_PORT == 0
@@ -46,18 +44,16 @@
46 44
     #define MYSERIAL0 Serial2
47 45
   #elif SERIAL_PORT == 2
48 46
     #define MYSERIAL0 Serial3
49
-  #else
47
+  #elif SERIAL_PORT == 3
50 48
     #define MYSERIAL0 Serial4
49
+  #else
50
+    #error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
51 51
   #endif
52 52
 
53 53
   #ifdef SERIAL_PORT_2
54
-    #if !WITHIN(SERIAL_PORT_2, -1, 3)
55
-      #error "SERIAL_PORT_2 must be from -1 to 3"
56
-    #elif SERIAL_PORT_2 == SERIAL_PORT
57
-      #error "SERIAL_PORT_2 must be different than SERIAL_PORT"
58
-    #endif
59
-    #define NUM_SERIAL 2
60
-    #if SERIAL_PORT_2 == -1
54
+    #if SERIAL_PORT_2 == SERIAL_PORT
55
+      #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
56
+    #elif SERIAL_PORT_2 == -1
61 57
       #define MYSERIAL1 Serial
62 58
     #elif SERIAL_PORT_2 == 0
63 59
       #define MYSERIAL1 Serial1
@@ -65,9 +61,12 @@
65 61
       #define MYSERIAL1 Serial2
66 62
     #elif SERIAL_PORT_2 == 2
67 63
       #define MYSERIAL1 Serial3
68
-    #else
64
+    #elif SERIAL_PORT_2 == 3
69 65
       #define MYSERIAL1 Serial4
66
+    #else
67
+      #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
70 68
     #endif
69
+    #define NUM_SERIAL 2
71 70
   #else
72 71
     #define NUM_SERIAL 1
73 72
   #endif

+ 10
- 16
Marlin/src/HAL/HAL_STM32/HAL.h View File

@@ -44,13 +44,8 @@
44 44
 // ------------------------
45 45
 
46 46
 #if SERIAL_PORT == 0
47
-  #error "Serial port 0 does not exist"
48
-#endif
49
-
50
-#if !WITHIN(SERIAL_PORT, -1, 6)
51
-  #error "SERIAL_PORT must be from -1 to 6"
52
-#endif
53
-#if SERIAL_PORT == -1
47
+  #error "SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
48
+#elif SERIAL_PORT == -1
54 49
   #define MYSERIAL0 SerialUSB
55 50
 #elif SERIAL_PORT == 1
56 51
   #define MYSERIAL0 Serial1
@@ -64,20 +59,17 @@
64 59
   #define MYSERIAL0 Serial5
65 60
 #elif SERIAL_PORT == 6
66 61
   #define MYSERIAL0 Serial6
62
+#else
63
+  #error "SERIAL_PORT must be from -1 to 6. Please update your configuration."
67 64
 #endif
68 65
 
69 66
 #ifdef SERIAL_PORT_2
67
+  #define NUM_SERIAL 2
70 68
   #if SERIAL_PORT_2 == 0
71
-    #error "Serial port 0 does not exist"
72
-  #endif
73
-
74
-  #if !WITHIN(SERIAL_PORT_2, -1, 6)
75
-    #error "SERIAL_PORT_2 must be from -1 to 6"
69
+    #error "SERIAL_PORT_2 cannot be 0. (Port 0 does not exist.) Please update your configuration."
76 70
   #elif SERIAL_PORT_2 == SERIAL_PORT
77
-    #error "SERIAL_PORT_2 must be different than SERIAL_PORT"
78
-  #endif
79
-  #define NUM_SERIAL 2
80
-  #if SERIAL_PORT_2 == -1
71
+    #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
72
+  #elif SERIAL_PORT_2 == -1
81 73
     #define MYSERIAL1 SerialUSB
82 74
   #elif SERIAL_PORT_2 == 1
83 75
     #define MYSERIAL1 Serial1
@@ -91,6 +83,8 @@
91 83
     #define MYSERIAL1 Serial5
92 84
   #elif SERIAL_PORT_2 == 6
93 85
     #define MYSERIAL1 Serial6
86
+  #else
87
+    #error "SERIAL_PORT_2 must be from -1 to 6. Please update your configuration."
94 88
   #endif
95 89
 #else
96 90
   #define NUM_SERIAL 1

+ 12
- 14
Marlin/src/HAL/HAL_STM32F1/HAL.h View File

@@ -78,13 +78,10 @@
78 78
   #define MSerial5  Serial4
79 79
 #endif
80 80
 
81
-#if !WITHIN(SERIAL_PORT, -1, 5)
82
-  #error "SERIAL_PORT must be from -1 to 5"
83
-#endif
84
-#if SERIAL_PORT == -1
81
+#if SERIAL_PORT == 0
82
+  #error "SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
83
+#elif SERIAL_PORT == -1
85 84
   #define MYSERIAL0 UsbSerial
86
-#elif SERIAL_PORT == 0
87
-  #error "Serial port 0 does not exist"
88 85
 #elif SERIAL_PORT == 1
89 86
   #define MYSERIAL0 MSerial1
90 87
 #elif SERIAL_PORT == 2
@@ -95,19 +92,17 @@
95 92
   #define MYSERIAL0 MSerial4
96 93
 #elif SERIAL_PORT == 5
97 94
   #define MYSERIAL0 MSerial5
95
+#else
96
+  #error "SERIAL_PORT must be from -1 to 5. Please update your configuration."
98 97
 #endif
99 98
 
100 99
 #ifdef SERIAL_PORT_2
101
-  #if !WITHIN(SERIAL_PORT_2, -1, 5)
102
-    #error "SERIAL_PORT_2 must be from -1 to 5"
100
+  #if SERIAL_PORT_2 == 0
101
+    #error "SERIAL_PORT_2 cannot be 0. (Port 0 does not exist.) Please update your configuration."
103 102
   #elif SERIAL_PORT_2 == SERIAL_PORT
104
-    #error "SERIAL_PORT_2 must be different than SERIAL_PORT"
105
-  #endif
106
-  #define NUM_SERIAL 2
107
-  #if SERIAL_PORT_2 == -1
103
+    #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
104
+  #elif SERIAL_PORT_2 == -1
108 105
     #define MYSERIAL1 UsbSerial
109
-  #elif SERIAL_PORT_2 == 0
110
-  #error "Serial port 0 does not exist"
111 106
   #elif SERIAL_PORT_2 == 1
112 107
     #define MYSERIAL1 MSerial1
113 108
   #elif SERIAL_PORT_2 == 2
@@ -118,7 +113,10 @@
118 113
     #define MYSERIAL1 MSerial4
119 114
   #elif SERIAL_PORT_2 == 5
120 115
     #define MYSERIAL1 MSerial5
116
+  #else
117
+    #error "SERIAL_PORT_2 must be from -1 to 5. Please update your configuration."
121 118
   #endif
119
+  #define NUM_SERIAL 2
122 120
 #else
123 121
   #define NUM_SERIAL 1
124 122
 #endif

+ 11
- 16
Marlin/src/HAL/HAL_STM32_F4_F7/HAL.h View File

@@ -44,17 +44,12 @@
44 44
 // Defines
45 45
 // ------------------------
46 46
 
47
-//Serial override
47
+// Serial override
48 48
 //extern HalSerial usb_serial;
49 49
 
50 50
 #if defined(STM32F4) && SERIAL_PORT == 0
51
-  #error "Serial port 0 does not exist"
52
-#endif
53
-
54
-#if !WITHIN(SERIAL_PORT, -1, 6)
55
-  #error "SERIAL_PORT must be from -1 to 6"
56
-#endif
57
-#if SERIAL_PORT == -1
51
+  #error "SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
52
+#elif SERIAL_PORT == -1
58 53
   #define MYSERIAL0 SerialUSB
59 54
 #elif SERIAL_PORT == 1
60 55
   #define MYSERIAL0 SerialUART1
@@ -68,19 +63,16 @@
68 63
   #define MYSERIAL0 SerialUART5
69 64
 #elif SERIAL_PORT == 6
70 65
   #define MYSERIAL0 SerialUART6
66
+#else
67
+  #error "SERIAL_PORT must be from -1 to 6. Please update your configuration."
71 68
 #endif
72 69
 
73 70
 #ifdef SERIAL_PORT_2
74 71
   #if defined(STM32F4) && SERIAL_PORT_2 == 0
75
-    #error "Serial port 0 does not exist"
76
-  #endif
77
-  #if !WITHIN(SERIAL_PORT_2, -1, 6)
78
-    #error "SERIAL_PORT_2 must be from -1 to 6"
72
+    #error "SERIAL_PORT_2 cannot be 0. (Port 0 does not exist.) Please update your configuration."
79 73
   #elif SERIAL_PORT_2 == SERIAL_PORT
80
-    #error "SERIAL_PORT_2 must be different than SERIAL_PORT"
81
-  #endif
82
-  #define NUM_SERIAL 2
83
-  #if SERIAL_PORT_2 == -1
74
+    #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
75
+  #elif SERIAL_PORT_2 == -1
84 76
     #define MYSERIAL1 SerialUSB
85 77
   #elif SERIAL_PORT_2 == 1
86 78
     #define MYSERIAL1 SerialUART1
@@ -94,7 +86,10 @@
94 86
     #define MYSERIAL1 SerialUART5
95 87
   #elif SERIAL_PORT_2 == 6
96 88
     #define MYSERIAL1 SerialUART6
89
+  #else
90
+    #error "SERIAL_PORT_2 must be from -1 to 6. Please update your configuration."
97 91
   #endif
92
+  #define NUM_SERIAL 2
98 93
 #else
99 94
   #define NUM_SERIAL 1
100 95
 #endif

+ 1
- 1
Marlin/src/HAL/shared/backtrace/unwinder.h View File

@@ -164,7 +164,7 @@ typedef struct {
164 164
  * link register (i.e. not a normal register) and the stack pointer value
165 165
  * supplied.
166 166
  *
167
- * -If the program was compiled with -funwind-tables , it will use them to
167
+ * -If the program was compiled with -funwind-tables it will use them to
168 168
  * perform the traceback. Otherwise, brute force will be employed
169 169
  * -If the program was compiled with -mpoke-function-name, then you will
170 170
  * get function names in the traceback. Otherwise, you will not.

+ 1
- 1
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp View File

@@ -912,7 +912,7 @@ void ST7920_Lite_Status_Screen::on_exit() {
912 912
   ncs();
913 913
 }
914 914
 
915
-// This is called prior to the KILL screen to
915
+// Called prior to the KILL screen to
916 916
 // clear the screen, preventing a garbled display.
917 917
 void ST7920_Lite_Status_Screen::clear_text_buffer() {
918 918
   cs();

+ 1
- 1
Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp View File

@@ -74,7 +74,7 @@ static const uint8_t u8g_dev_st7920_128x64_HAL_init_seq[] PROGMEM = {
74 74
 
75 75
   0x038,              // 8 Bit interface (DL=1), basic instruction set (RE=0)
76 76
   0x00C,              // display on, cursor & blink off; 0x08: all off
77
-  0x006,              // Entry mode: Cursor move to right ,DDRAM address counter (AC) plus 1, no shift
77
+  0x006,              // Entry mode: Cursor move to right, DDRAM address counter (AC) plus 1, no shift
78 78
   0x002,              // disable scroll, enable CGRAM adress
79 79
   0x001,              // clear RAM, needs 1.6 ms
80 80
   U8G_ESC_DLY(100),   // delay 100 ms

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h View File

@@ -179,5 +179,5 @@
179 179
 
180 180
 #else
181 181
 
182
-  #error Unknown or no TOUCH_UI_FTDI_EVE board specified. To add a new board, modify "ftdi_eve_boards.h"
182
+  #error "Unknown or no TOUCH_UI_FTDI_EVE board specified. To add a new board, modify 'ftdi_eve_boards.h'."
183 183
 #endif

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp View File

@@ -1179,7 +1179,7 @@ void CLCD::default_display_orientation() {
1179 1179
       #endif
1180 1180
     }
1181 1181
   #elif ANY(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED)
1182
-    #error PORTRAIT or MIRRORED orientation not supported on the FT800
1182
+    #error "PORTRAIT or MIRRORED orientation not supported on the FT800."
1183 1183
   #elif ENABLED(TOUCH_UI_INVERTED)
1184 1184
     mem_write_32(REG::ROTATE, 1);
1185 1185
   #endif

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h View File

@@ -124,5 +124,5 @@
124 124
   }
125 125
 
126 126
 #else
127
-  #error Unknown or no TOUCH_UI_FTDI_EVE display resolution specified. To add a display resolution, modify "ftdi_eve_resolutions.h"
127
+  #error "Unknown or no TOUCH_UI_FTDI_EVE display resolution specified. To add a display resolution, modify 'ftdi_eve_resolutions.h'."
128 128
 #endif

+ 2
- 0
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h View File

@@ -210,7 +210,9 @@
210 210
   #define ENABLED(b)         _CAT(SWITCH_ENABLED_, b)
211 211
   #define DISABLED(b)        !ENABLED(b)
212 212
   #define ANY(A,B)           (ENABLED(A) || ENABLED(B))
213
+  #define EITHER(A,B)        (ENABLED(A) || ENABLED(B))
213 214
   #define BOTH(A,B)          (ENABLED(A) && ENABLED(B))
215
+  #define NONE(A,B)          (DISABLED(A) && DISABLED(B))
214 216
 
215 217
   // Remove compiler warning on an unused variable
216 218
   #ifndef UNUSED

+ 4
- 4
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/pin_mappings.h View File

@@ -29,7 +29,7 @@
29 29
 
30 30
 #ifdef CR10_TFT_PINMAP
31 31
   #ifndef __MARLIN_FIRMWARE__
32
-    #error This pin mapping requires Marlin.
32
+    #error "This pin mapping requires Marlin."
33 33
   #endif
34 34
 
35 35
   #define CLCD_USE_SOFT_SPI
@@ -49,7 +49,7 @@
49 49
 
50 50
 #ifdef AO_EXP1_DEPRECATED_PINMAP
51 51
   #ifndef __MARLIN_FIRMWARE__
52
-    #error This pin mapping requires Marlin.
52
+    #error "This pin mapping requires Marlin."
53 53
   #endif
54 54
 
55 55
   #define CLCD_MOD_RESET                 LCD_PINS_D4
@@ -89,7 +89,7 @@
89 89
 
90 90
 #ifdef AO_EXP1_PINMAP
91 91
   #ifndef __MARLIN_FIRMWARE__
92
-    #error This pin mapping requires Marlin.
92
+    #error "This pin mapping requires Marlin."
93 93
   #endif
94 94
 
95 95
   #define CLCD_MOD_RESET                 LCD_PINS_ENABLE
@@ -134,7 +134,7 @@
134 134
 
135 135
 #ifdef AO_EXP2_PINMAP
136 136
   #ifndef __MARLIN_FIRMWARE__
137
-    #error This pin mapping requires Marlin.
137
+    #error "This pin mapping requires Marlin."
138 138
   #endif
139 139
 
140 140
   #define CLCD_SPI_CS                    BTN_EN1

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp View File

@@ -55,7 +55,7 @@ void MainMenu::onRedraw(draw_mode_t what) {
55 55
         .tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISABLE_STEPPERS))
56 56
         .tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_TEMPERATURE))
57 57
         .enabled(
58
-          #if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS)
58
+          #if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
59 59
             1
60 60
           #endif
61 61
         )

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h View File

@@ -232,7 +232,7 @@ class SpinnerDialogBox : public DialogBoxBaseClass, public CachedScreen<SPINNER_
232 232
     static void enqueueAndWait_P(const progmem_str message, const progmem_str commands);
233 233
 };
234 234
 
235
-#if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS)
235
+#if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
236 236
 class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE,STATUS_SCREEN_DL_SIZE> {
237 237
   private:
238 238
     static void draw_axis_position(draw_mode_t);

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(TOUCH_UI_FTDI_EVE) && DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS)
25
+#if ENABLED(TOUCH_UI_FTDI_EVE) && NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
26 26
 
27 27
 #include "screens.h"
28 28
 #include "screen_data.h"

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/colors.h View File

@@ -75,7 +75,7 @@ namespace Theme {
75 75
   constexpr uint32_t gray_color_5       = hsl_to_rgb(accent_hue, gray_sat, 0.78);
76 76
   constexpr uint32_t gray_color_6       = hsl_to_rgb(accent_hue, gray_sat, 0.91); // Lightest
77 77
 
78
-  #if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS)
78
+  #if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
79 79
     // Lulzbot TAZ Pro
80 80
     constexpr uint32_t theme_darkest    = gray_color_1;
81 81
     constexpr uint32_t theme_dark       = gray_color_2;

+ 17
- 4
Marlin/src/lcd/extui_dgus_lcd.cpp View File

@@ -34,6 +34,8 @@
34 34
 #include "extensible_ui/lib/dgus/DGUSDisplay.h"
35 35
 #include "extensible_ui/lib/dgus/DGUSDisplayDefinition.h"
36 36
 
37
+extern const char NUL_STR[];
38
+
37 39
 namespace ExtUI {
38 40
 
39 41
   void onStartup() {
@@ -44,15 +46,26 @@ namespace ExtUI {
44 46
   void onIdle() { ScreenHandler.loop(); }
45 47
 
46 48
   void onPrinterKilled(PGM_P error, PGM_P component) {
47
-    extern const char NUL_STR[];
48 49
     ScreenHandler.sendinfoscreen(GET_TEXT(MSG_HALTED), error, NUL_STR, GET_TEXT(MSG_PLEASE_RESET), true, true, true, true);
49 50
     ScreenHandler.GotoScreen(DGUSLCD_SCREEN_KILL);
50 51
     while (!ScreenHandler.loop());  // Wait while anything is left to be sent
51 52
   }
52 53
 
53
-  void onMediaInserted() { ScreenHandler.SDCardInserted(); }
54
-  void onMediaError()    { ScreenHandler.SDCardError(); }
55
-  void onMediaRemoved()  { ScreenHandler.SDCardRemoved(); }
54
+  void onMediaInserted() {
55
+    #if ENABLED(SDSUPPORT)
56
+      ScreenHandler.SDCardInserted();
57
+    #endif
58
+  }
59
+  void onMediaError()    {
60
+    #if ENABLED(SDSUPPORT)
61
+      ScreenHandler.SDCardError();
62
+    #endif
63
+  }
64
+  void onMediaRemoved()  {
65
+    #if ENABLED(SDSUPPORT)
66
+      ScreenHandler.SDCardRemoved();
67
+    #endif
68
+  }
56 69
 
57 70
   void onPlayTone(const uint16_t frequency, const uint16_t duration) {}
58 71
   void onPrintTimerStarted() {}

+ 5
- 5
Marlin/src/lcd/extui_example.cpp View File

@@ -60,7 +60,7 @@ namespace ExtUI {
60 60
   void onFactoryReset() {}
61 61
 
62 62
   void onStoreSettings(char *buff) {
63
-    // This is called when saving to EEPROM (i.e. M500). If the ExtUI needs
63
+    // Called when saving to EEPROM (i.e. M500). If the ExtUI needs
64 64
     // permanent data to be stored, it can write up to eeprom_data_size bytes
65 65
     // into buff.
66 66
 
@@ -70,7 +70,7 @@ namespace ExtUI {
70 70
   }
71 71
 
72 72
   void onLoadSettings(const char *buff) {
73
-    // This is called while loading settings from EEPROM. If the ExtUI
73
+    // Called while loading settings from EEPROM. If the ExtUI
74 74
     // needs to retrieve data, it should copy up to eeprom_data_size bytes
75 75
     // from buff
76 76
 
@@ -80,17 +80,17 @@ namespace ExtUI {
80 80
   }
81 81
 
82 82
   void onConfigurationStoreWritten(bool success) {
83
-    // This is called after the entire EEPROM has been written,
83
+    // Called after the entire EEPROM has been written,
84 84
     // whether successful or not.
85 85
   }
86 86
 
87 87
   void onConfigurationStoreRead(bool success) {
88
-    // This is called after the entire EEPROM has been read,
88
+    // Called after the entire EEPROM has been read,
89 89
     // whether successful or not.
90 90
   }
91 91
 
92 92
   void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {
93
-    // This is called when any mesh points are updated
93
+    // Called when any mesh points are updated
94 94
   }
95 95
 }
96 96
 

+ 3
- 3
config/examples/FlashForge/CreatorPro/CuraSettings.txt View File

@@ -117,7 +117,7 @@ Extruder 2 -
117 117
 
118 118
 ;START G-CODE;
119 119
 M104 T0 S{material_print_temperature, 0}
120
-M104 T1 S{material_print_temperature , 1}
120
+M104 T1 S{material_print_temperature, 1}
121 121
 M140 S{material_bed_temperature}
122 122
 G28
123 123
 ;purge right
@@ -136,9 +136,9 @@ G92 E0
136 136
 ;purge left
137 137
 T1
138 138
 ;M104 T0 S{material_standby_temperature, 0}
139
-M104 T1 S{material_print_temperature ,1}
139
+M104 T1 S{material_print_temperature, 1}
140 140
 G1 X-110 Y-70 Z30 F4800
141
-M109 T1 S{material_print_temperature , 1}
141
+M109 T1 S{material_print_temperature, 1}
142 142
 G92 E0
143 143
 G1 Z0.4 F1800
144 144
 G1 X-67 Y-70 E25 F300 ; purge nozzle

Loading…
Cancel
Save