Browse Source

Sanity check old serial names

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
affb5e53df
  1. 2
      Marlin/Configuration_adv.h
  2. 2
      Marlin/src/HAL/AVR/MarlinSerial.h
  3. 8
      Marlin/src/inc/SanityCheck.h
  4. 2
      Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp

2
Marlin/Configuration_adv.h

@ -1409,7 +1409,7 @@
#define DGUS_RX_BUFFER_SIZE 128 #define DGUS_RX_BUFFER_SIZE 128
#define DGUS_TX_BUFFER_SIZE 48 #define DGUS_TX_BUFFER_SIZE 48
//#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS // Fix Rx overrun situation (Currently only for AVR) //#define SERIAL_STATS_RX_BUFFER_OVERRUNS // Fix Rx overrun situation (Currently only for AVR)
#define DGUS_UPDATE_INTERVAL_MS 500 // (ms) Interval between automatic screen updates #define DGUS_UPDATE_INTERVAL_MS 500 // (ms) Interval between automatic screen updates

2
Marlin/src/HAL/AVR/MarlinSerial.h

@ -310,7 +310,7 @@
#if HAS_DGUS_LCD #if HAS_DGUS_LCD
static constexpr unsigned int RX_SIZE = DGUS_RX_BUFFER_SIZE; static constexpr unsigned int RX_SIZE = DGUS_RX_BUFFER_SIZE;
static constexpr unsigned int TX_SIZE = DGUS_TX_BUFFER_SIZE; static constexpr unsigned int TX_SIZE = DGUS_TX_BUFFER_SIZE;
static constexpr bool RX_OVERRUNS = ENABLED(DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS); static constexpr bool RX_OVERRUNS = ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS);
#elif EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON) #elif EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
static constexpr unsigned int RX_SIZE = 64; static constexpr unsigned int RX_SIZE = 64;
static constexpr unsigned int TX_SIZE = 128; static constexpr unsigned int TX_SIZE = 128;

8
Marlin/src/inc/SanityCheck.h

@ -481,6 +481,14 @@
#error "DGUS_SERIAL_PORT is now LCD_SERIAL_PORT. Please update your configuration." #error "DGUS_SERIAL_PORT is now LCD_SERIAL_PORT. Please update your configuration."
#elif defined(DGUS_BAUDRATE) #elif defined(DGUS_BAUDRATE)
#error "DGUS_BAUDRATE is now LCD_BAUDRATE. Please update your configuration." #error "DGUS_BAUDRATE is now LCD_BAUDRATE. Please update your configuration."
#elif defined(DGUS_STATS_RX_BUFFER_OVERRUNS)
#error "DGUS_STATS_RX_BUFFER_OVERRUNS is now STATS_RX_BUFFER_OVERRUNS. Please update your configuration."
#elif defined(DGUS_SERIAL_PORT)
#error "DGUS_SERIAL_PORT is now LCD_SERIAL_PORT. Please update your configuration."
#elif defined(ANYCUBIC_LCD_SERIAL_PORT)
#error "ANYCUBIC_LCD_SERIAL_PORT is now LCD_SERIAL_PORT. Please update your configuration."
#elif defined(INTERNAL_SERIAL_PORT)
#error "INTERNAL_SERIAL_PORT is now MMU2_SERIAL_PORT. Please update your configuration."
#elif defined(X_DUAL_ENDSTOPS_ADJUSTMENT) #elif defined(X_DUAL_ENDSTOPS_ADJUSTMENT)
#error "X_DUAL_ENDSTOPS_ADJUSTMENT is now X2_ENDSTOP_ADJUSTMENT. Please update Configuration_adv.h." #error "X_DUAL_ENDSTOPS_ADJUSTMENT is now X2_ENDSTOP_ADJUSTMENT. Please update Configuration_adv.h."
#elif defined(Y_DUAL_ENDSTOPS_ADJUSTMENT) #elif defined(Y_DUAL_ENDSTOPS_ADJUSTMENT)

2
Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp

@ -129,7 +129,7 @@ void DGUSDisplay::WriteVariablePGM(uint16_t adr, const void* values, uint8_t val
void DGUSDisplay::ProcessRx() { void DGUSDisplay::ProcessRx() {
#if ENABLED(DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS) #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
if (!LCD_SERIAL.available() && LCD_SERIAL.buffer_overruns()) { if (!LCD_SERIAL.available() && LCD_SERIAL.buffer_overruns()) {
// Overrun, but reset the flag only when the buffer is empty // Overrun, but reset the flag only when the buffer is empty
// We want to extract as many as valid datagrams possible... // We want to extract as many as valid datagrams possible...

Loading…
Cancel
Save