mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* repeater, room server: new prefs: sf, cr, bw. "set tx ..." now instant, no reboot needed.
This commit is contained in:
parent
50fc2100db
commit
0e2bee03b6
4 changed files with 42 additions and 27 deletions
|
|
@ -168,7 +168,8 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
|
|||
} else if (memcmp(config, "tx ", 3) == 0) {
|
||||
_prefs->tx_power_dbm = atoi(&config[3]);
|
||||
savePrefs();
|
||||
strcpy(reply, "OK - reboot to apply");
|
||||
_callbacks->setTxPower(_prefs->tx_power_dbm);
|
||||
strcpy(reply, "OK");
|
||||
} else if (sender_timestamp == 0 && memcmp(config, "freq ", 5) == 0) {
|
||||
_prefs->freq = atof(&config[5]);
|
||||
savePrefs();
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ struct NodePrefs { // persisted to file
|
|||
float tx_delay_factor;
|
||||
char guest_password[16];
|
||||
float direct_tx_delay_factor;
|
||||
uint8_t sf;
|
||||
uint8_t cr;
|
||||
uint8_t reserved1;
|
||||
uint8_t reserved2;
|
||||
float bw;
|
||||
};
|
||||
|
||||
class CommonCLICallbacks {
|
||||
|
|
@ -28,6 +33,7 @@ public:
|
|||
virtual void setLoggingOn(bool enable) = 0;
|
||||
virtual void eraseLogFile() = 0;
|
||||
virtual void dumpLogFile() = 0;
|
||||
virtual void setTxPower(uint8_t power_dbm) = 0;
|
||||
};
|
||||
|
||||
class CommonCLI {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue