Commit 6579f5e8 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

gpsdrv: Made gps_get_utc() return year since 1900, month since Jan

Previously, this function was returning a human-friendly version of the
time received from GPS. This was now optimized to make it easire to operate
with other programming structures (e.g., struct tm). This modification has the
added benefit of returning the exact values received via the GPRMC NMEA
sentence.
parent 5560e971
......@@ -165,8 +165,8 @@ int gps_fixed()
void gps_get_utc(struct gps_utc *utc)
{
utc->yr = 1900 + info.utc.year;
utc->mon = 1 + info.utc.mon;
utc->yr = info.utc.year;
utc->mon = info.utc.mon;
utc->day = info.utc.day;
utc->hr = info.utc.hour;
utc->min = info.utc.min;
......
......@@ -43,7 +43,7 @@
/*=============*/
/* GPS defines */
/*=============*/
#define GPS_DBG 1
//#define GPS_DBG 1
#define GPS_OK_TO_SEND "$PSRF150,1*3E\r\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment