mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-07-12 21:01:07 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| beae88d557 | |||
| 8b4d8c2d1d | |||
| 08ae1e322b | |||
| d576be0f2b |
@@ -201,10 +201,10 @@
|
||||
name="action.symbol"
|
||||
id="action.symbol"
|
||||
>
|
||||
<option value="L#">Green star with L</option>
|
||||
<option value="L_">Blue circle with L</option>
|
||||
<option value="L&">Black diamond with L</option>
|
||||
<option value="La" selected>Red diamond with L</option>
|
||||
<option value="L#">Green Star with L - Digipeater</option>
|
||||
<option value="L_">Blue Circle with L - Station with Wx Data</option>
|
||||
<option value="L&">Black Diamond with L - Rx (only) iGate</option>
|
||||
<option value="La" selected>Red Diamond with L - Rx+Tx iGate</option>
|
||||
</select>
|
||||
</div>
|
||||
<div
|
||||
|
||||
@@ -68,10 +68,10 @@ namespace TELEMETRY_Utils {
|
||||
}
|
||||
|
||||
void sendBaseTelemetryPacket(const String& prefix, const std::vector<String>& values) {
|
||||
String packet = prefix + joinWithCommas(values);
|
||||
|
||||
String packet = prefix + joinWithCommas(values);
|
||||
String currentCallsign = (Config.tacticalCallsign != "") ? Config.tacticalCallsign : Config.callsign;
|
||||
if (Config.beacon.sendViaAPRSIS) {
|
||||
String baseAPRSISTelemetryPacket = APRSPacketLib::generateMessagePacket(Config.callsign, "APLRG1", "TCPIP,qAC", Config.callsign, packet);
|
||||
String baseAPRSISTelemetryPacket = APRSPacketLib::generateMessagePacket(currentCallsign, "APLRG1", "TCPIP,qAC", currentCallsign, packet);
|
||||
#ifdef HAS_A7670
|
||||
A7670_Utils::uploadToAPRSIS(baseAPRSISTelemetryPacket);
|
||||
#else
|
||||
@@ -79,7 +79,7 @@ namespace TELEMETRY_Utils {
|
||||
#endif
|
||||
delay(300);
|
||||
} else if (Config.beacon.sendViaRF) {
|
||||
String baseRFTelemetryPacket = APRSPacketLib::generateMessagePacket(Config.callsign, "APLRG1", Config.beacon.path, Config.callsign, packet);
|
||||
String baseRFTelemetryPacket = APRSPacketLib::generateMessagePacket(currentCallsign, "APLRG1", Config.beacon.path, currentCallsign, packet);
|
||||
LoRa_Utils::sendNewPacket(baseRFTelemetryPacket);
|
||||
delay(3000);
|
||||
}
|
||||
|
||||
+10
-5
@@ -34,6 +34,7 @@
|
||||
#include "display.h"
|
||||
#include "utils.h"
|
||||
|
||||
#define DAY_MS (24UL * 60UL * 60UL * 1000UL)
|
||||
|
||||
extern Configuration Config;
|
||||
extern TinyGPSPlus gps;
|
||||
@@ -65,6 +66,7 @@ bool sendStartTelemetry = true;
|
||||
bool beaconUpdate = false;
|
||||
uint32_t lastBeaconTx = 0;
|
||||
uint32_t lastScreenOn = millis();
|
||||
uint32_t lastStatusTx = 0;
|
||||
bool callsignIsValid = false;
|
||||
String beaconPacket;
|
||||
String secondaryBeaconPacket;
|
||||
@@ -81,14 +83,18 @@ namespace Utils {
|
||||
status.concat(Config.beacon.statusPacket);
|
||||
APRS_IS_Utils::upload(status);
|
||||
SYSLOG_Utils::log(2, status, 0, 0.0, 0); // APRSIS TX
|
||||
statusAfterBoot = false;
|
||||
}
|
||||
if (statusAfterBoot && !Config.beacon.sendViaAPRSIS && Config.beacon.sendViaRF) {
|
||||
status.concat(":>");
|
||||
status.concat(Config.beacon.statusPacket);
|
||||
STATION_Utils::addToOutputPacketBuffer(status, true); // treated also as beacon on Tx Freq
|
||||
statusAfterBoot = false;
|
||||
}
|
||||
statusAfterBoot = false;
|
||||
lastStatusTx = millis();
|
||||
}
|
||||
|
||||
void checkStatusInterval() {
|
||||
if (lastStatusTx == 0 || millis() - lastStatusTx > DAY_MS) statusAfterBoot = true;
|
||||
}
|
||||
|
||||
String getLocalIP() {
|
||||
@@ -283,9 +289,8 @@ namespace Utils {
|
||||
beaconUpdate = false;
|
||||
}
|
||||
|
||||
if (statusAfterBoot && Config.beacon.statusActive && !Config.beacon.statusPacket.isEmpty()) {
|
||||
processStatus();
|
||||
}
|
||||
checkStatusInterval();
|
||||
if (statusAfterBoot && Config.beacon.statusActive && !Config.beacon.statusPacket.isEmpty()) processStatus();
|
||||
}
|
||||
|
||||
void checkDisplayInterval() {
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ namespace WIFI_Utils {
|
||||
if (!backupDigiMode && ((currentTime - lastWiFiCheck) >= 30 * 1000) && !WiFiAutoAPStarted) {
|
||||
lastWiFiCheck = currentTime;
|
||||
if (WiFi.status() == WL_CONNECTED) {
|
||||
if (Config.digi.backupDigiMode && (currentTime - lastServerCheck > 60 * 1000)) {
|
||||
if (Config.digi.backupDigiMode && (currentTime - lastServerCheck > 30 * 1000)) {
|
||||
Serial.println("*** Server Connection LOST → Backup Digi Mode ***");
|
||||
backupDigiMode = true;
|
||||
WiFi.disconnect();
|
||||
|
||||
Reference in New Issue
Block a user