mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-03 00:18:24 +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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue