gpstimesync() deleted; paxcounter.conf: Timesync enabled
This commit is contained in:
parent
3285eed0fa
commit
f4c29f3137
@ -2,7 +2,7 @@
|
||||
#define _GPSREAD_H
|
||||
|
||||
#include <TinyGPS++.h> // library for parsing NMEA data
|
||||
#include <TimeLib.h>
|
||||
#include <Time.h>
|
||||
|
||||
#ifdef GPS_I2C // Needed for reading from I2C Bus
|
||||
#include <Wire.h>
|
||||
|
@ -27,6 +27,5 @@ int set_rtctime(RtcDateTime now);
|
||||
void sync_rtctime(void);
|
||||
time_t get_rtctime(void);
|
||||
float get_rtctemp(void);
|
||||
time_t gpsTimeSync(void);
|
||||
|
||||
#endif // _RTCTIME_H
|
@ -82,7 +82,7 @@
|
||||
#define RESPONSE_TIMEOUT_MS 60000 // firmware binary server connection timeout [milliseconds]
|
||||
|
||||
// setting for syncing time of node
|
||||
//#define TIME_SYNC_INTERVAL 60 // sync time each ... minutes with external source [default = 60], comment out means off
|
||||
#define TIME_SYNC_INTERVAL 60 // sync time each ... minutes with external source [default = 60], comment out means off
|
||||
#define TIME_SYNC_INTERVAL_RTC 5 // sync time each ... minutes with RTC [default = 5], comment out means off
|
||||
|
||||
// LMIC settings
|
||||
|
@ -124,17 +124,4 @@ float get_rtctemp(void) {
|
||||
return 0;
|
||||
} // get_rtc()
|
||||
|
||||
time_t gpsTimeSync(void) {
|
||||
#ifdef HAS_GPS
|
||||
tmElements_t tm;
|
||||
tm.Second = gps.time.second();
|
||||
tm.Minute = gps.time.minute();
|
||||
tm.Hour = gps.time.hour();
|
||||
tm.Day = gps.date.day();
|
||||
tm.Month = gps.date.month();
|
||||
tm.Year = CalendarYrToTm(gps.date.year());
|
||||
return makeTime(tm);
|
||||
#endif // HAS_GPS
|
||||
}
|
||||
|
||||
#endif // HAS_RTC
|
Loading…
Reference in New Issue
Block a user