Explorar el Código

Suppress redundant serial errors

Scott Lahteine hace 3 años
padre
commit
895e40190b

+ 24
- 12
Marlin/src/HAL/STM32F1/HAL.h Ver fichero

@@ -84,10 +84,13 @@
84 84
   #define MYSERIAL1 UsbSerial
85 85
 #elif WITHIN(SERIAL_PORT, 1, NUM_UARTS)
86 86
   #define MYSERIAL1 MSERIAL(SERIAL_PORT)
87
-#elif NUM_UARTS == 5
88
-  #error "SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
89 87
 #else
90
-  #error "SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
88
+  #define MYSERIAL1 MSERIAL(1) // dummy port
89
+  #if NUM_UARTS == 5
90
+    #error "SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
91
+  #else
92
+    #error "SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
93
+  #endif
91 94
 #endif
92 95
 
93 96
 #ifdef SERIAL_PORT_2
@@ -95,10 +98,13 @@
95 98
     #define MYSERIAL2 UsbSerial
96 99
   #elif WITHIN(SERIAL_PORT_2, 1, NUM_UARTS)
97 100
     #define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
98
-  #elif NUM_UARTS == 5
99
-    #error "SERIAL_PORT_2 must be -1 or from 1 to 5. Please update your configuration."
100 101
   #else
101
-    #error "SERIAL_PORT_2 must be -1 or from 1 to 3. Please update your configuration."
102
+    #define MYSERIAL2 MSERIAL(1) // dummy port
103
+    #if NUM_UARTS == 5
104
+      #error "SERIAL_PORT_2 must be -1 or from 1 to 5. Please update your configuration."
105
+    #else
106
+      #error "SERIAL_PORT_2 must be -1 or from 1 to 3. Please update your configuration."
107
+    #endif
102 108
   #endif
103 109
 #endif
104 110
 
@@ -107,10 +113,13 @@
107 113
     #define MMU2_SERIAL UsbSerial
108 114
   #elif WITHIN(MMU2_SERIAL_PORT, 1, NUM_UARTS)
109 115
     #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
110
-  #elif NUM_UARTS == 5
111
-    #error "MMU2_SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
112 116
   #else
113
-    #error "MMU2_SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
117
+    #define MMU2_SERIAL MSERIAL(1) // dummy port
118
+    #if NUM_UARTS == 5
119
+      #error "MMU2_SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
120
+    #else
121
+      #error "MMU2_SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
122
+    #endif
114 123
   #endif
115 124
 #endif
116 125
 
@@ -119,10 +128,13 @@
119 128
     #define LCD_SERIAL UsbSerial
120 129
   #elif WITHIN(LCD_SERIAL_PORT, 1, NUM_UARTS)
121 130
     #define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
122
-  #elif NUM_UARTS == 5
123
-    #error "LCD_SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
124 131
   #else
125
-    #error "LCD_SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
132
+    #define LCD_SERIAL MSERIAL(1) // dummy port
133
+    #if NUM_UARTS == 5
134
+      #error "LCD_SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
135
+    #else
136
+      #error "LCD_SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
137
+    #endif
126 138
   #endif
127 139
   #if HAS_DGUS_LCD
128 140
     #define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()

+ 2
- 2
Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp Ver fichero

@@ -733,7 +733,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
733 733
 
734 734
 
735 735
   // SDCard File listing
736
-  
736
+
737 737
   #if ENABLED(SDSUPPORT)
738 738
     VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr),
739 739
     VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr),
@@ -760,7 +760,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
760 760
       VPHELPER(VP_OFFSET_Y, &probe.offset.y, ScreenHandler.GetOffsetValue,ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
761 761
       VPHELPER(VP_OFFSET_Z, &probe.offset.z, ScreenHandler.GetOffsetValue,ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
762 762
     #endif
763
-  #else 
763
+  #else
764 764
     VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.PrintReturn, nullptr),
765 765
   #endif
766 766
 

+ 1
- 2
Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.h Ver fichero

@@ -158,7 +158,6 @@ public:
158 158
     static void GetManualFilamentSpeed(DGUS_VP_Variable &var, void *val_ptr);
159 159
   #endif
160 160
 
161
-  
162 161
   #if ENABLED(SDSUPPORT)
163 162
     // Callback for VP "Display wants to change screen when there is a SD card"
164 163
     static void ScreenChangeHookIfSD(DGUS_VP_Variable &var, void *val_ptr);
@@ -184,7 +183,7 @@ public:
184 183
     static void SDCardError();
185 184
     // Marlin informed us about SD print completion.
186 185
     static void SDPrintingFinished();
187
-  #else 
186
+  #else
188 187
     static void PrintReturn(DGUS_VP_Variable &var, void *val_ptr);
189 188
   #endif
190 189
 

+ 1
- 1
buildroot/tests/BIGTREE_SKR_PRO Ver fichero

@@ -26,7 +26,7 @@ opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 SERIAL_PORT -1 \
26 26
         CUTTER_POWER_UNIT PERCENT \
27 27
         SPINDLE_LASER_PWM_PIN HEATER_1_PIN SPINDLE_LASER_ENA_PIN HEATER_2_PIN \
28 28
         TEMP_SENSOR_COOLER 1000 TEMP_COOLER_PIN PD13
29
-opt_enable LASER_FEATURE REPRAP_DISCOUNT_SMART_CONTROLLER 
29
+opt_enable LASER_FEATURE REPRAP_DISCOUNT_SMART_CONTROLLER
30 30
 exec_test $1 $2 "BigTreeTech SKR Pro | Laser (Percent) | Cooling | LCD" "$3"
31 31
 
32 32
 # clean up

Loading…
Cancelar
Guardar