From d8e892a0de4c39f98c8e6a9ca73dc60d44d13553 Mon Sep 17 00:00:00 2001 From: RaphDaMan Date: Sun, 21 Mar 2021 16:16:11 +0100 Subject: [PATCH] Changes proposed by Theo on PR. --- tasmota/i18n.h | 4 ++-- tasmota/xsns_88_tfminiplus.ino | 16 ++-------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/tasmota/i18n.h b/tasmota/i18n.h index 841d6e557..13f2c494e 100644 --- a/tasmota/i18n.h +++ b/tasmota/i18n.h @@ -211,8 +211,8 @@ #define D_JSON_IMPORT "Import" #define D_JSON_EXPORT "Export" #define D_JSON_TOTAL_ACTIVE "TotalActive" -#define D_JSON_SIGNALSTRENGTH "Signal Strength" -#define D_JSON_CHIPTEMPERATURE "Chip Temperature" +#define D_JSON_SIGNALSTRENGTH "SignalStrength" +#define D_JSON_CHIPTEMPERATURE "ChipTemperature" #define D_RSLT_ENERGY "ENERGY" #define D_RSLT_HASS_STATE "HASS_STATE" diff --git a/tasmota/xsns_88_tfminiplus.ino b/tasmota/xsns_88_tfminiplus.ino index 5a7b7e830..21be74478 100644 --- a/tasmota/xsns_88_tfminiplus.ino +++ b/tasmota/xsns_88_tfminiplus.ino @@ -92,12 +92,7 @@ struct xsns_88_tfminiplus } tfminiplus_sensor; // Software and hardware serial pointers -#ifdef ESP8266 TasmotaSerial *TfmpSerial = nullptr; -#endif // ESP8266 -#ifdef ESP32 -HardwareSerial *TfmpSerial = nullptr; -#endif // ESP32 void TfmpInit(void) { @@ -105,7 +100,6 @@ void TfmpInit(void) { if (PinUsed(GPIO_TFMINIPLUS_RX) && PinUsed(GPIO_TFMINIPLUS_TX)) { -#ifdef ESP8266 TfmpSerial = new TasmotaSerial(Pin(GPIO_TFMINIPLUS_RX), Pin(GPIO_TFMINIPLUS_TX), 1); if (TfmpSerial->begin(BAUDRATE)) { @@ -116,12 +110,6 @@ void TfmpInit(void) tfminiplus_sensor.ready = true; TfmpSerial->flush(); } -#endif // ESP8266 -#ifdef ESP32 - TfmpSerial = new HardwareSerial(2); - TfmpSerial->begin(BAUDRATE, SERIAL_8N1, Pin(GPIO_TFMINIPLUS_RX), Pin(GPIO_TFMINIPLUS_TX)); - TfmpSerial->flush(); -#endif // ESP32 } } } @@ -170,7 +158,7 @@ void TfmpProcessSerialData (void) while (TfmpSerial->available() > 0) { data = TfmpSerial->read(); - dataReady = addData((char)data); + dataReady = TfmpAddData((char)data); if (dataReady) { TfmpProcessData(); @@ -179,7 +167,7 @@ void TfmpProcessSerialData (void) } } -bool addData(char nextChar) +bool TfmpAddData(char nextChar) { // Buffer position static uint8_t currentIndex = 0;