GPS handling and timesync code refactored

This commit is contained in:
Verkehrsrot committed 2019-08-04 15:17:50 +02:00
1 parent 7284d7ce4d
commit 1efc9be6c3
8 files changed
+69 -50

No files matched your search

-2
View File
@@ -82,8 +82,6 @@ typedef struct {
uint8_t satellites;
uint16_t hdop;
int16_t altitude;
uint32_t time_age;
tmElements_t timedate;
} gpsStatus_t;
typedef struct {
+3 -6
View File
@@ -10,18 +10,15 @@
#endif
#define NMEA_FRAME_SIZE 82 // NEMA has a maxium of 82 bytes per record
#define NMEA_BUFFERTIME 50 // 50ms safety time regardless
extern TinyGPSPlus gps; // Make TinyGPS++ instance globally availabe
extern gpsStatus_t
gps_status; // Make struct for storing gps data globally available
extern TaskHandle_t GpsTask;
int gps_init(void);
void IRAM_ATTR gps_storetime(gpsStatus_t *gps_store);
int gps_config();
void gps_storelocation(gpsStatus_t *gps_store);
void gps_loop(void *pvParameters);
time_t fetch_gpsTime(gpsStatus_t value, uint16_t *msec);
int gps_config();
time_t fetch_gpsTime(uint16_t *msec);
time_t fetch_gpsTime(void);
#endif