mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-25 05:46:59 +02:00
prevent to switch off by sending zero as pwr limit
This commit is contained in:
parent
4be61785d0
commit
4237a33b9c
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue