From 58cef88e9d6e79c9ba9d92762ac9f0bd6c070a65 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 19 Sep 2021 09:57:43 -0500 Subject: [PATCH] Stub out changes without testing. --- data_embed/index.html | 4 ++++ include/preference_storage.h | 2 ++ src/TTGO_T-Beam_LoRa_APRS.ino | 11 +++++++++-- src/taskWebServer.cpp | 4 ++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/data_embed/index.html b/data_embed/index.html index 25a51f9..3aca2eb 100644 --- a/data_embed/index.html +++ b/data_embed/index.html @@ -121,6 +121,10 @@ +
+ + +
Fixed Beaconing Settings
diff --git a/include/preference_storage.h b/include/preference_storage.h index c61a7d0..74c07d4 100644 --- a/include/preference_storage.h +++ b/include/preference_storage.h @@ -43,6 +43,8 @@ static const char *const PREF_TNC_SELF_TELEMETRY_SEQ = "tnc_tel_seq"; static const char *const PREF_TNC_SELF_TELEMETRY_SEQ_INIT = "tnc_tel_seq_i"; static const char *const PREF_TNC_SELF_TELEMETRY_MIC = "tnc_tel_mic"; static const char *const PREF_TNC_SELF_TELEMETRY_MIC_INIT = "tnc_tel_mic_i"; +static const char *const PREF_TNC_SELF_TELEMETRY_PATH = "tnc_tel_path"; +static const char *const PREF_TNC_SELF_TELEMETRY_PATH_INIT = "tnc_tel_path_i"; // SMART BEACONING static const char *const PREF_APRS_SB_MIN_INTERVAL_PRESET = "sb_min_interv"; static const char *const PREF_APRS_SB_MIN_INTERVAL_PRESET_INIT = "sb_min_interv_i"; diff --git a/src/TTGO_T-Beam_LoRa_APRS.ino b/src/TTGO_T-Beam_LoRa_APRS.ino index c3281c1..872730d 100644 --- a/src/TTGO_T-Beam_LoRa_APRS.ino +++ b/src/TTGO_T-Beam_LoRa_APRS.ino @@ -113,6 +113,8 @@ boolean fixed_beacon_enabled = false; boolean show_cmt = true; // Telemetry sequence, current value int tel_sequence; +// Telemetry path +String tel_path; #ifdef SHOW_ALT boolean showAltitude = true; @@ -556,7 +558,7 @@ String prepareCallsign(const String& callsign){ String telemetryEquations = String(":") + Tcall_message + ":EQNS.0,5.1,3000,0,10,0,0,10,0,0,28,3000,0,10,0"; String telemetryData = String("T#") + tel_sequence_str + "," + String(b_volt) + "," + String(b_in_c) + "," + String(b_out_c) + "," + String(ac_volt) + "," + String(ac_c) + ",00000000"; String telemetryBase = ""; - telemetryBase += Tcall + ">APLO01," + relay_path + ":"; + telemetryBase += Tcall + ">APLO01," + tel_path + ":"; Serial.print(telemetryBase); sendToTNC(telemetryBase + telemetryParamsNames); sendToTNC(telemetryBase + telemetryUnitNames); @@ -705,6 +707,12 @@ void setup(){ } tel_mic = preferences.getInt(PREF_TNC_SELF_TELEMETRY_MIC); + if (!preferences.getBool(PREF_TNC_SELF_TELEMETRY_PATH_INIT)){ + preferences.putBool(PREF_TNC_SELF_TELEMETRY_PATH_INIT, true); + preferences.putString(PREF_TNC_SELF_TELEMETRY_PATH, tel_path); + } + tel_path = preferences.getString(PREF_TNC_SELF_TELEMETRY_PATH); + if (!preferences.getBool(PREF_APRS_LATITUDE_PRESET_INIT)){ preferences.putBool(PREF_APRS_LATITUDE_PRESET_INIT, true); preferences.putString(PREF_APRS_LATITUDE_PRESET, LATIDUDE_PRESET); @@ -723,7 +731,6 @@ void setup(){ } fixed_beacon_enabled = preferences.getBool(PREF_APRS_FIXED_BEACON_PRESET); - if (!preferences.getBool(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET_INIT)){ preferences.putBool(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET_INIT, true); preferences.putInt(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET, fix_beacon_interval/1000); diff --git a/src/taskWebServer.cpp b/src/taskWebServer.cpp index b3608ca..d958298 100644 --- a/src/taskWebServer.cpp +++ b/src/taskWebServer.cpp @@ -214,6 +214,7 @@ void handle_Cfg() { jsonData += jsonLineFromPreferenceBool(PREF_ENABLE_TNC_SELF_TELEMETRY); jsonData += jsonLineFromPreferenceInt(PREF_TNC_SELF_TELEMETRY_INTERVAL); jsonData += jsonLineFromPreferenceInt(PREF_TNC_SELF_TELEMETRY_MIC); + jsonData += jsonLineFromPreferenceInt(PREF_TNC_SELF_TELEMETRY_PATH); jsonData += jsonLineFromPreferenceBool(PREF_DEV_OL_EN); jsonData += jsonLineFromPreferenceBool(PREF_APRS_SHOW_CMT); jsonData += jsonLineFromPreferenceBool(PREF_DEV_BT_EN); @@ -286,6 +287,9 @@ void handle_SaveAPRSCfg() { if (server.hasArg(PREF_TNC_SELF_TELEMETRY_MIC)){ preferences.putInt(PREF_TNC_SELF_TELEMETRY_MIC, server.arg(PREF_TNC_SELF_TELEMETRY_MIC).toInt()); } + if (server.hasArg(PREF_TNC_SELF_TELEMETRY_PATH)){ + preferences.putString(PREF_TNC_SELF_TELEMETRY_PATH, server.arg(PREF_TNC_SELF_TELEMETRY_PATH)); + } // Smart Beaconing settings if (server.hasArg(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET)){