Browse Source

Suppress redundant serial errors

vanilla_fb_2.0.x
Scott Lahteine 3 years ago
parent
commit
895e40190b
  1. 36
      Marlin/src/HAL/STM32F1/HAL.h
  2. 1
      Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.h

36
Marlin/src/HAL/STM32F1/HAL.h

@ -84,10 +84,13 @@
#define MYSERIAL1 UsbSerial
#elif WITHIN(SERIAL_PORT, 1, NUM_UARTS)
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
#elif NUM_UARTS == 5
#error "SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
#else
#error "SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
#define MYSERIAL1 MSERIAL(1) // dummy port
#if NUM_UARTS == 5
#error "SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
#else
#error "SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
#endif
#endif
#ifdef SERIAL_PORT_2
@ -95,10 +98,13 @@
#define MYSERIAL2 UsbSerial
#elif WITHIN(SERIAL_PORT_2, 1, NUM_UARTS)
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
#elif NUM_UARTS == 5
#error "SERIAL_PORT_2 must be -1 or from 1 to 5. Please update your configuration."
#else
#error "SERIAL_PORT_2 must be -1 or from 1 to 3. Please update your configuration."
#define MYSERIAL2 MSERIAL(1) // dummy port
#if NUM_UARTS == 5
#error "SERIAL_PORT_2 must be -1 or from 1 to 5. Please update your configuration."
#else
#error "SERIAL_PORT_2 must be -1 or from 1 to 3. Please update your configuration."
#endif
#endif
#endif
@ -107,10 +113,13 @@
#define MMU2_SERIAL UsbSerial
#elif WITHIN(MMU2_SERIAL_PORT, 1, NUM_UARTS)
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
#elif NUM_UARTS == 5
#error "MMU2_SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
#else
#error "MMU2_SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
#define MMU2_SERIAL MSERIAL(1) // dummy port
#if NUM_UARTS == 5
#error "MMU2_SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
#else
#error "MMU2_SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
#endif
#endif
#endif
@ -119,10 +128,13 @@
#define LCD_SERIAL UsbSerial
#elif WITHIN(LCD_SERIAL_PORT, 1, NUM_UARTS)
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
#elif NUM_UARTS == 5
#error "LCD_SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
#else
#error "LCD_SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
#define LCD_SERIAL MSERIAL(1) // dummy port
#if NUM_UARTS == 5
#error "LCD_SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
#else
#error "LCD_SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
#endif
#endif
#if HAS_DGUS_LCD
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()

1
Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.h

@ -158,7 +158,6 @@ public:
static void GetManualFilamentSpeed(DGUS_VP_Variable &var, void *val_ptr);
#endif
#if ENABLED(SDSUPPORT)
// Callback for VP "Display wants to change screen when there is a SD card"
static void ScreenChangeHookIfSD(DGUS_VP_Variable &var, void *val_ptr);

Loading…
Cancel
Save