Skip to content

Commit

Permalink
0.8.32
Browse files Browse the repository at this point in the history
* fix `start` / `stop` / `restart` commands #1287
* added message, if profile was not read until now #1300
  • Loading branch information
lumapu committed Dec 29, 2023
1 parent 7c08d93 commit cf19423
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 11 deletions.
4 changes: 4 additions & 0 deletions src/CHANGES.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
23 changes: 20 additions & 3 deletions src/hm/Communication.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/hms/hmsRadio.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class CmtRadio : public Radio {
DHEX(mTxBuf[0]);
DBGPRINT(F(" "));
DHEX(mTxBuf[10]);
DBGPRINT(F(" "));
DBGHEXLN(mTxBuf[9]);
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/web/RestApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...");
}
Expand Down
10 changes: 5 additions & 5 deletions src/web/html/system.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
10 changes: 7 additions & 3 deletions src/web/html/visualization.html
Original file line number Diff line number Diff line change
Expand Up @@ -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) + ")"))
Expand Down

0 comments on commit cf19423

Please sign in to comment.