diff options
| author | Maximilien Cuony <maximilien@theglu.org> | 2016-06-03 09:29:22 +0200 |
|---|---|---|
| committer | Maximilien Cuony <maximilien@theglu.org> | 2016-06-03 09:29:22 +0200 |
| commit | 64e3e0b76ebebe2cea949e27d49c149b2e876391 (patch) | |
| tree | d277c20c822a4073efe447057116e94771a98f6b /src/common | |
| parent | bbe4080e94308149b74dd9ccefddf95878eec5d0 (diff) | |
| download | glutte-o-matic-64e3e0b76ebebe2cea949e27d49c149b2e876391.tar.gz glutte-o-matic-64e3e0b76ebebe2cea949e27d49c149b2e876391.tar.bz2 glutte-o-matic-64e3e0b76ebebe2cea949e27d49c149b2e876391.zip | |
Travail de train GPS
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/src/Core/common.c | 3 | ||||
| -rw-r--r-- | src/common/src/Core/main.c | 1 | ||||
| -rw-r--r-- | src/common/src/GPS/gps.c | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/src/common/src/Core/common.c b/src/common/src/Core/common.c index 8c63917..4adca26 100644 --- a/src/common/src/Core/common.c +++ b/src/common/src/Core/common.c @@ -128,11 +128,14 @@ int local_time(struct tm *time) time->tm_isdst = 1; } + time->tm_year -= 1900; //TODO Same on hardware ? + // Let mktime fix the struct tm *time if (mktime(time) == (time_t)-1) { // TODO inform about failure valid = 0; } + } return valid; diff --git a/src/common/src/Core/main.c b/src/common/src/Core/main.c index feac593..4eebfa2 100644 --- a/src/common/src/Core/main.c +++ b/src/common/src/Core/main.c @@ -320,7 +320,6 @@ static void gps_monit_task(void *pvParameters) { int time_valid = local_time(&time); if (time_valid) { - printf("Valid\n"); if (time.tm_sec % 4 >= 2) { leds_turn_on(LED_BLUE); } diff --git a/src/common/src/GPS/gps.c b/src/common/src/GPS/gps.c index 61c8c48..568a181 100644 --- a/src/common/src/GPS/gps.c +++ b/src/common/src/GPS/gps.c @@ -56,6 +56,7 @@ int gps_utctime(struct tm *timeutc) { timeutc->tm_sec = gps_timeutc.tm_sec; valid = gps_timeutc_valid; } + xSemaphoreGive(timeutc_semaphore); return valid; |
