igate plus digirepeater mode together
This commit is contained in:
parent
9c98a8e369
commit
090c48a893
|
|
@ -1,18 +1,18 @@
|
|||
{
|
||||
"callsign": "CA2RXU-11",
|
||||
"callsign": "NOCALL-10",
|
||||
"stationMode": 2,
|
||||
"iGateComment": "LoRa_APRS_iGate",
|
||||
"wifi": {
|
||||
"AP": [
|
||||
{ "ssid": "Richon",
|
||||
"password": "k4fPnmg5qnyf",
|
||||
"latitude": -33.0337718,
|
||||
"longitude": -71.5737141
|
||||
{ "ssid": "WIFI_1",
|
||||
"password": "WIFI_1_password",
|
||||
"latitude": 0.0000000,
|
||||
"longitude": 0.0000000
|
||||
},
|
||||
{ "ssid": "Jimenita",
|
||||
"password": "mg6wyMhqRnxk",
|
||||
"latitude": -33.0312492,
|
||||
"longitude": -71.5796215
|
||||
{ "ssid": "WIFI_2",
|
||||
"password": "WIFI_2_password",
|
||||
"latitude": 0.0000000,
|
||||
"longitude": 0.0000000
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
"longitude": 0.0000000
|
||||
},
|
||||
"aprs_is": {
|
||||
"passcode": "23204",
|
||||
"server": "soam.aprs2.net",
|
||||
"passcode": "XYZVW",
|
||||
"server": "rotate.aprs2.net",
|
||||
"port": 14580,
|
||||
"reportingDistance": 30
|
||||
},
|
||||
|
|
@ -55,8 +55,8 @@
|
|||
},
|
||||
"other": {
|
||||
"beaconInterval": 15,
|
||||
"igateLoRaBeacon": true,
|
||||
"igateRepeatsLoRaPackets": true,
|
||||
"igateSendsLoRaBeacons": false,
|
||||
"igateRepeatsLoRaPackets": false,
|
||||
"rememberStationTime": 30,
|
||||
"sendBatteryVoltage": false,
|
||||
"externalVoltageMeasurement" : false,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ void Configuration::readFile(fs::FS &fs, const char *fileName) {
|
|||
stationMode = data["stationMode"].as<int>();
|
||||
iGateComment = data["iGateComment"].as<String>();
|
||||
beaconInterval = data["other"]["beaconInterval"].as<int>();
|
||||
igateLoRaBeacon = data["other"]["igateLoRaBeacon"].as<bool>();
|
||||
igateSendsLoRaBeacons = data["other"]["igateSendsLoRaBeacons"].as<bool>();
|
||||
igateRepeatsLoRaPackets = data["other"]["igateRepeatsLoRaPackets"].as<bool>();
|
||||
rememberStationTime = data["other"]["rememberStationTime"].as<int>();
|
||||
sendBatteryVoltage = data["other"]["sendBatteryVoltage"].as<bool>();
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public:
|
|||
int stationMode;
|
||||
String iGateComment;
|
||||
int beaconInterval;
|
||||
bool igateLoRaBeacon;
|
||||
bool igateSendsLoRaBeacons;
|
||||
bool igateRepeatsLoRaPackets;
|
||||
int rememberStationTime;
|
||||
bool sendBatteryVoltage;
|
||||
|
|
|
|||
|
|
@ -116,12 +116,12 @@ namespace Utils {
|
|||
if (Config.bme.active) {
|
||||
String sensorData = BME_Utils::readDataSensor();
|
||||
beaconPacket = iGateBeaconPacket.substring(0,iGateBeaconPacket.indexOf(":=")+20) + "_" + sensorData + iGateBeaconPacket.substring(iGateBeaconPacket.indexOf(":=")+21) + " + WX";
|
||||
if (Config.igateLoRaBeacon && stationMode!=1) {
|
||||
if (Config.igateSendsLoRaBeacons && stationMode!=1) {
|
||||
secondaryBeaconPacket = iGateLoRaBeaconPacket + sensorData + Config.iGateComment + " + WX";
|
||||
}
|
||||
} else {
|
||||
beaconPacket = iGateBeaconPacket;
|
||||
if (Config.igateLoRaBeacon && stationMode!=1) {
|
||||
if (Config.igateSendsLoRaBeacons && stationMode!=1) {
|
||||
secondaryBeaconPacket = iGateLoRaBeaconPacket + Config.iGateComment;
|
||||
}
|
||||
}
|
||||
|
|
@ -150,7 +150,7 @@ namespace Utils {
|
|||
}
|
||||
seventhLine = " listening...";
|
||||
espClient.write((beaconPacket + "\n").c_str());
|
||||
if (Config.igateLoRaBeacon && stationMode==2) {
|
||||
if (Config.igateSendsLoRaBeacons && stationMode==2) {
|
||||
LoRa_Utils::sendNewPacket("APRS", secondaryBeaconPacket);
|
||||
}
|
||||
show_display(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
||||
|
|
@ -202,7 +202,7 @@ namespace Utils {
|
|||
}
|
||||
seventhLine = " listening...";
|
||||
espClient.write((beaconPacket + "\n").c_str());
|
||||
if (Config.igateLoRaBeacon) {
|
||||
if (Config.igateSendsLoRaBeacons) {
|
||||
LoRa_Utils::sendNewPacket("APRS", secondaryBeaconPacket);
|
||||
}
|
||||
show_display(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue