From 4237a33b9cb8198eb0a1c4fadfe223078eeb5358 Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Wed, 10 Aug 2022 09:34:14 +0200 Subject: [PATCH] prevent to switch off by sending zero as pwr limit --- tools/esp8266/app.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/esp8266/app.cpp b/tools/esp8266/app.cpp index 18c722af..12c5b6a1 100644 --- a/tools/esp8266/app.cpp +++ b/tools/esp8266/app.cpp @@ -424,7 +424,7 @@ void app::loop(void) { if(mSerialDebug) DPRINTLN(DBG_DEBUG, F("app:loop WiFi WiFi.status ") + String(WiFi.status()) ); DPRINTLN(DBG_INFO, F("Requesting Inverter SN ") + String(iv->serial.u64, HEX)); - if(iv->devControlRequest){ + if(iv->devControlRequest && iv->powerLimit[0] > 0){ // prevent to "switch off" if(mSerialDebug) DPRINTLN(DBG_INFO, F("Devcontrol request ") + String(iv->devControlCmd) + F(" power limit ") + String(iv->powerLimit[0])); mSys->Radio.sendControlPacket(iv->radioId.u64,iv->devControlCmd ,iv->powerLimit);