mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Merge 5f36fde054 into dee3e26ac0
This commit is contained in:
commit
123b27891e
9 changed files with 39 additions and 46 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue