Browse Source

Remove support for secondary Serial RX port (Huacanzing devices), use TELNET or WEB DEBUG instead

v2
Xose Pérez 6 years ago
parent
commit
f93b100e8a
5 changed files with 4 additions and 48 deletions
  1. +1
    -1
      code/devices/009_itead_sonoff_dual.json
  2. +1
    -1
      code/devices/026_itead_sonoff_rfbridge.json
  3. +0
    -16
      code/espurna/config/general.h
  4. +2
    -4
      code/espurna/hardware.ino
  5. +0
    -26
      code/espurna/settings.ino

+ 1
- 1
code/devices/009_itead_sonoff_dual.json View File

@ -1,7 +1,7 @@
{
"board": 9,
"btnRelay2": 0,
"dbgBaudrate": 19230,
"dbgSpeed": 19230,
"dbgSerial": 0,
"device": "ITEAD_SONOFF_DUAL",
"ledGPIO0": 13,


+ 1
- 1
code/devices/026_itead_sonoff_rfbridge.json View File

@ -2,7 +2,7 @@
"board": 26,
"btnGPIO0": 0,
"btnMode0": 2,
"dbgBaudrate": 19200,
"dbgSpeed": 19200,
"dbgSerial": 0,
"device": "ITEAD_SONOFF_RFBRIDGE",
"ledGPIO0": 13,


+ 0
- 16
code/espurna/config/general.h View File

@ -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


+ 2
- 4
code/espurna/hardware.ino View File

@ -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);


+ 0
- 26
code/espurna/settings.ino View File

@ -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_callback_f> _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
}

Loading…
Cancel
Save