* new "set rxdelay ..." CLI command

此提交包含在:
Scott Powell
2025-02-04 15:35:36 +11:00
父節點 a93412216a
當前提交 cc3cf18573
共有 2 個檔案被更改,包括 18 行新增0 行删除
+9
查看文件
@@ -493,6 +493,15 @@ public:
_prefs.node_lon = atof(&config[4]); _prefs.node_lon = atof(&config[4]);
savePrefs(); savePrefs();
strcpy(reply, "OK"); strcpy(reply, "OK");
} else if (memcmp(config, "rxdelay ", 8) == 0) {
float db = atof(&config[8]);
if (db >= 0) {
_prefs.rx_delay_base = db;
savePrefs();
strcpy(reply, "OK");
} else {
strcpy(reply, "Error, cannot be negative");
}
} else if (memcmp(config, "tx ", 3) == 0) { } else if (memcmp(config, "tx ", 3) == 0) {
_prefs.tx_power_dbm = atoi(&config[3]); _prefs.tx_power_dbm = atoi(&config[3]);
savePrefs(); savePrefs();
+9
查看文件
@@ -606,6 +606,15 @@ public:
_prefs.node_lon = atof(&config[4]); _prefs.node_lon = atof(&config[4]);
savePrefs(); savePrefs();
strcpy(reply, "OK"); strcpy(reply, "OK");
} else if (memcmp(config, "rxdelay ", 8) == 0) {
float db = atof(&config[8]);
if (db >= 0) {
_prefs.rx_delay_base = db;
savePrefs();
strcpy(reply, "OK");
} else {
strcpy(reply, "Error, cannot be negative");
}
} else if (memcmp(config, "tx ", 3) == 0) { } else if (memcmp(config, "tx ", 3) == 0) {
_prefs.tx_power_dbm = atoi(&config[3]); _prefs.tx_power_dbm = atoi(&config[3]);
savePrefs(); savePrefs();