Quellcode durchsuchen

Fix up serial sanity check

Scott Lahteine vor 7 Jahren
Ursprung
Commit
fc9ee1a4de

+ 7
- 11
Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h Datei anzeigen

55
   #define TX_BUFFER_SIZE 32
55
   #define TX_BUFFER_SIZE 32
56
 #endif
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
 #if RX_BUFFER_SIZE > 256
66
 #if RX_BUFFER_SIZE > 256
71
   typedef uint16_t ring_buffer_pos_t;
67
   typedef uint16_t ring_buffer_pos_t;

+ 2
- 6
Marlin/src/inc/SanityCheck.h Datei anzeigen

260
 #ifndef USBCON
260
 #ifndef USBCON
261
   #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
261
   #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
262
     #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
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
     #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
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
     #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
266
     #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
271
   #endif
267
   #endif
272
 #elif ENABLED(SERIAL_XON_XOFF)
268
 #elif ENABLED(SERIAL_XON_XOFF)

+ 1
- 1
Marlin/src/module/configuration_store.cpp Datei anzeigen

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

Laden…
Abbrechen
Speichern