Browse Source

0.8.32

* fix `start` / `stop` / `restart` commands #1287
* added message, if profile was not read until now #1300
pull/1305/head
lumapu 1 year ago
parent
commit
cf19423d91
  1. 4
      src/CHANGES.md
  2. 23
      src/hm/Communication.h
  3. 1
      src/hms/hmsRadio.h
  4. 4
      src/web/RestApi.h
  5. 10
      src/web/html/system.html
  6. 10
      src/web/html/visualization.html

4
src/CHANGES.md

@ -1,5 +1,9 @@
# Development Changes
## 0.8.32 - 2023-12-29
* fix `start` / `stop` / `restart` commands #1287
* added message, if profile was not read until now #1300
## 0.8.31 - 2023-12-29
* added class to handle timeouts PR #1298

23
src/hm/Communication.h

@ -276,9 +276,10 @@ class Communication : public CommQueue<> {
} else {
DBGPRINT(F(" "));
DBGPRINT(String(p->rssi));
DBGPRINT(F("dBm | "));
DBGPRINT(F("dBm "));
}
if(*mPrintWholeTrace) {
DBGPRINT(F("| "));
if(*mPrivacyMode)
ah::dumpBuf(p->packet, p->len, 1, 8);
else
@ -363,8 +364,24 @@ class Communication : public CommQueue<> {
}
inline bool parseDevCtrl(packet_t *p, const queue_s *q) {
if((p->packet[12] != ActivePowerContr) || (p->packet[13] != 0x00))
return false;
switch(p->packet[12]) {
case ActivePowerContr:
if(p->packet[13] != 0x00)
return false;
break;
case TurnOn: [[fallthrough]];
case TurnOff: [[fallthrough]];
case Restart:
return true;
break;
default:
DPRINT(DBG_WARN, F("unknown dev ctrl: "));
DBGHEXLN(p->packet[12]);
break;
}
bool accepted = true;
if((p->packet[10] == 0x00) && (p->packet[11] == 0x00))
q->iv->powerLimitAck = true;

1
src/hms/hmsRadio.h

@ -99,6 +99,7 @@ class CmtRadio : public Radio {
DHEX(mTxBuf[0]);
DBGPRINT(F(" "));
DHEX(mTxBuf[10]);
DBGPRINT(F(" "));
DBGHEXLN(mTxBuf[9]);
}
}

4
src/web/RestApi.h

@ -316,7 +316,11 @@ class RestApi {
void getHtmlReboot(AsyncWebServerRequest *request, JsonObject obj) {
getGeneric(request, obj.createNestedObject(F("generic")));
#if defined(ETHERNET) && defined(CONFIG_IDF_TARGET_ESP32S3)
obj[F("refresh")] = 5;
#else
obj[F("refresh")] = 20;
#endif
obj[F("refresh_url")] = "/";
obj[F("html")] = F("rebooting ...");
}

10
src/web/html/system.html

@ -119,21 +119,21 @@
function parse(obj) {
if(null != obj) {
parseGeneric(obj["generic"]);
parseGeneric(obj.generic);
if(null != obj["refresh"]) {
if(null != obj.refresh) {
var meta = document.createElement('meta');
meta.httpEquiv = "refresh"
meta.content = obj["refresh"] + "; URL=" + obj["refresh_url"];
meta.content = obj.refresh + "; URL=" + obj.refresh_url;
document.getElementsByTagName('head')[0].appendChild(meta);
}
else {
parseRadio(obj.system);
parseMqtt(obj.system.mqtt);
parseSysInfo(obj["system"]);
parseSysInfo(obj.system);
getAjax('/api/index', parseIndex);
}
document.getElementById("html").innerHTML = obj["html"];
document.getElementById("html").innerHTML = obj.html;
}
}

10
src/web/html/visualization.html

@ -357,9 +357,13 @@
var content = [];
var g = getGridType(glob.info.type, getGridIdentifier(glob))
if(null === g) {
content.push(ml("div", {class: "row"}, ml("div", {class: "col"}, ml("h5", {}, "Unknown Profile"))))
content.push(ml("div", {class: "row"}, ml("div", {class: "col"}, ml("p", {}, "Please open a new issue at https://github.com/lumapu/ahoy and copy the raw data into it."))))
content.push(ml("div", {class: "row"}, ml("div", {class: "col my-2"}, ml("pre", {}, obj.grid))))
if(0 == obj.grid.length) {
content.push(ml("div", {class: "row"}, ml("div", {class: "col"}, ml("p", {}, "Profile was not read until now, maybe turned off?"))))
} else {
content.push(ml("div", {class: "row"}, ml("div", {class: "col"}, ml("h5", {}, "Unknown Profile"))))
content.push(ml("div", {class: "row"}, ml("div", {class: "col"}, ml("p", {}, "Please open a new issue at https://github.com/lumapu/ahoy and copy the raw data into it."))))
content.push(ml("div", {class: "row"}, ml("div", {class: "col my-2"}, ml("pre", {}, obj.grid))))
}
} else {
content.push(ml("div", {class: "row"},
ml("div", {class: "col my-3"}, ml("h5", {}, g + " (Version " + getGridValue(glob).toString(16) + ")"))

Loading…
Cancel
Save