add a path to the beacon

pull/47/head
Peter Buchegger 2021-12-19 21:51:56 +01:00
rodzic 52122a916c
commit f69a05eb08
4 zmienionych plików z 30 dodań i 27 usunięć

Wyświetl plik

@ -1,41 +1,38 @@
{
"callsign":"NOCALL-7",
"callsign": "NOCALL-7",
"debug": false,
"enhance_precision": true,
"beacon":
{
"message":"LoRa Tracker",
"beacon": {
"message": "LoRa Tracker",
"path": "WIDE1-1",
"timeout": 1,
"button_tx": false,
"symbol": "[",
"overlay": "/"
},
"smart_beacon":
{
"active":true,
"turn_min":25,
"slow_rate":300,
"slow_speed":10,
"fast_rate":60,
"fast_speed":100,
"min_tx_dist":100,
"min_bcn":5
"smart_beacon": {
"active": true,
"turn_min": 25,
"slow_rate": 300,
"slow_speed": 10,
"fast_rate": 60,
"fast_speed": 100,
"min_tx_dist": 100,
"min_bcn": 5
},
"lora":
{
"frequency_rx":433775000,
"frequency_tx":433775000,
"power":20,
"spreading_factor":12,
"signal_bandwidth":125000,
"coding_rate4":5
"lora": {
"frequency_rx": 433775000,
"frequency_tx": 433775000,
"power": 20,
"spreading_factor": 12,
"signal_bandwidth": 125000,
"coding_rate4": 5
},
"ptt_output":
{
"active":false,
"ptt_output": {
"active": false,
"io_pin": 4,
"start_delay": 0,
"end_delay": 0,
"reverse":false
"reverse": false
}
}

Wyświetl plik

@ -187,6 +187,7 @@ void loop() {
msg.setSource(Config.callsign);
msg.setDestination("APLT00-1");
msg.setPath(Config.beacon.path);
if (!Config.enhance_precision) {
lat = create_lat_aprs(gps.location.rawLat());
@ -310,6 +311,7 @@ void loop() {
if ((Config.debug == false) && (millis() > 5000 && gps.charsProcessed() < 10)) {
logPrintlnE("No GPS frames detected! Try to reset the GPS Chip with this "
"firmware: https://github.com/lora-aprs/TTGO-T-Beam_GPS-reset");
show_display("No GPS frames detected!", "Try to reset the GPS Chip", "https://github.com/lora-aprs/TTGO-T-Beam_GPS-reset", 2000);
}
}

Wyświetl plik

@ -39,6 +39,8 @@ Configuration ConfigurationManagement::readConfiguration() {
conf.enhance_precision = data["enhance_precision"] | false;
if (data.containsKey("beacon") && data["beacon"].containsKey("message"))
conf.beacon.message = data["beacon"]["message"].as<String>();
if (data.containsKey("beacon") && data["beacon"].containsKey("path"))
conf.beacon.path = data["beacon"]["path"].as<String>();
conf.beacon.timeout = data["beacon"]["timeout"] | 1;
if (data.containsKey("beacon") && data["beacon"].containsKey("symbol"))
conf.beacon.symbol = data["beacon"]["symbol"].as<String>();
@ -85,6 +87,7 @@ void ConfigurationManagement::writeConfiguration(Configuration conf) {
data["debug"] = conf.debug;
data["enhance_precision"] = conf.enhance_precision;
data["beacon"]["message"] = conf.beacon.message;
data["beacon"]["path"] = conf.beacon.path;
data["beacon"]["timeout"] = conf.beacon.timeout;
data["beacon"]["symbol"] = conf.beacon.symbol;
data["beacon"]["overlay"] = conf.beacon.overlay;

Wyświetl plik

@ -9,10 +9,11 @@ class Configuration {
public:
class Beacon {
public:
Beacon() : message("LoRa Tracker, Info: github.com/lora-aprs/LoRa_APRS_Tracker"), timeout(1), symbol("["), overlay("/"), button_tx(false) {
Beacon() : message("LoRa Tracker"), path("WIDE1-1"), timeout(1), symbol("["), overlay("/"), button_tx(false) {
}
String message;
String path;
int timeout;
String symbol;
String overlay;