mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-06 09:58:23 +02:00
0.8.32
* fix `start` / `stop` / `restart` commands #1287 * added message, if profile was not read until now #1300
This commit is contained in:
parent
7c08d934a9
commit
cf19423d91
6 changed files with 41 additions and 11 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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))
|
||||
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;
|
||||
|
|
|
@ -99,6 +99,7 @@ class CmtRadio : public Radio {
|
|||
DHEX(mTxBuf[0]);
|
||||
DBGPRINT(F(" "));
|
||||
DHEX(mTxBuf[10]);
|
||||
DBGPRINT(F(" "));
|
||||
DBGHEXLN(mTxBuf[9]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 ...");
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -357,9 +357,13 @@
|
|||
var content = [];
|
||||
var g = getGridType(glob.info.type, getGridIdentifier(glob))
|
||||
if(null === g) {
|
||||
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…
Add table
Add a link
Reference in a new issue