diff --git a/code/devices/009_itead_sonoff_dual.json b/code/devices/009_itead_sonoff_dual.json index 23bb6dc3..b519dbc3 100644 --- a/code/devices/009_itead_sonoff_dual.json +++ b/code/devices/009_itead_sonoff_dual.json @@ -1,7 +1,7 @@ { "board": 9, "btnRelay2": 0, - "dbgBaudrate": 19230, + "dbgSpeed": 19230, "dbgSerial": 0, "device": "ITEAD_SONOFF_DUAL", "ledGPIO0": 13, diff --git a/code/devices/026_itead_sonoff_rfbridge.json b/code/devices/026_itead_sonoff_rfbridge.json index 66326e78..5d06ae04 100644 --- a/code/devices/026_itead_sonoff_rfbridge.json +++ b/code/devices/026_itead_sonoff_rfbridge.json @@ -2,7 +2,7 @@ "board": 26, "btnGPIO0": 0, "btnMode0": 2, - "dbgBaudrate": 19200, + "dbgSpeed": 19200, "dbgSerial": 0, "device": "ITEAD_SONOFF_RFBRIDGE", "ledGPIO0": 13, diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 91667615..f879dd28 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -46,22 +46,6 @@ // (in millis overflowing every 1000 seconds) #endif -// Second serial port (used for RX) - -#ifndef SERIAL_RX_ENABLED -#define SERIAL_RX_ENABLED 0 // Secondary serial port for RX -#endif - -#ifndef SERIAL_RX_PORT -#define SERIAL_RX_PORT Serial // This setting is usually defined - // in the hardware.h file for those - // boards that require it -#endif - -#ifndef SERIAL_RX_BAUDRATE -#define SERIAL_RX_BAUDRATE 115200 // Default baudrate -#endif - //------------------------------------------------------------------------------ // UDP debug log diff --git a/code/espurna/hardware.ino b/code/espurna/hardware.ino index ff60ec15..e07a3c41 100644 --- a/code/espurna/hardware.ino +++ b/code/espurna/hardware.ino @@ -216,7 +216,7 @@ void _hardwareLoad() { setSetting("rlyDummy", 2); setSetting("dbgSerial", 0); - setSetting("dbgBaudrate", 19230); + setSetting("dbgSpeed", 19230); #elif defined(ITEAD_1CH_INCHING) @@ -491,7 +491,6 @@ void _hardwareLoad() { setSetting("rlyDummy", 1); setSetting("dbgPort", 1); - setSetting("dbgRXEnabled", 1); setSetting("litProvider", LIGHT_PROVIDER_DIMMER); setSetting("litChGPIO", 0, 15); @@ -538,7 +537,7 @@ void _hardwareLoad() { // MCU EFM8BB1 via UART at 19200 bps so we need to change the speed of // the port and remove UART noise on serial line setSetting("dbgSerial", 0); - setSetting("dbgBaudrate", 19200); + setSetting("dbgSpeed", 19200); setSetting("rfbDirect", 0); setSetting("rfbRXGPIO", 4); @@ -793,7 +792,6 @@ void _hardwareLoad() { setSetting("rlyDummy", 1); setSetting("dbgPort", 1); - setSetting("dbgRXEnabled", 1); setSetting("litProvider", LIGHT_PROVIDER_DIMMER); setSetting("litChGPIO", 0, 12); diff --git a/code/espurna/settings.ino b/code/espurna/settings.ino index 075a2cc3..c8c37c2f 100644 --- a/code/espurna/settings.ino +++ b/code/espurna/settings.ino @@ -17,13 +17,6 @@ Module key prefix: cfg StreamInjector _serial = StreamInjector(TERMINAL_BUFFER_SIZE); EmbedisWrap embedis(_serial, TERMINAL_BUFFER_SIZE); -#if TERMINAL_SUPPORT -#if SERIAL_RX_ENABLED - char _serial_rx_buffer[TERMINAL_BUFFER_SIZE]; - static unsigned char _serial_rx_pointer = 0; -#endif // SERIAL_RX_ENABLED -#endif // TERMINAL_SUPPORT - bool _settings_save = false; std::vector _setting_key_check_callbacks; @@ -552,12 +545,6 @@ void settingsSetup() { _settingsInitCommands(); - #if TERMINAL_SUPPORT - #if SERIAL_RX_ENABLED - SERIAL_RX_PORT.begin(SERIAL_RX_BAUDRATE); - #endif // SERIAL_RX_ENABLED - #endif // TERMINAL_SUPPORT - // Register key check settingsRegisterKeyCheck(_settingsKeyCheck); @@ -583,19 +570,6 @@ void settingsLoop() { embedis.process(); - #if SERIAL_RX_ENABLED - - while (SERIAL_RX_PORT.available() > 0) { - char rc = Serial.read(); - _serial_rx_buffer[_serial_rx_pointer++] = rc; - if ((_serial_rx_pointer == TERMINAL_BUFFER_SIZE) || (rc == 10)) { - settingsInject(_serial_rx_buffer, (size_t) _serial_rx_pointer); - _serial_rx_pointer = 0; - } - } - - #endif // SERIAL_RX_ENABLED - #endif // TERMINAL_SUPPORT }