wrong order of if statement?
Opened this issue · 2 comments
IgorYbema commented
Should this be the other way around?
Sofar2mqtt/Sofar2mqtt/Sofar2mqtt.ino
Lines 459 to 462 in 4f06180
cmcgerty commented
Quite possibly. It certainly looks like p would only be set if readSingleReg fails. Do you have one connected with a serial console open? Does it constantly log “modbus error” when in battery save mode? I’ll take a look when I get a chance.
IgorYbema commented
Not using batterysave but I just noticed it while modifying the code a bit to suit my own situation