@@ -129,6 +129,7 @@ void i2c_oled_comm_handle(uint8_t hdl_address, uint8_t *hdl_buffer, size_t hdl_b
129
129
volatile bool update_rtc = false; // Set to true to trigger I2C communication with RTC module
130
130
volatile bool rtc_time_has_sync = false; // Set to true when the RTC has been set by GPS or Mobile app
131
131
static struct tm * tmTime ;
132
+ struct tm gpsTime ; // Time received from GPS
132
133
static time_t currentTime ; // Current time of the Robogotchi
133
134
static time_t timeSyncTime ; // New time from GPS to be set during timeSync event
134
135
static time_t fileSystemSyncTime ; // The last time the filesystem performed a sync to QSPI
@@ -1810,7 +1811,6 @@ static void logging_timer_handler(void *p_context) {
1810
1811
//NRF_LOG_FLUSH();
1811
1812
1812
1813
// Convert the time from the GPS
1813
- struct tm gpsTime ;
1814
1814
gpsTime .tm_year = 2000 + hgps .year - 1900 ;
1815
1815
gpsTime .tm_mon = hgps .month - 1 ;
1816
1816
gpsTime .tm_mday = hgps .date ;
@@ -1820,10 +1820,6 @@ static void logging_timer_handler(void *p_context) {
1820
1820
// Give it to me in time_t
1821
1821
timeSyncTime = mktime (& gpsTime );
1822
1822
1823
- //strftime(datetimestring, 64, "%Y-%m-%dT%H:%M:%S", tmTime);
1824
- //NRF_LOG_INFO("Setting time from GPS; time now %s or %ld", datetimestring, timeSyncTime);
1825
- //NRF_LOG_FLUSH();
1826
-
1827
1823
// Store time sync difference in seconds if we are currently logging
1828
1824
if (log_file_active )
1829
1825
{
@@ -1873,13 +1869,6 @@ static void logging_timer_handler(void *p_context) {
1873
1869
static void telemetry_timer_handler (void * p_context ) {
1874
1870
(void )p_context ;
1875
1871
1876
- if (sync_in_progress )
1877
- {
1878
- NRF_LOG_INFO ("Skipping telemetry" );
1879
- NRF_LOG_FLUSH ();
1880
- return ;
1881
- }
1882
-
1883
1872
// Set flag to write data when a response is received
1884
1873
write_logdata_now = true;
1885
1874
0 commit comments