* started to implement POST api

* improved web serial console
* added multi inverter total values (published through MQTT)
* fixed: after boot there were transferred wrong data because of incorrect assignment (mqtt, visualization)
  -> not tested with sun
This commit is contained in:
lumapu 2022-09-10 02:19:25 +02:00
parent 9e1b6be70e
commit 6bd7e01f1a
13 changed files with 404 additions and 379 deletions

View file

@ -89,7 +89,9 @@ class HmSystem {
INVERTERTYPE *getInverterByPos(uint8_t pos, bool check = true) {
DPRINTLN(DBG_VERBOSE, F("hmSystem.h:getInverterByPos"));
if((mInverter[pos].initialized && mInverter[pos].serial.u64 != 0ULL) || false == check)
if(pos >= MAX_INVERTER)
return NULL;
else if((mInverter[pos].initialized && mInverter[pos].serial.u64 != 0ULL) || false == check)
return &mInverter[pos];
else
return NULL;