This commit is contained in:
richonguzman 2023-06-25 12:44:09 -04:00
parent 9807008af1
commit b97dbd7e8e
6 changed files with 19 additions and 4 deletions

View File

@ -61,6 +61,7 @@
"displayEcoMode": false,
"displayTimeout": 4,
"overlay": "/",
"path": "WIDE1-1",
"nonSmartBeaconRate": 15,
"rememberStationTime": 30,
"maxDistanceToTracker": 30,

View File

@ -54,6 +54,7 @@ void Configuration::readFile(fs::FS &fs, const char *fileName) {
displayEcoMode = data["other"]["displayEcoMode"].as<bool>();
displayTimeout = data["other"]["displayTimeout"].as<int>();
overlay = data["other"]["overlay"].as<String>();
path = data["other"]["path"].as<String>();
nonSmartBeaconRate = data["other"]["nonSmartBeaconRate"].as<int>();
rememberStationTime = data["other"]["rememberStationTime"].as<int>();
maxDistanceToTracker = data["other"]["maxDistanceToTracker"].as<int>();

View File

@ -40,6 +40,7 @@ public:
bool displayEcoMode;
int displayTimeout;
String overlay;
String path;
int nonSmartBeaconRate;
int rememberStationTime;
int maxDistanceToTracker;

View File

@ -120,8 +120,11 @@ void sendMessage(String station, String textMessage) {
for(int i = station.length(); i < 9; i++) {
station += ' ';
}
messageToSend = currentBeacon->callsign + ">APLR01,WIDE1-1::" + station + ":" + textMessage;
messageToSend = currentBeacon->callsign + ">APLRT1";
if (Config.path != "") {
messageToSend += "," + Config.path;
}
messageToSend += "::" + station + ":" + textMessage;
if (textMessage.indexOf("ack")== 0) {
show_display("<<ACK Tx>>", 500);
} else if (station.indexOf("CD2RXU-15") == 0 && textMessage.indexOf("wrl")==0) {

View File

@ -379,7 +379,11 @@ void checkSmartBeaconState() {
}
void sendBeacon() {
String packet = currentBeacon->callsign + ">APLRT1,WIDE1-1:!" + Config.overlay;
String packet = currentBeacon->callsign + ">APLRT1";
if (Config.path != "") {
packet += "," + Config.path;
}
packet += ":!" + Config.overlay;
packet += GPS_Utils::encondeGPS();
if (currentBeacon->comment != "") {

View File

@ -46,7 +46,12 @@ String createTimeString(time_t t) {
void startingStatus() {
delay(3000);
LoRa_Utils::sendNewPacket(currentBeacon->callsign + ">APLRT1,WIDE1-1:>https://github.com/richonguzman/LoRa_APRS_Tracker");
String packet = currentBeacon->callsign + ">APLRT1";
if (Config.path != "") {
packet += "," + Config.path;
}
packet += ":>https://github.com/richonguzman/LoRa_APRS_Tracker";
LoRa_Utils::sendNewPacket(packet);
statusState = false;
}