Parcourir la source

Fix up serial sanity check

Scott Lahteine il y a 7 ans
Parent
révision
fc9ee1a4de

+ 7
- 11
Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h Voir le fichier

@@ -55,17 +55,13 @@
55 55
   #define TX_BUFFER_SIZE 32
56 56
 #endif
57 57
 
58
-#if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
59
-  #error "XON/XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
60
-#endif
61
-
62
-#if !IS_POWER_OF_2(RX_BUFFER_SIZE) || RX_BUFFER_SIZE < 2
63
-  #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
64
-#endif
65
-
66
-#if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
67
-  #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
68
-#endif
58
+//#if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
59
+//  #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
60
+//#elif RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE))
61
+//  #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
62
+//#elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
63
+//  #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
64
+//#endif
69 65
 
70 66
 #if RX_BUFFER_SIZE > 256
71 67
   typedef uint16_t ring_buffer_pos_t;

+ 2
- 6
Marlin/src/inc/SanityCheck.h Voir le fichier

@@ -260,13 +260,9 @@
260 260
 #ifndef USBCON
261 261
   #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
262 262
     #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
263
-  #endif
264
-
265
-  #if !IS_POWER_OF_2(RX_BUFFER_SIZE) || RX_BUFFER_SIZE < 2
263
+  #elif RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE))
266 264
     #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
267
-  #endif
268
-
269
-  #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
265
+  #elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
270 266
     #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
271 267
   #endif
272 268
 #elif ENABLED(SERIAL_XON_XOFF)

+ 1
- 1
Marlin/src/module/configuration_store.cpp Voir le fichier

@@ -262,7 +262,7 @@ void MarlinSettings::postprocess() {
262 262
   #if ENABLED(FWRETRACT)
263 263
     fwretract.refresh_autoretract();
264 264
   #endif
265
- 
265
+
266 266
   // Refresh steps_to_mm with the reciprocal of axis_steps_per_mm
267 267
   // and init stepper.count[], planner.position[] with current_position
268 268
   planner.refresh_positioning();

Chargement…
Annuler
Enregistrer