|
|
|
@ -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(); |
|
|
|
@ -421,8 +422,8 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch |
|
|
|
strcpy(reply, "OK"); |
|
|
|
} else if (memcmp(config, "flood.advert.interval ", 22) == 0) { |
|
|
|
int hours = _atoi(&config[22]); |
|
|
|
if ((hours > 0 && hours < 3) || (hours > 48)) { |
|
|
|
strcpy(reply, "Error: interval range is 3-48 hours"); |
|
|
|
if ((hours > 0 && hours < 3) || (hours > 168)) { |
|
|
|
strcpy(reply, "Error: interval range is 3-168 hours"); |
|
|
|
} else { |
|
|
|
_prefs->flood_advert_interval = (uint8_t)(hours); |
|
|
|
_callbacks->updateFloodAdvertTimer(); |
|
|
|
|