kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_Tracker
add a path to the beacon
rodzic
52122a916c
commit
f69a05eb08
|
@ -1,41 +1,38 @@
|
||||||
{
|
{
|
||||||
"callsign":"NOCALL-7",
|
"callsign": "NOCALL-7",
|
||||||
"debug": false,
|
"debug": false,
|
||||||
"enhance_precision": true,
|
"enhance_precision": true,
|
||||||
"beacon":
|
"beacon": {
|
||||||
{
|
"message": "LoRa Tracker",
|
||||||
"message":"LoRa Tracker",
|
"path": "WIDE1-1",
|
||||||
"timeout": 1,
|
"timeout": 1,
|
||||||
"button_tx": false,
|
"button_tx": false,
|
||||||
"symbol": "[",
|
"symbol": "[",
|
||||||
"overlay": "/"
|
"overlay": "/"
|
||||||
},
|
},
|
||||||
"smart_beacon":
|
"smart_beacon": {
|
||||||
{
|
"active": true,
|
||||||
"active":true,
|
"turn_min": 25,
|
||||||
"turn_min":25,
|
"slow_rate": 300,
|
||||||
"slow_rate":300,
|
"slow_speed": 10,
|
||||||
"slow_speed":10,
|
"fast_rate": 60,
|
||||||
"fast_rate":60,
|
"fast_speed": 100,
|
||||||
"fast_speed":100,
|
"min_tx_dist": 100,
|
||||||
"min_tx_dist":100,
|
"min_bcn": 5
|
||||||
"min_bcn":5
|
|
||||||
},
|
},
|
||||||
"lora":
|
"lora": {
|
||||||
{
|
"frequency_rx": 433775000,
|
||||||
"frequency_rx":433775000,
|
"frequency_tx": 433775000,
|
||||||
"frequency_tx":433775000,
|
"power": 20,
|
||||||
"power":20,
|
"spreading_factor": 12,
|
||||||
"spreading_factor":12,
|
"signal_bandwidth": 125000,
|
||||||
"signal_bandwidth":125000,
|
"coding_rate4": 5
|
||||||
"coding_rate4":5
|
|
||||||
},
|
},
|
||||||
"ptt_output":
|
"ptt_output": {
|
||||||
{
|
"active": false,
|
||||||
"active":false,
|
|
||||||
"io_pin": 4,
|
"io_pin": 4,
|
||||||
"start_delay": 0,
|
"start_delay": 0,
|
||||||
"end_delay": 0,
|
"end_delay": 0,
|
||||||
"reverse":false
|
"reverse": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,6 +187,7 @@ void loop() {
|
||||||
|
|
||||||
msg.setSource(Config.callsign);
|
msg.setSource(Config.callsign);
|
||||||
msg.setDestination("APLT00-1");
|
msg.setDestination("APLT00-1");
|
||||||
|
msg.setPath(Config.beacon.path);
|
||||||
|
|
||||||
if (!Config.enhance_precision) {
|
if (!Config.enhance_precision) {
|
||||||
lat = create_lat_aprs(gps.location.rawLat());
|
lat = create_lat_aprs(gps.location.rawLat());
|
||||||
|
@ -310,6 +311,7 @@ void loop() {
|
||||||
if ((Config.debug == false) && (millis() > 5000 && gps.charsProcessed() < 10)) {
|
if ((Config.debug == false) && (millis() > 5000 && gps.charsProcessed() < 10)) {
|
||||||
logPrintlnE("No GPS frames detected! Try to reset the GPS Chip with this "
|
logPrintlnE("No GPS frames detected! Try to reset the GPS Chip with this "
|
||||||
"firmware: https://github.com/lora-aprs/TTGO-T-Beam_GPS-reset");
|
"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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,8 @@ Configuration ConfigurationManagement::readConfiguration() {
|
||||||
conf.enhance_precision = data["enhance_precision"] | false;
|
conf.enhance_precision = data["enhance_precision"] | false;
|
||||||
if (data.containsKey("beacon") && data["beacon"].containsKey("message"))
|
if (data.containsKey("beacon") && data["beacon"].containsKey("message"))
|
||||||
conf.beacon.message = data["beacon"]["message"].as<String>();
|
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;
|
conf.beacon.timeout = data["beacon"]["timeout"] | 1;
|
||||||
if (data.containsKey("beacon") && data["beacon"].containsKey("symbol"))
|
if (data.containsKey("beacon") && data["beacon"].containsKey("symbol"))
|
||||||
conf.beacon.symbol = data["beacon"]["symbol"].as<String>();
|
conf.beacon.symbol = data["beacon"]["symbol"].as<String>();
|
||||||
|
@ -85,6 +87,7 @@ void ConfigurationManagement::writeConfiguration(Configuration conf) {
|
||||||
data["debug"] = conf.debug;
|
data["debug"] = conf.debug;
|
||||||
data["enhance_precision"] = conf.enhance_precision;
|
data["enhance_precision"] = conf.enhance_precision;
|
||||||
data["beacon"]["message"] = conf.beacon.message;
|
data["beacon"]["message"] = conf.beacon.message;
|
||||||
|
data["beacon"]["path"] = conf.beacon.path;
|
||||||
data["beacon"]["timeout"] = conf.beacon.timeout;
|
data["beacon"]["timeout"] = conf.beacon.timeout;
|
||||||
data["beacon"]["symbol"] = conf.beacon.symbol;
|
data["beacon"]["symbol"] = conf.beacon.symbol;
|
||||||
data["beacon"]["overlay"] = conf.beacon.overlay;
|
data["beacon"]["overlay"] = conf.beacon.overlay;
|
||||||
|
|
|
@ -9,10 +9,11 @@ class Configuration {
|
||||||
public:
|
public:
|
||||||
class Beacon {
|
class Beacon {
|
||||||
public:
|
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 message;
|
||||||
|
String path;
|
||||||
int timeout;
|
int timeout;
|
||||||
String symbol;
|
String symbol;
|
||||||
String overlay;
|
String overlay;
|
||||||
|
|
Ładowanie…
Reference in New Issue