This commit is contained in:
Wessel 2026-04-20 13:32:49 +00:00 committed by GitHub
commit 123b27891e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 39 additions and 46 deletions

View file

@ -1212,13 +1212,8 @@ void MyMesh::handleCmdFrame(size_t len) {
} else if (cmd_frame[0] == CMD_SET_DEVICE_TIME && len >= 5) {
uint32_t secs;
memcpy(&secs, &cmd_frame[1], 4);
uint32_t curr = getRTCClock()->getCurrentTime();
if (secs >= curr) {
getRTCClock()->setCurrentTime(secs);
writeOKFrame();
} else {
writeErrFrame(ERR_CODE_ILLEGAL_ARG);
}
getRTCClock()->setCurrentTime(secs);
writeOKFrame();
} else if (cmd_frame[0] == CMD_SEND_SELF_ADVERT) {
mesh::Packet* pkt;
if (_prefs.advert_loc_policy == ADVERT_LOC_NONE) {