kopia lustrzana https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS
Stub out changes without testing.
rodzic
434e8ef0ad
commit
58cef88e9d
|
@ -121,6 +121,10 @@
|
||||||
<option value="1">MIC</option>
|
<option value="1">MIC</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="tnc_tel_path">Self Telemetry Relay Path</label>
|
||||||
|
<input class="u-full-width" type="text" minlength="0" name="tnc_tel_path" id="tnc_tel_path" title="APRS path for self telemetry, use the shortest as possible, ECHO or WIDE1-1">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-container full">
|
<div class="grid-container full">
|
||||||
<h5 class="u-full-width">Fixed Beaconing Settings</h5>
|
<h5 class="u-full-width">Fixed Beaconing Settings</h5>
|
||||||
|
|
|
@ -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_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 = "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_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
|
// 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 = "sb_min_interv";
|
||||||
static const char *const PREF_APRS_SB_MIN_INTERVAL_PRESET_INIT = "sb_min_interv_i";
|
static const char *const PREF_APRS_SB_MIN_INTERVAL_PRESET_INIT = "sb_min_interv_i";
|
||||||
|
|
|
@ -113,6 +113,8 @@ boolean fixed_beacon_enabled = false;
|
||||||
boolean show_cmt = true;
|
boolean show_cmt = true;
|
||||||
// Telemetry sequence, current value
|
// Telemetry sequence, current value
|
||||||
int tel_sequence;
|
int tel_sequence;
|
||||||
|
// Telemetry path
|
||||||
|
String tel_path;
|
||||||
|
|
||||||
#ifdef SHOW_ALT
|
#ifdef SHOW_ALT
|
||||||
boolean showAltitude = true;
|
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 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 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 = "";
|
String telemetryBase = "";
|
||||||
telemetryBase += Tcall + ">APLO01," + relay_path + ":";
|
telemetryBase += Tcall + ">APLO01," + tel_path + ":";
|
||||||
Serial.print(telemetryBase);
|
Serial.print(telemetryBase);
|
||||||
sendToTNC(telemetryBase + telemetryParamsNames);
|
sendToTNC(telemetryBase + telemetryParamsNames);
|
||||||
sendToTNC(telemetryBase + telemetryUnitNames);
|
sendToTNC(telemetryBase + telemetryUnitNames);
|
||||||
|
@ -705,6 +707,12 @@ void setup(){
|
||||||
}
|
}
|
||||||
tel_mic = preferences.getInt(PREF_TNC_SELF_TELEMETRY_MIC);
|
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)){
|
if (!preferences.getBool(PREF_APRS_LATITUDE_PRESET_INIT)){
|
||||||
preferences.putBool(PREF_APRS_LATITUDE_PRESET_INIT, true);
|
preferences.putBool(PREF_APRS_LATITUDE_PRESET_INIT, true);
|
||||||
preferences.putString(PREF_APRS_LATITUDE_PRESET, LATIDUDE_PRESET);
|
preferences.putString(PREF_APRS_LATITUDE_PRESET, LATIDUDE_PRESET);
|
||||||
|
@ -723,7 +731,6 @@ void setup(){
|
||||||
}
|
}
|
||||||
fixed_beacon_enabled = preferences.getBool(PREF_APRS_FIXED_BEACON_PRESET);
|
fixed_beacon_enabled = preferences.getBool(PREF_APRS_FIXED_BEACON_PRESET);
|
||||||
|
|
||||||
|
|
||||||
if (!preferences.getBool(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET_INIT)){
|
if (!preferences.getBool(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET_INIT)){
|
||||||
preferences.putBool(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET_INIT, true);
|
preferences.putBool(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET_INIT, true);
|
||||||
preferences.putInt(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET, fix_beacon_interval/1000);
|
preferences.putInt(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET, fix_beacon_interval/1000);
|
||||||
|
|
|
@ -214,6 +214,7 @@ void handle_Cfg() {
|
||||||
jsonData += jsonLineFromPreferenceBool(PREF_ENABLE_TNC_SELF_TELEMETRY);
|
jsonData += jsonLineFromPreferenceBool(PREF_ENABLE_TNC_SELF_TELEMETRY);
|
||||||
jsonData += jsonLineFromPreferenceInt(PREF_TNC_SELF_TELEMETRY_INTERVAL);
|
jsonData += jsonLineFromPreferenceInt(PREF_TNC_SELF_TELEMETRY_INTERVAL);
|
||||||
jsonData += jsonLineFromPreferenceInt(PREF_TNC_SELF_TELEMETRY_MIC);
|
jsonData += jsonLineFromPreferenceInt(PREF_TNC_SELF_TELEMETRY_MIC);
|
||||||
|
jsonData += jsonLineFromPreferenceInt(PREF_TNC_SELF_TELEMETRY_PATH);
|
||||||
jsonData += jsonLineFromPreferenceBool(PREF_DEV_OL_EN);
|
jsonData += jsonLineFromPreferenceBool(PREF_DEV_OL_EN);
|
||||||
jsonData += jsonLineFromPreferenceBool(PREF_APRS_SHOW_CMT);
|
jsonData += jsonLineFromPreferenceBool(PREF_APRS_SHOW_CMT);
|
||||||
jsonData += jsonLineFromPreferenceBool(PREF_DEV_BT_EN);
|
jsonData += jsonLineFromPreferenceBool(PREF_DEV_BT_EN);
|
||||||
|
@ -286,6 +287,9 @@ void handle_SaveAPRSCfg() {
|
||||||
if (server.hasArg(PREF_TNC_SELF_TELEMETRY_MIC)){
|
if (server.hasArg(PREF_TNC_SELF_TELEMETRY_MIC)){
|
||||||
preferences.putInt(PREF_TNC_SELF_TELEMETRY_MIC, server.arg(PREF_TNC_SELF_TELEMETRY_MIC).toInt());
|
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
|
// Smart Beaconing settings
|
||||||
if (server.hasArg(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET)){
|
if (server.hasArg(PREF_APRS_FIXED_BEACON_INTERVAL_PRESET)){
|
||||||
|
|
Ładowanie…
Reference in New Issue