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