tx objects
This commit is contained in:
parent
9e87c50966
commit
7add09d346
|
|
@ -32,7 +32,9 @@
|
||||||
"server": "rotate.aprs2.net",
|
"server": "rotate.aprs2.net",
|
||||||
"port": 14580,
|
"port": 14580,
|
||||||
"filter": "m/10",
|
"filter": "m/10",
|
||||||
"toRF": false
|
"toRF": false,
|
||||||
|
"messagesToRF": false,
|
||||||
|
"objectsToRF": false
|
||||||
},
|
},
|
||||||
"lora": {
|
"lora": {
|
||||||
"txFreq": 433775000,
|
"txFreq": 433775000,
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ namespace APRS_IS_Utils {
|
||||||
void processAPRSISPacket(const String& packet) {
|
void processAPRSISPacket(const String& packet) {
|
||||||
String Sender, AddresseeAndMessage, Addressee, receivedMessage;
|
String Sender, AddresseeAndMessage, Addressee, receivedMessage;
|
||||||
if (!packet.startsWith("#")) {
|
if (!packet.startsWith("#")) {
|
||||||
if (packet.indexOf("::") > 0) {
|
if (Config.aprs_is.messagesToRF && packet.indexOf("::") > 0) {
|
||||||
Sender = packet.substring(0, packet.indexOf(">"));
|
Sender = packet.substring(0, packet.indexOf(">"));
|
||||||
AddresseeAndMessage = packet.substring(packet.indexOf("::") + 2);
|
AddresseeAndMessage = packet.substring(packet.indexOf("::") + 2);
|
||||||
Addressee = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf(":"));
|
Addressee = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf(":"));
|
||||||
|
|
@ -250,7 +250,9 @@ namespace APRS_IS_Utils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
show_display(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
show_display(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
||||||
}
|
} else if (Config.aprs_is.objectsToRF && packet.indexOf(":;") > 0) {
|
||||||
|
Serial.print("Object : "); Serial.println(packet);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,9 @@ void Configuration::writeFile() {
|
||||||
data["aprs_is"]["port"] = aprs_is.port;
|
data["aprs_is"]["port"] = aprs_is.port;
|
||||||
data["aprs_is"]["filter"] = aprs_is.filter;
|
data["aprs_is"]["filter"] = aprs_is.filter;
|
||||||
data["aprs_is"]["toRF"] = aprs_is.toRF;
|
data["aprs_is"]["toRF"] = aprs_is.toRF;
|
||||||
|
data["aprs_is"]["messagesToRF"] = aprs_is.messagesToRF;
|
||||||
|
data["aprs_is"]["objectsToRF"] = aprs_is.objectsToRF;
|
||||||
|
|
||||||
|
|
||||||
data["beacon"]["comment"] = beacon.comment;
|
data["beacon"]["comment"] = beacon.comment;
|
||||||
// data["beacon"]["igateRepeatsLoRaPackets"] = beacon.igateRepeatsLoRaPackets;
|
// data["beacon"]["igateRepeatsLoRaPackets"] = beacon.igateRepeatsLoRaPackets;
|
||||||
|
|
@ -193,6 +196,8 @@ bool Configuration::readFile() {
|
||||||
aprs_is.active = data["aprs_is"]["active"].as<bool>();
|
aprs_is.active = data["aprs_is"]["active"].as<bool>();
|
||||||
aprs_is.filter = data["aprs_is"]["filter"].as<String>();
|
aprs_is.filter = data["aprs_is"]["filter"].as<String>();
|
||||||
aprs_is.toRF = data["aprs_is"]["toRF"].as<bool>();
|
aprs_is.toRF = data["aprs_is"]["toRF"].as<bool>();
|
||||||
|
aprs_is.messagesToRF = data["aprs_is"]["messagesToRF"].as<bool>();
|
||||||
|
aprs_is.objectsToRF = data["aprs_is"]["objectsToRF"].as<bool>();
|
||||||
|
|
||||||
loramodule.txFreq = data["lora"]["txFreq"].as<long>();
|
loramodule.txFreq = data["lora"]["txFreq"].as<long>();
|
||||||
loramodule.rxFreq = data["lora"]["rxFreq"].as<long>();
|
loramodule.rxFreq = data["lora"]["rxFreq"].as<long>();
|
||||||
|
|
@ -268,84 +273,86 @@ void Configuration::init() {
|
||||||
reload = false;
|
reload = false;
|
||||||
|
|
||||||
WiFi_AP wifiap;
|
WiFi_AP wifiap;
|
||||||
wifiap.ssid = "";
|
wifiap.ssid = "";
|
||||||
wifiap.password = "";
|
wifiap.password = "";
|
||||||
// wifiap.latitude = 0.0; // deprecated
|
// wifiap.latitude = 0.0; // deprecated
|
||||||
// wifiap.longitude = 0.0; // deprecated
|
// wifiap.longitude = 0.0; // deprecated
|
||||||
wifiAPs.push_back(wifiap);
|
wifiAPs.push_back(wifiap);
|
||||||
|
|
||||||
wifiAutoAP.password = "1234567890";
|
wifiAutoAP.password = "1234567890";
|
||||||
wifiAutoAP.powerOff = 15;
|
wifiAutoAP.powerOff = 15;
|
||||||
|
|
||||||
callsign = "N0CALL";
|
callsign = "N0CALL";
|
||||||
// stationMode = 1; // deprecated
|
// stationMode = 1; // deprecated
|
||||||
// iGateComment = "LoRa_APRS_iGate Development"; // deprecated
|
// iGateComment = "LoRa_APRS_iGate Development"; // deprecated
|
||||||
|
|
||||||
beacon.comment = "LoRa APRS"; // new
|
beacon.comment = "LoRa APRS"; // new
|
||||||
beacon.latitude = 0.0; // new
|
beacon.latitude = 0.0; // new
|
||||||
beacon.longitude = 0.0; // new
|
beacon.longitude = 0.0; // new
|
||||||
beacon.interval = 15; // new
|
beacon.interval = 15; // new
|
||||||
// beacon.igateRepeatsLoRaPackets = false; // new
|
// beacon.igateRepeatsLoRaPackets = false; // new
|
||||||
// beacon.igateSendsLoRaBeacons = false; // new
|
// beacon.igateSendsLoRaBeacons = false; // new
|
||||||
beacon.overlay = "L"; // new
|
beacon.overlay = "L"; // new
|
||||||
beacon.symbol = "#"; // new
|
beacon.symbol = "#"; // new
|
||||||
beacon.sendViaAPRSIS = true; // new
|
beacon.sendViaAPRSIS = true; // new
|
||||||
beacon.sendViaRF = false; // new
|
beacon.sendViaRF = false; // new
|
||||||
beacon.path = "WIDE1-1"; // new
|
beacon.path = "WIDE1-1"; // new
|
||||||
|
|
||||||
digi.mode = 0; // new
|
digi.mode = 0; // new
|
||||||
// digi.comment = "LoRa_APRS_iGate Development"; // deprecated
|
// digi.comment = "LoRa_APRS_iGate Development"; // deprecated
|
||||||
// digi.latitude = 0.0; // deprecated
|
// digi.latitude = 0.0; // deprecated
|
||||||
// digi.longitude = 0.0; // deprecated
|
// digi.longitude = 0.0; // deprecated
|
||||||
|
|
||||||
tnc.enableServer = false;
|
tnc.enableServer = false;
|
||||||
tnc.enableSerial = false;
|
tnc.enableSerial = false;
|
||||||
tnc.acceptOwn = false;
|
tnc.acceptOwn = false;
|
||||||
|
|
||||||
aprs_is.active = false; // new
|
aprs_is.active = false; // new
|
||||||
aprs_is.passcode = "XYZVW";
|
aprs_is.passcode = "XYZVW";
|
||||||
aprs_is.server = "rotate.aprs2.net";
|
aprs_is.server = "rotate.aprs2.net";
|
||||||
aprs_is.port = 14580;
|
aprs_is.port = 14580;
|
||||||
aprs_is.filter = "m/10"; // new
|
aprs_is.filter = "m/10"; // new
|
||||||
aprs_is.toRF = false; // new
|
aprs_is.toRF = false; // new
|
||||||
|
aprs_is.messagesToRF = false;
|
||||||
|
aprs_is.objectsToRF = false;
|
||||||
|
|
||||||
// loramodule.iGateFreq = 433775000; // deprecated
|
// loramodule.iGateFreq = 433775000; // deprecated
|
||||||
// loramodule.digirepeaterTxFreq = 433775000; // deprecated
|
// loramodule.digirepeaterTxFreq = 433775000; // deprecated
|
||||||
// loramodule.digirepeaterRxFreq = 433900000; // deprecated
|
// loramodule.digirepeaterRxFreq = 433900000; // deprecated
|
||||||
loramodule.txFreq = 433775000; // new
|
loramodule.txFreq = 433775000; // new
|
||||||
loramodule.rxFreq = 433775000; // new
|
loramodule.rxFreq = 433775000; // new
|
||||||
loramodule.spreadingFactor = 12;
|
loramodule.spreadingFactor = 12;
|
||||||
loramodule.signalBandwidth = 125000;
|
loramodule.signalBandwidth = 125000;
|
||||||
loramodule.codingRate4 = 5;
|
loramodule.codingRate4 = 5;
|
||||||
loramodule.power = 20;
|
loramodule.power = 20;
|
||||||
loramodule.txActive = false; // new
|
loramodule.txActive = false; // new
|
||||||
loramodule.rxActive = true; // new
|
loramodule.rxActive = true; // new
|
||||||
|
|
||||||
display.alwaysOn = true;
|
display.alwaysOn = true;
|
||||||
display.timeout = 4;
|
display.timeout = 4;
|
||||||
display.turn180 = false;
|
display.turn180 = false;
|
||||||
|
|
||||||
syslog.active = false;
|
syslog.active = false;
|
||||||
syslog.server = "192.168.0.100";
|
syslog.server = "192.168.0.100";
|
||||||
syslog.port = 514;
|
syslog.port = 514;
|
||||||
|
|
||||||
bme.active = false;
|
bme.active = false;
|
||||||
bme.heightCorrection = 0;
|
bme.heightCorrection = 0;
|
||||||
bme.temperatureCorrection = 0.0;
|
bme.temperatureCorrection = 0.0;
|
||||||
|
|
||||||
ota.username = "";
|
ota.username = "";
|
||||||
ota.password = "";
|
ota.password = "";
|
||||||
|
|
||||||
// beaconInterval = 15; // deprecated
|
// beaconInterval = 15; // deprecated
|
||||||
// igateSendsLoRaBeacons = false; // deprecated
|
// igateSendsLoRaBeacons = false; // deprecated
|
||||||
// igateRepeatsLoRaPackets = false; // deprecated
|
// igateRepeatsLoRaPackets = false; // deprecated
|
||||||
rememberStationTime = 30;
|
rememberStationTime = 30;
|
||||||
sendBatteryVoltage = false;
|
sendBatteryVoltage = false;
|
||||||
externalVoltageMeasurement = false;
|
externalVoltageMeasurement = false;
|
||||||
externalVoltagePin = 34;
|
externalVoltagePin = 34;
|
||||||
|
|
||||||
lowPowerMode = false;
|
lowPowerMode = false;
|
||||||
lowVoltageCutOff = 0;
|
lowVoltageCutOff = 0;
|
||||||
|
|
||||||
Serial.println("todo escrito");
|
Serial.println("todo escrito");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,8 @@ public:
|
||||||
// int reportingDistance; // deprecated
|
// int reportingDistance; // deprecated
|
||||||
String filter; // new
|
String filter; // new
|
||||||
bool toRF; // new
|
bool toRF; // new
|
||||||
|
bool messagesToRF;
|
||||||
|
bool objectsToRF;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LoraModule {
|
class LoraModule {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue