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
   #define NUM_SERIAL 1
91
   #define NUM_SERIAL 1
92
 #else
92
 #else
93
   #if !WITHIN(SERIAL_PORT, -1, 3)
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
   #endif
95
   #endif
96
 
96
 
97
   #define MYSERIAL0 customizedSerial1
97
   #define MYSERIAL0 customizedSerial1
98
 
98
 
99
   #ifdef SERIAL_PORT_2
99
   #ifdef SERIAL_PORT_2
100
     #if !WITHIN(SERIAL_PORT_2, -1, 3)
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
     #elif SERIAL_PORT_2 == SERIAL_PORT
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
     #endif
104
     #endif
105
-    #define NUM_SERIAL 2
106
     #define MYSERIAL1 customizedSerial2
105
     #define MYSERIAL1 customizedSerial2
106
+    #define NUM_SERIAL 2
107
   #else
107
   #else
108
     #define NUM_SERIAL 1
108
     #define NUM_SERIAL 1
109
   #endif
109
   #endif

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

56
 #ifdef SERIAL_PORT_2
56
 #ifdef SERIAL_PORT_2
57
   #if SERIAL_PORT_2 == SERIAL_PORT
57
   #if SERIAL_PORT_2 == SERIAL_PORT
58
     #error "SERIAL_PORT_2 must be different from SERIAL_PORT. Please update your configuration."
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
     #define MYSERIAL1 customizedSerial2
60
     #define MYSERIAL1 customizedSerial2
62
   #elif SERIAL_PORT_2 == 0
61
   #elif SERIAL_PORT_2 == 0
63
     #define MYSERIAL1 Serial
62
     #define MYSERIAL1 Serial

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

48
 #define MYSERIAL0 flushableSerial
48
 #define MYSERIAL0 flushableSerial
49
 
49
 
50
 #if ENABLED(WIFISUPPORT)
50
 #if ENABLED(WIFISUPPORT)
51
-  #define NUM_SERIAL 2
52
   #define MYSERIAL1 webSocketSerial
51
   #define MYSERIAL1 webSocketSerial
52
+  #define NUM_SERIAL 2
53
 #else
53
 #else
54
   #define NUM_SERIAL 1
54
   #define NUM_SERIAL 1
55
 #endif
55
 #endif

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

61
   #define ST7920_DELAY_3 DELAY_NS(750)
61
   #define ST7920_DELAY_3 DELAY_NS(750)
62
 #endif
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
 #if SERIAL_PORT == -1
64
 #if SERIAL_PORT == -1
69
   #define MYSERIAL0 UsbSerial
65
   #define MYSERIAL0 UsbSerial
70
 #elif SERIAL_PORT == 0
66
 #elif SERIAL_PORT == 0
75
   #define MYSERIAL0 MSerial2
71
   #define MYSERIAL0 MSerial2
76
 #elif SERIAL_PORT == 3
72
 #elif SERIAL_PORT == 3
77
   #define MYSERIAL0 MSerial3
73
   #define MYSERIAL0 MSerial3
74
+#else
75
+  #error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
78
 #endif
76
 #endif
79
 
77
 
80
 #ifdef SERIAL_PORT_2
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
     #define MYSERIAL1 UsbSerial
82
     #define MYSERIAL1 UsbSerial
89
   #elif SERIAL_PORT_2 == 0
83
   #elif SERIAL_PORT_2 == 0
90
     #define MYSERIAL1 MSerial
84
     #define MYSERIAL1 MSerial
94
     #define MYSERIAL1 MSerial2
88
     #define MYSERIAL1 MSerial2
95
   #elif SERIAL_PORT_2 == 3
89
   #elif SERIAL_PORT_2 == 3
96
     #define MYSERIAL1 MSerial3
90
     #define MYSERIAL1 MSerial3
91
+  #else
92
+    #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
97
   #endif
93
   #endif
94
+  #define NUM_SERIAL 2
98
 #else
95
 #else
99
   #define NUM_SERIAL 1
96
   #define NUM_SERIAL 1
100
 #endif
97
 #endif

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

33
   #include "MarlinSerial_AGCM4.h"
33
   #include "MarlinSerial_AGCM4.h"
34
 
34
 
35
   // Serial ports
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
   // MYSERIAL0 required before MarlinSerial includes!
37
   // MYSERIAL0 required before MarlinSerial includes!
38
+
41
   #if SERIAL_PORT == -1
39
   #if SERIAL_PORT == -1
42
     #define MYSERIAL0 Serial
40
     #define MYSERIAL0 Serial
43
   #elif SERIAL_PORT == 0
41
   #elif SERIAL_PORT == 0
46
     #define MYSERIAL0 Serial2
44
     #define MYSERIAL0 Serial2
47
   #elif SERIAL_PORT == 2
45
   #elif SERIAL_PORT == 2
48
     #define MYSERIAL0 Serial3
46
     #define MYSERIAL0 Serial3
49
-  #else
47
+  #elif SERIAL_PORT == 3
50
     #define MYSERIAL0 Serial4
48
     #define MYSERIAL0 Serial4
49
+  #else
50
+    #error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
51
   #endif
51
   #endif
52
 
52
 
53
   #ifdef SERIAL_PORT_2
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
       #define MYSERIAL1 Serial
57
       #define MYSERIAL1 Serial
62
     #elif SERIAL_PORT_2 == 0
58
     #elif SERIAL_PORT_2 == 0
63
       #define MYSERIAL1 Serial1
59
       #define MYSERIAL1 Serial1
65
       #define MYSERIAL1 Serial2
61
       #define MYSERIAL1 Serial2
66
     #elif SERIAL_PORT_2 == 2
62
     #elif SERIAL_PORT_2 == 2
67
       #define MYSERIAL1 Serial3
63
       #define MYSERIAL1 Serial3
68
-    #else
64
+    #elif SERIAL_PORT_2 == 3
69
       #define MYSERIAL1 Serial4
65
       #define MYSERIAL1 Serial4
66
+    #else
67
+      #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
70
     #endif
68
     #endif
69
+    #define NUM_SERIAL 2
71
   #else
70
   #else
72
     #define NUM_SERIAL 1
71
     #define NUM_SERIAL 1
73
   #endif
72
   #endif

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

44
 // ------------------------
44
 // ------------------------
45
 
45
 
46
 #if SERIAL_PORT == 0
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
   #define MYSERIAL0 SerialUSB
49
   #define MYSERIAL0 SerialUSB
55
 #elif SERIAL_PORT == 1
50
 #elif SERIAL_PORT == 1
56
   #define MYSERIAL0 Serial1
51
   #define MYSERIAL0 Serial1
64
   #define MYSERIAL0 Serial5
59
   #define MYSERIAL0 Serial5
65
 #elif SERIAL_PORT == 6
60
 #elif SERIAL_PORT == 6
66
   #define MYSERIAL0 Serial6
61
   #define MYSERIAL0 Serial6
62
+#else
63
+  #error "SERIAL_PORT must be from -1 to 6. Please update your configuration."
67
 #endif
64
 #endif
68
 
65
 
69
 #ifdef SERIAL_PORT_2
66
 #ifdef SERIAL_PORT_2
67
+  #define NUM_SERIAL 2
70
   #if SERIAL_PORT_2 == 0
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
   #elif SERIAL_PORT_2 == SERIAL_PORT
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
     #define MYSERIAL1 SerialUSB
73
     #define MYSERIAL1 SerialUSB
82
   #elif SERIAL_PORT_2 == 1
74
   #elif SERIAL_PORT_2 == 1
83
     #define MYSERIAL1 Serial1
75
     #define MYSERIAL1 Serial1
91
     #define MYSERIAL1 Serial5
83
     #define MYSERIAL1 Serial5
92
   #elif SERIAL_PORT_2 == 6
84
   #elif SERIAL_PORT_2 == 6
93
     #define MYSERIAL1 Serial6
85
     #define MYSERIAL1 Serial6
86
+  #else
87
+    #error "SERIAL_PORT_2 must be from -1 to 6. Please update your configuration."
94
   #endif
88
   #endif
95
 #else
89
 #else
96
   #define NUM_SERIAL 1
90
   #define NUM_SERIAL 1

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

78
   #define MSerial5  Serial4
78
   #define MSerial5  Serial4
79
 #endif
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
   #define MYSERIAL0 UsbSerial
84
   #define MYSERIAL0 UsbSerial
86
-#elif SERIAL_PORT == 0
87
-  #error "Serial port 0 does not exist"
88
 #elif SERIAL_PORT == 1
85
 #elif SERIAL_PORT == 1
89
   #define MYSERIAL0 MSerial1
86
   #define MYSERIAL0 MSerial1
90
 #elif SERIAL_PORT == 2
87
 #elif SERIAL_PORT == 2
95
   #define MYSERIAL0 MSerial4
92
   #define MYSERIAL0 MSerial4
96
 #elif SERIAL_PORT == 5
93
 #elif SERIAL_PORT == 5
97
   #define MYSERIAL0 MSerial5
94
   #define MYSERIAL0 MSerial5
95
+#else
96
+  #error "SERIAL_PORT must be from -1 to 5. Please update your configuration."
98
 #endif
97
 #endif
99
 
98
 
100
 #ifdef SERIAL_PORT_2
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
   #elif SERIAL_PORT_2 == SERIAL_PORT
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
     #define MYSERIAL1 UsbSerial
105
     #define MYSERIAL1 UsbSerial
109
-  #elif SERIAL_PORT_2 == 0
110
-  #error "Serial port 0 does not exist"
111
   #elif SERIAL_PORT_2 == 1
106
   #elif SERIAL_PORT_2 == 1
112
     #define MYSERIAL1 MSerial1
107
     #define MYSERIAL1 MSerial1
113
   #elif SERIAL_PORT_2 == 2
108
   #elif SERIAL_PORT_2 == 2
118
     #define MYSERIAL1 MSerial4
113
     #define MYSERIAL1 MSerial4
119
   #elif SERIAL_PORT_2 == 5
114
   #elif SERIAL_PORT_2 == 5
120
     #define MYSERIAL1 MSerial5
115
     #define MYSERIAL1 MSerial5
116
+  #else
117
+    #error "SERIAL_PORT_2 must be from -1 to 5. Please update your configuration."
121
   #endif
118
   #endif
119
+  #define NUM_SERIAL 2
122
 #else
120
 #else
123
   #define NUM_SERIAL 1
121
   #define NUM_SERIAL 1
124
 #endif
122
 #endif

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

44
 // Defines
44
 // Defines
45
 // ------------------------
45
 // ------------------------
46
 
46
 
47
-//Serial override
47
+// Serial override
48
 //extern HalSerial usb_serial;
48
 //extern HalSerial usb_serial;
49
 
49
 
50
 #if defined(STM32F4) && SERIAL_PORT == 0
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
   #define MYSERIAL0 SerialUSB
53
   #define MYSERIAL0 SerialUSB
59
 #elif SERIAL_PORT == 1
54
 #elif SERIAL_PORT == 1
60
   #define MYSERIAL0 SerialUART1
55
   #define MYSERIAL0 SerialUART1
68
   #define MYSERIAL0 SerialUART5
63
   #define MYSERIAL0 SerialUART5
69
 #elif SERIAL_PORT == 6
64
 #elif SERIAL_PORT == 6
70
   #define MYSERIAL0 SerialUART6
65
   #define MYSERIAL0 SerialUART6
66
+#else
67
+  #error "SERIAL_PORT must be from -1 to 6. Please update your configuration."
71
 #endif
68
 #endif
72
 
69
 
73
 #ifdef SERIAL_PORT_2
70
 #ifdef SERIAL_PORT_2
74
   #if defined(STM32F4) && SERIAL_PORT_2 == 0
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
   #elif SERIAL_PORT_2 == SERIAL_PORT
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
     #define MYSERIAL1 SerialUSB
76
     #define MYSERIAL1 SerialUSB
85
   #elif SERIAL_PORT_2 == 1
77
   #elif SERIAL_PORT_2 == 1
86
     #define MYSERIAL1 SerialUART1
78
     #define MYSERIAL1 SerialUART1
94
     #define MYSERIAL1 SerialUART5
86
     #define MYSERIAL1 SerialUART5
95
   #elif SERIAL_PORT_2 == 6
87
   #elif SERIAL_PORT_2 == 6
96
     #define MYSERIAL1 SerialUART6
88
     #define MYSERIAL1 SerialUART6
89
+  #else
90
+    #error "SERIAL_PORT_2 must be from -1 to 6. Please update your configuration."
97
   #endif
91
   #endif
92
+  #define NUM_SERIAL 2
98
 #else
93
 #else
99
   #define NUM_SERIAL 1
94
   #define NUM_SERIAL 1
100
 #endif
95
 #endif

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

164
  * link register (i.e. not a normal register) and the stack pointer value
164
  * link register (i.e. not a normal register) and the stack pointer value
165
  * supplied.
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
  * perform the traceback. Otherwise, brute force will be employed
168
  * perform the traceback. Otherwise, brute force will be employed
169
  * -If the program was compiled with -mpoke-function-name, then you will
169
  * -If the program was compiled with -mpoke-function-name, then you will
170
  * get function names in the traceback. Otherwise, you will not.
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
   ncs();
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
 // clear the screen, preventing a garbled display.
916
 // clear the screen, preventing a garbled display.
917
 void ST7920_Lite_Status_Screen::clear_text_buffer() {
917
 void ST7920_Lite_Status_Screen::clear_text_buffer() {
918
   cs();
918
   cs();

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

74
 
74
 
75
   0x038,              // 8 Bit interface (DL=1), basic instruction set (RE=0)
75
   0x038,              // 8 Bit interface (DL=1), basic instruction set (RE=0)
76
   0x00C,              // display on, cursor & blink off; 0x08: all off
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
   0x002,              // disable scroll, enable CGRAM adress
78
   0x002,              // disable scroll, enable CGRAM adress
79
   0x001,              // clear RAM, needs 1.6 ms
79
   0x001,              // clear RAM, needs 1.6 ms
80
   U8G_ESC_DLY(100),   // delay 100 ms
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
 
179
 
180
 #else
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
 #endif
183
 #endif

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

1179
       #endif
1179
       #endif
1180
     }
1180
     }
1181
   #elif ANY(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED)
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
   #elif ENABLED(TOUCH_UI_INVERTED)
1183
   #elif ENABLED(TOUCH_UI_INVERTED)
1184
     mem_write_32(REG::ROTATE, 1);
1184
     mem_write_32(REG::ROTATE, 1);
1185
   #endif
1185
   #endif

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

124
   }
124
   }
125
 
125
 
126
 #else
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
 #endif
128
 #endif

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

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

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

29
 
29
 
30
 #ifdef CR10_TFT_PINMAP
30
 #ifdef CR10_TFT_PINMAP
31
   #ifndef __MARLIN_FIRMWARE__
31
   #ifndef __MARLIN_FIRMWARE__
32
-    #error This pin mapping requires Marlin.
32
+    #error "This pin mapping requires Marlin."
33
   #endif
33
   #endif
34
 
34
 
35
   #define CLCD_USE_SOFT_SPI
35
   #define CLCD_USE_SOFT_SPI
49
 
49
 
50
 #ifdef AO_EXP1_DEPRECATED_PINMAP
50
 #ifdef AO_EXP1_DEPRECATED_PINMAP
51
   #ifndef __MARLIN_FIRMWARE__
51
   #ifndef __MARLIN_FIRMWARE__
52
-    #error This pin mapping requires Marlin.
52
+    #error "This pin mapping requires Marlin."
53
   #endif
53
   #endif
54
 
54
 
55
   #define CLCD_MOD_RESET                 LCD_PINS_D4
55
   #define CLCD_MOD_RESET                 LCD_PINS_D4
89
 
89
 
90
 #ifdef AO_EXP1_PINMAP
90
 #ifdef AO_EXP1_PINMAP
91
   #ifndef __MARLIN_FIRMWARE__
91
   #ifndef __MARLIN_FIRMWARE__
92
-    #error This pin mapping requires Marlin.
92
+    #error "This pin mapping requires Marlin."
93
   #endif
93
   #endif
94
 
94
 
95
   #define CLCD_MOD_RESET                 LCD_PINS_ENABLE
95
   #define CLCD_MOD_RESET                 LCD_PINS_ENABLE
134
 
134
 
135
 #ifdef AO_EXP2_PINMAP
135
 #ifdef AO_EXP2_PINMAP
136
   #ifndef __MARLIN_FIRMWARE__
136
   #ifndef __MARLIN_FIRMWARE__
137
-    #error This pin mapping requires Marlin.
137
+    #error "This pin mapping requires Marlin."
138
   #endif
138
   #endif
139
 
139
 
140
   #define CLCD_SPI_CS                    BTN_EN1
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
         .tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISABLE_STEPPERS))
55
         .tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISABLE_STEPPERS))
56
         .tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_TEMPERATURE))
56
         .tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_TEMPERATURE))
57
         .enabled(
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
             1
59
             1
60
           #endif
60
           #endif
61
         )
61
         )

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

232
     static void enqueueAndWait_P(const progmem_str message, const progmem_str commands);
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
 class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE,STATUS_SCREEN_DL_SIZE> {
236
 class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE,STATUS_SCREEN_DL_SIZE> {
237
   private:
237
   private:
238
     static void draw_axis_position(draw_mode_t);
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
 
22
 
23
 #include "../config.h"
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
 #include "screens.h"
27
 #include "screens.h"
28
 #include "screen_data.h"
28
 #include "screen_data.h"

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

75
   constexpr uint32_t gray_color_5       = hsl_to_rgb(accent_hue, gray_sat, 0.78);
75
   constexpr uint32_t gray_color_5       = hsl_to_rgb(accent_hue, gray_sat, 0.78);
76
   constexpr uint32_t gray_color_6       = hsl_to_rgb(accent_hue, gray_sat, 0.91); // Lightest
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
     // Lulzbot TAZ Pro
79
     // Lulzbot TAZ Pro
80
     constexpr uint32_t theme_darkest    = gray_color_1;
80
     constexpr uint32_t theme_darkest    = gray_color_1;
81
     constexpr uint32_t theme_dark       = gray_color_2;
81
     constexpr uint32_t theme_dark       = gray_color_2;

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

34
 #include "extensible_ui/lib/dgus/DGUSDisplay.h"
34
 #include "extensible_ui/lib/dgus/DGUSDisplay.h"
35
 #include "extensible_ui/lib/dgus/DGUSDisplayDefinition.h"
35
 #include "extensible_ui/lib/dgus/DGUSDisplayDefinition.h"
36
 
36
 
37
+extern const char NUL_STR[];
38
+
37
 namespace ExtUI {
39
 namespace ExtUI {
38
 
40
 
39
   void onStartup() {
41
   void onStartup() {
44
   void onIdle() { ScreenHandler.loop(); }
46
   void onIdle() { ScreenHandler.loop(); }
45
 
47
 
46
   void onPrinterKilled(PGM_P error, PGM_P component) {
48
   void onPrinterKilled(PGM_P error, PGM_P component) {
47
-    extern const char NUL_STR[];
48
     ScreenHandler.sendinfoscreen(GET_TEXT(MSG_HALTED), error, NUL_STR, GET_TEXT(MSG_PLEASE_RESET), true, true, true, true);
49
     ScreenHandler.sendinfoscreen(GET_TEXT(MSG_HALTED), error, NUL_STR, GET_TEXT(MSG_PLEASE_RESET), true, true, true, true);
49
     ScreenHandler.GotoScreen(DGUSLCD_SCREEN_KILL);
50
     ScreenHandler.GotoScreen(DGUSLCD_SCREEN_KILL);
50
     while (!ScreenHandler.loop());  // Wait while anything is left to be sent
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
   void onPlayTone(const uint16_t frequency, const uint16_t duration) {}
70
   void onPlayTone(const uint16_t frequency, const uint16_t duration) {}
58
   void onPrintTimerStarted() {}
71
   void onPrintTimerStarted() {}

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

60
   void onFactoryReset() {}
60
   void onFactoryReset() {}
61
 
61
 
62
   void onStoreSettings(char *buff) {
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
     // permanent data to be stored, it can write up to eeprom_data_size bytes
64
     // permanent data to be stored, it can write up to eeprom_data_size bytes
65
     // into buff.
65
     // into buff.
66
 
66
 
70
   }
70
   }
71
 
71
 
72
   void onLoadSettings(const char *buff) {
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
     // needs to retrieve data, it should copy up to eeprom_data_size bytes
74
     // needs to retrieve data, it should copy up to eeprom_data_size bytes
75
     // from buff
75
     // from buff
76
 
76
 
80
   }
80
   }
81
 
81
 
82
   void onConfigurationStoreWritten(bool success) {
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
     // whether successful or not.
84
     // whether successful or not.
85
   }
85
   }
86
 
86
 
87
   void onConfigurationStoreRead(bool success) {
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
     // whether successful or not.
89
     // whether successful or not.
90
   }
90
   }
91
 
91
 
92
   void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {
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
 
117
 
118
 ;START G-CODE;
118
 ;START G-CODE;
119
 M104 T0 S{material_print_temperature, 0}
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
 M140 S{material_bed_temperature}
121
 M140 S{material_bed_temperature}
122
 G28
122
 G28
123
 ;purge right
123
 ;purge right
136
 ;purge left
136
 ;purge left
137
 T1
137
 T1
138
 ;M104 T0 S{material_standby_temperature, 0}
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
 G1 X-110 Y-70 Z30 F4800
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
 G92 E0
142
 G92 E0
143
 G1 Z0.4 F1800
143
 G1 Z0.4 F1800
144
 G1 X-67 Y-70 E25 F300 ; purge nozzle
144
 G1 X-67 Y-70 E25 F300 ; purge nozzle

Loading…
Cancel
Save