From bdc7e0a65b0795747ebfde84731858fd6b6e0072 Mon Sep 17 00:00:00 2001 From: SteWers <42718143+SteWers@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:27:37 +0100 Subject: [PATCH] [Solax X1] Increase receive buffer (#22467) Increase receive buffer, because it was too small, when using Software Serial. --- tasmota/tasmota_xnrg_energy/xnrg_12_solaxX1.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_xnrg_energy/xnrg_12_solaxX1.ino b/tasmota/tasmota_xnrg_energy/xnrg_12_solaxX1.ino index 5e69d278d..d0f8ad9e9 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_12_solaxX1.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_12_solaxX1.ino @@ -329,7 +329,7 @@ void solaxX1_SwitchMeterMode(bool MeterMode) { /*********************************************************************************************/ void solaxX1_CyclicTask(void) { // Every 100/250 milliseconds - uint8_t DataRead[80] = {0}; + uint8_t DataRead[256] = {0}; uint8_t TempData[16] = {0}; char TempDataChar[32]; float TempFloat; @@ -571,7 +571,7 @@ return; void solaxX1_SnsInit(void) { AddLog(LOG_LEVEL_INFO, PSTR("SX1: Init - RX-pin: %d, TX-pin: %d, RTS-pin: %d"), Pin(GPIO_SOLAXX1_RX), Pin(GPIO_SOLAXX1_TX), Pin(GPIO_SOLAXX1_RTS)); - solaxX1Serial = new TasmotaSerial(Pin(GPIO_SOLAXX1_RX), Pin(GPIO_SOLAXX1_TX), 1); + solaxX1Serial = new TasmotaSerial(Pin(GPIO_SOLAXX1_RX), Pin(GPIO_SOLAXX1_TX), 1, 0, 256); if (solaxX1Serial->begin(SOLAXX1_SPEED)) { if (solaxX1Serial->hardwareSerial()) { ClaimSerial(); } #ifdef ESP32