diff --git a/data_embed/index.html b/data_embed/index.html index e3af7ef..55eef47 100644 --- a/data_embed/index.html +++ b/data_embed/index.html @@ -590,7 +590,7 @@ Black List - Add Callsigns with space between them to Black List them (* wild card allowed) + Add Callsigns with space between them to Blacklist them (* wild card allowed)
@@ -1708,6 +1708,65 @@

+
+
+
+ + + + Remote Management +
+ Manage Station via APRS Messages. Leave empty to disable! + +
+
+
+ +
+ +
+
+
+
+
+ + +
+
+
+
+
+
+
diff --git a/data_embed/script.js b/data_embed/script.js index a5cde80..cd4294f 100644 --- a/data_embed/script.js +++ b/data_embed/script.js @@ -223,6 +223,10 @@ function loadSettings(settings) { document.getElementById("other.lowPowerMode").checked = settings.other.lowPowerMode; document.getElementById("other.lowVoltageCutOff").value = settings.other.lowVoltageCutOff || 0 + // Management over APRS + document.getElementById("remoteManagement.managers").value = settings.remoteManagement.managers; + document.getElementById("remoteManagement.rfOnly").checked = settings.remoteManagement.rfOnly; + updateImage(); refreshSpeedStandard(); toggleFields(); diff --git a/src/query_utils.cpp b/src/query_utils.cpp index e12d88e..fa657b3 100644 --- a/src/query_utils.cpp +++ b/src/query_utils.cpp @@ -68,6 +68,22 @@ namespace QUERY_Utils { saveNewDigiEcoModeConfig = true; } else if (queryQuestion.indexOf("?APRSEMS") == 0) { // Digipeater EcoMode Status answer = (Config.digi.ecoMode) ? "DigiEcoMode:ON" : "DigiEcoMode:OFF"; + } else if (STATION_Utils::isManager(station) && (!queryFromAPRSIS || !Config.remoteManagement.rfOnly)) { + if (queryQuestion.indexOf("?TX=ON") == 0) { + Config.loramodule.txActive = true; + Serial.println("TX=ON"); + // send answer? + // change status? + } else if (queryQuestion.indexOf("?TX=OFF") == 0) { + Config.loramodule.txActive = false; + Serial.println("TX=OFF"); + // send answer? + // change status? + } else if (queryQuestion.indexOf("?TX=?") == 0) { + answer = (Config.loramodule.txActive) ? "TX=ON" : "TX=OFF"; + } else if (queryQuestion.indexOf("?COMMIT") == 0) { // when, after changing state???? + Config.writeFile(); + } } String queryAnswer = Config.callsign; diff --git a/src/web_utils.cpp b/src/web_utils.cpp index 9fcd38e..92566c4 100644 --- a/src/web_utils.cpp +++ b/src/web_utils.cpp @@ -216,6 +216,9 @@ namespace WEB_Utils { Config.ntp.gmtCorrection = request->getParam("ntp.gmtCorrection", true)->value().toFloat(); + Config.remoteManagement.managers = request->getParam("remoteManagement.managers", true)->value(); + Config.remoteManagement.rfOnly = request->getParam("remoteManagement.rfOnly", true); + Config.writeFile(); AsyncWebServerResponse *response = request->beginResponse(302, "text/html", "");