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
|
# 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
|
## 0.8.31 - 2023-12-29
|
||||||
* added class to handle timeouts PR #1298
|
* added class to handle timeouts PR #1298
|
||||||
|
|
||||||
|
|
|
@ -276,9 +276,10 @@ class Communication : public CommQueue<> {
|
||||||
} else {
|
} else {
|
||||||
DBGPRINT(F(" "));
|
DBGPRINT(F(" "));
|
||||||
DBGPRINT(String(p->rssi));
|
DBGPRINT(String(p->rssi));
|
||||||
DBGPRINT(F("dBm | "));
|
DBGPRINT(F("dBm "));
|
||||||
}
|
}
|
||||||
if(*mPrintWholeTrace) {
|
if(*mPrintWholeTrace) {
|
||||||
|
DBGPRINT(F("| "));
|
||||||
if(*mPrivacyMode)
|
if(*mPrivacyMode)
|
||||||
ah::dumpBuf(p->packet, p->len, 1, 8);
|
ah::dumpBuf(p->packet, p->len, 1, 8);
|
||||||
else
|
else
|
||||||
|
@ -363,8 +364,24 @@ class Communication : public CommQueue<> {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool parseDevCtrl(packet_t *p, const queue_s *q) {
|
inline bool parseDevCtrl(packet_t *p, const queue_s *q) {
|
||||||
if((p->packet[12] != ActivePowerContr) || (p->packet[13] != 0x00))
|
switch(p->packet[12]) {
|
||||||
return false;
|
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;
|
bool accepted = true;
|
||||||
if((p->packet[10] == 0x00) && (p->packet[11] == 0x00))
|
if((p->packet[10] == 0x00) && (p->packet[11] == 0x00))
|
||||||
q->iv->powerLimitAck = true;
|
q->iv->powerLimitAck = true;
|
||||||
|
|
|
@ -99,6 +99,7 @@ class CmtRadio : public Radio {
|
||||||
DHEX(mTxBuf[0]);
|
DHEX(mTxBuf[0]);
|
||||||
DBGPRINT(F(" "));
|
DBGPRINT(F(" "));
|
||||||
DHEX(mTxBuf[10]);
|
DHEX(mTxBuf[10]);
|
||||||
|
DBGPRINT(F(" "));
|
||||||
DBGHEXLN(mTxBuf[9]);
|
DBGHEXLN(mTxBuf[9]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -316,7 +316,11 @@ class RestApi {
|
||||||
|
|
||||||
void getHtmlReboot(AsyncWebServerRequest *request, JsonObject obj) {
|
void getHtmlReboot(AsyncWebServerRequest *request, JsonObject obj) {
|
||||||
getGeneric(request, obj.createNestedObject(F("generic")));
|
getGeneric(request, obj.createNestedObject(F("generic")));
|
||||||
|
#if defined(ETHERNET) && defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||||
|
obj[F("refresh")] = 5;
|
||||||
|
#else
|
||||||
obj[F("refresh")] = 20;
|
obj[F("refresh")] = 20;
|
||||||
|
#endif
|
||||||
obj[F("refresh_url")] = "/";
|
obj[F("refresh_url")] = "/";
|
||||||
obj[F("html")] = F("rebooting ...");
|
obj[F("html")] = F("rebooting ...");
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,21 +119,21 @@
|
||||||
|
|
||||||
function parse(obj) {
|
function parse(obj) {
|
||||||
if(null != obj) {
|
if(null != obj) {
|
||||||
parseGeneric(obj["generic"]);
|
parseGeneric(obj.generic);
|
||||||
|
|
||||||
if(null != obj["refresh"]) {
|
if(null != obj.refresh) {
|
||||||
var meta = document.createElement('meta');
|
var meta = document.createElement('meta');
|
||||||
meta.httpEquiv = "refresh"
|
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);
|
document.getElementsByTagName('head')[0].appendChild(meta);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
parseRadio(obj.system);
|
parseRadio(obj.system);
|
||||||
parseMqtt(obj.system.mqtt);
|
parseMqtt(obj.system.mqtt);
|
||||||
parseSysInfo(obj["system"]);
|
parseSysInfo(obj.system);
|
||||||
getAjax('/api/index', parseIndex);
|
getAjax('/api/index', parseIndex);
|
||||||
}
|
}
|
||||||
document.getElementById("html").innerHTML = obj["html"];
|
document.getElementById("html").innerHTML = obj.html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -357,9 +357,13 @@
|
||||||
var content = [];
|
var content = [];
|
||||||
var g = getGridType(glob.info.type, getGridIdentifier(glob))
|
var g = getGridType(glob.info.type, getGridIdentifier(glob))
|
||||||
if(null === g) {
|
if(null === g) {
|
||||||
content.push(ml("div", {class: "row"}, ml("div", {class: "col"}, ml("h5", {}, "Unknown Profile"))))
|
if(0 == obj.grid.length) {
|
||||||
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"}, ml("p", {}, "Profile was not read until now, maybe turned off?"))))
|
||||||
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"}, 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 {
|
} else {
|
||||||
content.push(ml("div", {class: "row"},
|
content.push(ml("div", {class: "row"},
|
||||||
ml("div", {class: "col my-3"}, ml("h5", {}, g + " (Version " + getGridValue(glob).toString(16) + ")"))
|
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