Browse Source

prevent to switch off by sending zero as pwr limit

pull/134/head
Andreas Schiffler 3 years ago
parent
commit
4237a33b9c
  1. 2
      tools/esp8266/app.cpp

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

Loading…
Cancel
Save