checking freqs digirepeater

This commit is contained in:
richonguzman 2023-06-08 17:09:05 -04:00
parent 0a2c7ed9ee
commit c81a04a315
10 changed files with 79 additions and 41 deletions

View file

@ -29,7 +29,13 @@ void processStatus() {
} else {
delay(5000);
status += ":>" + Config.defaultStatus;
if (stationMode == 4) { // Digirepeating with Freq Rx != Tx
LoRa_Utils::changeFreqTx();
}
LoRa_Utils::sendNewPacket("APRS", status);
if (stationMode == 4) {
LoRa_Utils::changeFreqRx();
}
}
statusAfterBoot = false;
}
@ -55,20 +61,29 @@ void checkBeaconInterval() {
display_toggle(true);
thirdLine = "";
Serial.println("---- Sending iGate Beacon ----");
if (stationMode==3 || stationMode==4) {
show_display(firstLine, secondLine, thirdLine, "SENDING iGate BEACON", 0);
fourthLine = " listening...";
LoRa_Utils::sendNewPacket("APRS",iGateBeaconPacket);
} else if (stationMode==1 || stationMode==2) {
if (stationMode==1 || stationMode==2) {
show_display(firstLine, secondLine, thirdLine, "SENDING iGate BEACON", 1000);
fourthLine = " listening...";
espClient.write((iGateBeaconPacket + "\n").c_str());
show_display(firstLine, secondLine, thirdLine, fourthLine, 0);
} else if (stationMode==3 || stationMode==4) {
show_display(firstLine, secondLine, thirdLine, "SENDING iGate BEACON", 0);
fourthLine = " listening...";
if (stationMode == 4) { // Digirepeating with Freq Rx != Tx
LoRa_Utils::changeFreqTx();
}
LoRa_Utils::sendNewPacket("APRS",iGateBeaconPacket);
if (stationMode == 4) {
LoRa_Utils::changeFreqRx();
}
}
lastBeaconTx = millis();
lastScreenOn = millis();
beacon_update = false;
}
if (statusAfterBoot) {
processStatus();
}
}
void checkDisplayInterval() {
@ -80,4 +95,14 @@ void checkDisplayInterval() {
}
}
void validateDigiFreqs() {
if (stationMode == 4) {
if (abs(Config.loramodule.digirepeaterTxFreq - Config.loramodule.digirepeaterRxFreq) < 125000) {
Serial.println("Tx Freq less than 125kHz from Rx Freq ---> NOT VALID, check 'data/igate_conf.json'");
show_display("Tx Freq is less than ", "125kHz from Rx Freq", "change it on : /data/", "igate_conf.json", 0);
while (1);
}
}
}
}