diff --git a/src/CHANGES.md b/src/CHANGES.md index 55501fab..af26a58b 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,9 @@ # Development Changes +## 0.7.57 - 2023-09-18 +* fix Alarms are always in queue (since 0.7.56) +* fix display active power control to long for small devices #1165 + ## 0.7.56 - 2023-09-17 * only request alarms which were not received before #1113 * added flag if alarm was requested but not received and re-request it #1105 diff --git a/src/defines.h b/src/defines.h index 4921e05c..792b70bd 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 7 -#define VERSION_PATCH 56 +#define VERSION_PATCH 57 //------------------------------------- typedef struct { diff --git a/src/hm/hmInverter.h b/src/hm/hmInverter.h index 4c850781..43ba0810 100644 --- a/src/hm/hmInverter.h +++ b/src/hm/hmInverter.h @@ -151,8 +151,7 @@ class Inverter { std::array lastAlarm; // holds last 10 alarms uint8_t alarmNxtWrPos; // indicates the position in array (rolling buffer) uint16_t alarmCnt; // counts the total number of occurred alarms - uint8_t alarmLastId; // lastId which was received - bool alarmReqPending; // alarmData request issued and wait for answer + uint16_t alarmLastId; // lastId which was received int8_t rssi; // HMS and HMT inverters only @@ -210,7 +209,7 @@ class Inverter { enqueCommand(InverterDevInform_All); // firmware version else if (getHwVersion() == 0) enqueCommand(InverterDevInform_Simple); // hardware version - else if(alarmReqPending) + else if((alarmLastId != alarmMesIndex) && (alarmMesIndex != 0)) enqueCommand(AlarmData); // alarm not answered enqueCommand(RealTimeRunData_Debug); // live data } else if (ivGen == IV_MI){ @@ -342,7 +341,6 @@ class Inverter { DPRINT(DBG_INFO, "alarm ID incremented to "); DBGPRINTLN(String(alarmMesIndex)); - alarmReqPending = true; enqueCommand(AlarmData); } } @@ -626,7 +624,6 @@ class Inverter { DPRINTLN(DBG_DEBUG, "Alarm #" + String(pyld[startOff+1]) + " '" + String(getAlarmStr(pyld[startOff+1])) + "' start: " + ah::getTimeStr(start) + ", end: " + ah::getTimeStr(endTime)); addAlarm(pyld[startOff+1], start, endTime); - alarmReqPending = false; alarmCnt++; alarmLastId = alarmMesIndex; diff --git a/src/web/html/style.css b/src/web/html/style.css index 4be30110..cca955eb 100644 --- a/src/web/html/style.css +++ b/src/web/html/style.css @@ -266,6 +266,9 @@ p { .a-r { text-align: right; } .a-c { text-align: center; } +.d-none { display: none !important; } +.d-block { display: block !important; } + .row > * { padding-left: 0.5rem; padding-right: 0.5rem; @@ -304,6 +307,9 @@ p { .fs-sm-6 { font-size: 1.5rem; } .fs-sm-7 { font-size: 1.25rem; } .fs-sm-8 { font-size: 1rem; } + + .d-sm-block { display: block !important;} + .d-sm-none { display: none !important; } } /* md */ diff --git a/src/web/html/visualization.html b/src/web/html/visualization.html index b31ff048..4670dda6 100644 --- a/src/web/html/visualization.html +++ b/src/web/html/visualization.html @@ -113,7 +113,8 @@ ml("div", {class: "col mx-2 mx-md-1"}, ml("span", { class: "pointer", onclick: function() { getAjax("/api/inverter/version/" + obj.id, parseIvVersion); }}, obj.name)), - ml("div", {class: "col a-c"}, "Active Power Control: " + pwrLimit), + ml("div", {class: "col a-c d-none d-sm-block"}, "Active Power Control: " + pwrLimit), + ml("div", {class: "col a-c d-block d-sm-none"}, "APC: " + pwrLimit), ml("div", {class: "col a-c"}, ml("span", { class: "pointer", onclick: function() { getAjax("/api/inverter/alarm/" + obj.id, parseIvAlarm); }}, ("Alarms: " + obj.alarm_cnt))),