updated JsonFormat

This commit is contained in:
richonguzman 2023-05-31 12:25:07 -04:00
parent 01839edd2f
commit 0cc44cf9f2
4 changed files with 24 additions and 23 deletions

View File

@ -14,6 +14,14 @@ ____________________________________________________
- All GPS beacons/packet are encoded for less time on RF/LoRa Tx.
- 4th line of the OLED SCREEN shows Number of New Messages Received.
- 5th line of the OLED SCREEN shows Recent Heard Trackers/Station/iGates Tx.
____________________________________________________
# INSTRUCTIONS:
(1). Change _Callsign_, _Symbol_ and _Comment_ on /data/tracker_config.json
(2). Upload via Platformio --> Upload Filesystem Image (to your TTGO Board)
(3). Build and Upload the Firmware with Platformio in VSCODE
____________________________________________________
# MENU EXPLANATION

View File

@ -14,15 +14,12 @@
"minDeltaBeacon": 20,
"turnMinDeg": 12,
"turnSlope": 60
},
"destination": "APLR01",
"path": "WIDE1-1",
"overlay": "/"
}
},
{
"callsign": "NOCALL-8",
"symbol": "b",
"comment": "https://github.com/richonguzman/LoRa_APRS_Tracker",
"comment": "https://github.com/richonguzman/LoRa_APRS_Tracker",
"smart_beacon": {
"active": true,
"slowRate": 120,
@ -33,11 +30,7 @@
"minDeltaBeacon": 12,
"turnMinDeg": 12,
"turnSlope": 60
},
"destination": "APLR01",
"path": "WIDE1-1",
"overlay": "/"
}
},
{
"callsign": "NOCALL-9",
@ -53,10 +46,7 @@
"minDeltaBeacon": 12,
"turnMinDeg": 10,
"turnSlope": 80
},
"destination": "APLR01",
"path": "WIDE1-1",
"overlay": "/"
}
}
],
"lora": {
@ -67,6 +57,9 @@
"power": 20
},
"other": {
"destination": "APLR01",
"path": "WIDE1-1",
"overlay": "/",
"nonSmartBeaconRate": 15,
"listeningTrackerTime": 30,
"maxDistanceToTracker": 30,

View File

@ -828,8 +828,8 @@ void loop() {
if (send_update && gps_loc_update) {
APRSMessage msg;
msg.setSource(currentBeacon->callsign);
msg.setDestination(currentBeacon->destination);
msg.setPath(currentBeacon->path);
msg.setDestination(Config.destination);
msg.setPath(Config.path);
float Tlat, Tlon;
@ -853,7 +853,7 @@ void loop() {
if(Tlon < 0) { Tlon= -Tlon; }
String infoField = "!";
infoField += currentBeacon->overlay;
infoField += Config.overlay;
char helper_base91[] = {"0000\0"};
int i;

View File

@ -10,10 +10,7 @@
class Beacon {
public:
String callsign;
String destination;
String path;
String symbol;
String overlay;
String comment;
bool smartBeaconState;
int slowRate;
@ -42,6 +39,9 @@ public:
std::vector<Beacon> beacons;
LoraModule loramodule;
String destination;
String path;
String overlay;
int nonSmartBeaconRate;
int listeningTrackerTime;
int maxDistanceToTracker;
@ -78,10 +78,7 @@ private:
Beacon bcn;
bcn.callsign = BeaconsArray[i]["callsign"].as<String>();
bcn.destination = BeaconsArray[i]["destination"].as<String>();
bcn.path = BeaconsArray[i]["path"].as<String>();
bcn.symbol = BeaconsArray[i]["symbol"].as<String>();
bcn.overlay = BeaconsArray[i]["overlay"].as<String>();
bcn.comment = BeaconsArray[i]["comment"].as<String>();
bcn.smartBeaconState = BeaconsArray[i]["smart_beacon"]["active"].as<bool>();
@ -103,6 +100,9 @@ private:
loramodule.codingRate4 = data["lora"]["codingRate4"].as<int>();
loramodule.power = data["lora"]["power"].as<int>();
destination = data["other"]["destination"].as<String>();
path = data["other"]["path"].as<String>();
overlay = data["other"]["overlay"].as<String>();
nonSmartBeaconRate = data["other"]["nonSmartBeaconRate"].as<int>();
listeningTrackerTime = data["other"]["listeningTrackerTime"].as<int>();
maxDistanceToTracker = data["other"]["maxDistanceToTracker"].as<int>();