mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-01-26 18:34:19 +01:00
gps satelites indicator
This commit is contained in:
parent
d628de9c9c
commit
45edf2ffa3
|
|
@ -48,12 +48,14 @@ ___________________________________________________________________*/
|
|||
#include "A7670_utils.h"
|
||||
#endif
|
||||
|
||||
String versionDate = "2025.02.12";
|
||||
String versionDate = "2025.02.24";
|
||||
Configuration Config;
|
||||
WiFiClient espClient;
|
||||
#ifdef HAS_GPS
|
||||
HardwareSerial gpsSerial(1);
|
||||
TinyGPSPlus gps;
|
||||
uint32_t gpsSatelliteTime = 0;
|
||||
bool gpsInfoToggle = false;
|
||||
#endif
|
||||
|
||||
uint8_t myWiFiAPIndex = 0;
|
||||
|
|
@ -152,7 +154,26 @@ void loop() {
|
|||
BATTERY_Utils::checkIfShouldSleep();
|
||||
}
|
||||
|
||||
thirdLine = Utils::getLocalIP();
|
||||
#ifdef HAS_GPS
|
||||
if (Config.beacon.gpsActive) {
|
||||
if (millis() - gpsSatelliteTime > 5000) {
|
||||
gpsInfoToggle = !gpsInfoToggle;
|
||||
gpsSatelliteTime = millis();
|
||||
}
|
||||
if (gpsInfoToggle) {
|
||||
thirdLine = "Satellite(s): ";
|
||||
String gpsData = String(gps.satellites.value());
|
||||
if (gpsData.length() < 2) gpsData = "0" + gpsData; // Ensure two-digit formatting
|
||||
thirdLine += gpsData;
|
||||
} else {
|
||||
thirdLine = Utils::getLocalIP();
|
||||
}
|
||||
} else {
|
||||
thirdLine = Utils::getLocalIP();
|
||||
}
|
||||
#else
|
||||
thirdLine = Utils::getLocalIP();
|
||||
#endif
|
||||
|
||||
#ifdef HAS_A7670
|
||||
if (Config.aprs_is.active && !modemLoggedToAPRSIS) A7670_Utils::APRS_IS_connect();
|
||||
|
|
|
|||
|
|
@ -80,10 +80,7 @@ namespace STATION_Utils {
|
|||
lastStation.station = station;
|
||||
lastHeardStations.push_back(lastStation);
|
||||
}
|
||||
|
||||
char buffer[30]; // Adjust size as needed
|
||||
sprintf(buffer, "Stations (%dmin) = %2d", Config.rememberStationTime, lastHeardStations.size());
|
||||
fourthLine = buffer;
|
||||
Utils::activeStations();
|
||||
}
|
||||
|
||||
bool wasHeard(const String& station) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue