Add normalradio to common CLI
This commit is contained in:
1 parent
5ba511cfb7
commit
a39bbbd467
12 files changed
+67
-8
No files matched your search
@@ -2369,6 +2369,12 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, char* command, char* re
|
||||
} else {
|
||||
strcpy(reply, "ERR: bad pubkey");
|
||||
}
|
||||
} else if (strcmp(command, "normalradio") == 0) {
|
||||
if (_callbacks->scheduleNormalRadio()) {
|
||||
strcpy(reply, "OK - normal radio restore scheduled");
|
||||
} else {
|
||||
strcpy(reply, "Error: unsupported");
|
||||
}
|
||||
} else if (memcmp(command, "tempradio ", 10) == 0) {
|
||||
strcpy(tmp, &command[10]);
|
||||
const char *parts[5];
|
||||
|
||||
@@ -442,6 +442,9 @@ public:
|
||||
virtual void saveIdentity(const mesh::LocalIdentity& new_id) = 0;
|
||||
virtual void clearStats() = 0;
|
||||
virtual void applyTempRadioParams(float freq, float bw, uint8_t sf, uint8_t cr, int timeout_mins) = 0;
|
||||
// Cancel pending/active temporary-radio windows and restore the saved tuple
|
||||
// after the command reply has drained on the current channel.
|
||||
virtual bool scheduleNormalRadio() { return false; }
|
||||
#if defined(ENABLE_OTA)
|
||||
virtual bool isTempRadioActive() const { return false; }
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user