gpstimesync() deleted; paxcounter.conf: Timesync enabled

This commit is contained in:
Klaus K Wilting 2019-01-26 23:45:11 +01:00
parent 3285eed0fa
commit f4c29f3137
4 changed files with 3 additions and 17 deletions

View File

@ -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>

View File

@ -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

View File

@ -82,8 +82,8 @@
#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_RTC 5 // sync time each ... minutes with RTC [default = 5], 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
// moved to src/lmic_config.h

View File

@ -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