Skip to content

Commit

Permalink
status mod for TCPIP and RF
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed Apr 9, 2024
1 parent aea0aa2 commit 0b22d27
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ ____________________________________________________
____________________________________________________
## Timeline (Versions):

- 2024.04.09 iGate/Digirepeater own GPS beacon is encoded (Base91) now.
- 2024.03.18 OE5HWN MeshCom board support added.
- 2024.02.25 New Web Configuration UI with WiFi AP (thanks Damian SQ2CPA).
- 2023.01.28 Updated to ElegantOTA v.3 (AsyncElegantOTA was deprecated).
Expand Down
32 changes: 15 additions & 17 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,19 @@ namespace Utils {
void processStatus() {
String status = Config.callsign + ">APLRG1," + Config.beacon.path;

if (Config.aprs_is.active && Config.digi.mode == 0) { // If only IGate
if (WiFi.status() == WL_CONNECTED && Config.aprs_is.active && Config.beacon.sendViaAPRSIS) {
delay(1000);
status += ",qAC:>https://github.com/richonguzman/LoRa_APRS_iGate " + versionDate;
APRS_IS_Utils::upload(status);
SYSLOG_Utils::log("APRSIS Tx", status,0,0,0);
statusAfterBoot = false;
}
if (statusAfterBoot && !Config.beacon.sendViaAPRSIS && Config.beacon.sendViaRF) {
delay(2000);
status += ":>https://github.com/richonguzman/LoRa_APRS_iGate " + versionDate;
LoRa_Utils::sendNewPacket("APRS", status);
statusAfterBoot = false;
}
// Comment this for now we will need this in the future
// } else if (Config.digi.mode == 2) {
// delay(5000);
// status += ":>https://github.com/richonguzman/LoRa_APRS_iGate " + versionDate;
// LoRa_Utils::sendNewPacket("APRS", status);
// }

statusAfterBoot = false;
}

String getLocalIP() {
Expand Down Expand Up @@ -91,9 +90,10 @@ namespace Utils {

void checkBeaconInterval() {
uint32_t lastTx = millis() - lastBeaconTx;
String beaconPacket, secondaryBeaconPacket;
String beaconPacket = iGateBeaconPacket;
String secondaryBeaconPacket = iGateLoRaBeaconPacket;

if (lastBeaconTx == 0 || lastTx >= Config.beacon.interval*60*1000) {
if (lastBeaconTx == 0 || lastTx >= Config.beacon.interval * 60 * 1000) {
beaconUpdate = true;
}

Expand All @@ -108,13 +108,11 @@ namespace Utils {

if (Config.bme.active) {
String sensorData = BME_Utils::readDataSensor();

beaconPacket = iGateBeaconPacket + sensorData + Config.beacon.comment;
secondaryBeaconPacket = iGateLoRaBeaconPacket + sensorData + Config.beacon.comment;
} else {
beaconPacket = iGateBeaconPacket + Config.beacon.comment;
secondaryBeaconPacket = iGateLoRaBeaconPacket + Config.beacon.comment;
beaconPacket += sensorData + Config.beacon.comment;
secondaryBeaconPacket += sensorData + Config.beacon.comment;
}
beaconPacket += Config.beacon.comment;
secondaryBeaconPacket += Config.beacon.comment;

#if defined(TTGO_T_LORA32_V2_1) || defined(HELTEC_V2) || defined(HELTEC_HTCT62)
if (Config.sendBatteryVoltage) {
Expand Down

0 comments on commit 0b22d27

Please sign in to comment.