From cc3cf18573d8a264d8403514261824c63f3920e1 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Tue, 4 Feb 2025 15:35:36 +1100 Subject: [PATCH] * new "set rxdelay ..." CLI command --- examples/simple_repeater/main.cpp | 9 +++++++++ examples/simple_room_server/main.cpp | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/examples/simple_repeater/main.cpp b/examples/simple_repeater/main.cpp index ec19d354..22b61c41 100644 --- a/examples/simple_repeater/main.cpp +++ b/examples/simple_repeater/main.cpp @@ -493,6 +493,15 @@ public: _prefs.node_lon = atof(&config[4]); savePrefs(); 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) { _prefs.tx_power_dbm = atoi(&config[3]); savePrefs(); diff --git a/examples/simple_room_server/main.cpp b/examples/simple_room_server/main.cpp index 0dbe567f..d1c68c22 100644 --- a/examples/simple_room_server/main.cpp +++ b/examples/simple_room_server/main.cpp @@ -606,6 +606,15 @@ public: _prefs.node_lon = atof(&config[4]); savePrefs(); 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) { _prefs.tx_power_dbm = atoi(&config[3]); savePrefs();