mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
boot adverts are now zero hop instead of flood
This commit is contained in:
parent
4b7684c7df
commit
ed589f9620
11 changed files with 30 additions and 17 deletions
|
|
@ -197,7 +197,8 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
|
|||
if (memcmp(command, "reboot", 6) == 0) {
|
||||
_board->reboot(); // doesn't return
|
||||
} else if (memcmp(command, "advert", 6) == 0) {
|
||||
_callbacks->sendSelfAdvertisement(1500); // longer delay, give CLI response time to be sent first
|
||||
// send flood advert
|
||||
_callbacks->sendSelfAdvertisement(1500, true); // longer delay, give CLI response time to be sent first
|
||||
strcpy(reply, "OK - Advert sent");
|
||||
} else if (memcmp(command, "clock sync", 10) == 0) {
|
||||
uint32_t curr = getRTCClock()->getCurrentTime();
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public:
|
|||
virtual const char* getBuildDate() = 0;
|
||||
virtual const char* getRole() = 0;
|
||||
virtual bool formatFileSystem() = 0;
|
||||
virtual void sendSelfAdvertisement(int delay_millis) = 0;
|
||||
virtual void sendSelfAdvertisement(int delay_millis, bool flood) = 0;
|
||||
virtual void updateAdvertTimer() = 0;
|
||||
virtual void updateFloodAdvertTimer() = 0;
|
||||
virtual void setLoggingOn(bool enable) = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue