Skip to content

Commit c0d9d7c

Browse files
committed
Undo a wrong doing and fix another
1 parent 700f8fb commit c0d9d7c

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

main.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ void i2c_oled_comm_handle(uint8_t hdl_address, uint8_t *hdl_buffer, size_t hdl_b
129129
volatile bool update_rtc = false; // Set to true to trigger I2C communication with RTC module
130130
volatile bool rtc_time_has_sync = false; // Set to true when the RTC has been set by GPS or Mobile app
131131
static struct tm * tmTime;
132+
struct tm gpsTime; // Time received from GPS
132133
static time_t currentTime; // Current time of the Robogotchi
133134
static time_t timeSyncTime; // New time from GPS to be set during timeSync event
134135
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) {
18101811
//NRF_LOG_FLUSH();
18111812

18121813
// Convert the time from the GPS
1813-
struct tm gpsTime;
18141814
gpsTime.tm_year = 2000 + hgps.year - 1900;
18151815
gpsTime.tm_mon = hgps.month - 1;
18161816
gpsTime.tm_mday = hgps.date;
@@ -1820,10 +1820,6 @@ static void logging_timer_handler(void *p_context) {
18201820
// Give it to me in time_t
18211821
timeSyncTime = mktime(&gpsTime);
18221822

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-
18271823
// Store time sync difference in seconds if we are currently logging
18281824
if (log_file_active)
18291825
{
@@ -1873,13 +1869,6 @@ static void logging_timer_handler(void *p_context) {
18731869
static void telemetry_timer_handler(void *p_context) {
18741870
(void)p_context;
18751871

1876-
if (sync_in_progress)
1877-
{
1878-
NRF_LOG_INFO("Skipping telemetry");
1879-
NRF_LOG_FLUSH();
1880-
return;
1881-
}
1882-
18831872
// Set flag to write data when a response is received
18841873
write_logdata_now = true;
18851874

0 commit comments

Comments
 (0)