Browse Source
Merge pull request #1490 from mesher-de/feature-0hop-cli
Add CLI-command for zerohop advert
pull/1936/head
Liam Cottle
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
0 deletions
-
src/helpers/CommonCLI.cpp
|
|
|
@ -203,6 +203,10 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch |
|
|
|
// Reset clock
|
|
|
|
getRTCClock()->setCurrentTime(1715770351); // 15 May 2024, 8:50pm
|
|
|
|
_board->reboot(); // doesn't return
|
|
|
|
} else if (memcmp(command, "advert.zerohop", 14) == 0 && (command[14] == 0 || command[14] == ' ')) { |
|
|
|
// send zerohop advert
|
|
|
|
_callbacks->sendSelfAdvertisement(1500, false); // longer delay, give CLI response time to be sent first
|
|
|
|
strcpy(reply, "OK - zerohop advert sent"); |
|
|
|
} else if (memcmp(command, "advert", 6) == 0) { |
|
|
|
// send flood advert
|
|
|
|
_callbacks->sendSelfAdvertisement(1500, true); // longer delay, give CLI response time to be sent first
|
|
|
|
|