mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-04-05 14:37:05 +00:00
GPS for iGate
This commit is contained in:
parent
c0641986aa
commit
00db358cc3
14 changed files with 201 additions and 38 deletions
|
|
@ -1,3 +1,4 @@
|
|||
#include <TinyGPS++.h>
|
||||
#include <WiFi.h>
|
||||
#include "configuration.h"
|
||||
#include "station_utils.h"
|
||||
|
|
@ -13,8 +14,10 @@
|
|||
#include "display.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
extern Configuration Config;
|
||||
extern WiFiClient espClient;
|
||||
extern TinyGPSPlus gps;
|
||||
extern String versionDate;
|
||||
extern String firstLine;
|
||||
extern String secondLine;
|
||||
|
|
@ -195,8 +198,20 @@ namespace Utils {
|
|||
|
||||
activeStations();
|
||||
|
||||
String beaconPacket = iGateBeaconPacket;
|
||||
String secondaryBeaconPacket = iGateLoRaBeaconPacket;
|
||||
String beaconPacket = iGateBeaconPacket;
|
||||
String secondaryBeaconPacket = iGateLoRaBeaconPacket;
|
||||
#ifdef HAS_GPS
|
||||
if (Config.beacon.gpsActive && !Config.digi.ecoMode) {
|
||||
GPS_Utils::getData();
|
||||
if (gps.location.isUpdated()) {
|
||||
GPS_Utils::generateBeaconFirstPart();
|
||||
String encodedGPS = GPS_Utils::encodeGPS(gps.location.lat(), gps.location.lng(), Config.beacon.overlay, Config.beacon.symbol);
|
||||
beaconPacket = iGateBeaconPacket + encodedGPS;
|
||||
secondaryBeaconPacket = iGateLoRaBeaconPacket + encodedGPS;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Config.wxsensor.active && wxModuleType != 0) {
|
||||
String sensorData = WX_Utils::readDataSensor();
|
||||
beaconPacket += sensorData;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue