diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-02-17 18:11:46 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-02-17 18:11:46 +0100 |
commit | 2745c3276f5c2377a9713555c5941b17912b6ce7 (patch) | |
tree | a0d5f5f52aca124cb0ededbf5b839fedcdb1e998 /apps/gps/nmealib/time.c | |
parent | 3d3a68a7fb8315eb1d28b3f2906bb835f0e72994 (diff) | |
parent | 9fb024b1f236ff63c70c9942a2775cec2fb0ddec (diff) | |
download | px4-firmware-2745c3276f5c2377a9713555c5941b17912b6ce7.tar.gz px4-firmware-2745c3276f5c2377a9713555c5941b17912b6ce7.tar.bz2 px4-firmware-2745c3276f5c2377a9713555c5941b17912b6ce7.zip |
Merge branch 'master' of github.com:PX4/Firmware
Diffstat (limited to 'apps/gps/nmealib/time.c')
-rw-r--r-- | apps/gps/nmealib/time.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/apps/gps/nmealib/time.c b/apps/gps/nmealib/time.c deleted file mode 100644 index a24319630..000000000 --- a/apps/gps/nmealib/time.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * - * NMEA library - * URL: http://nmea.sourceforge.net - * Author: Tim (xtimor@gmail.com) - * Licence: http://www.gnu.org/licenses/lgpl.html - * $Id: time.c 4 2007-08-27 13:11:03Z xtimor $ - * - */ - -/*! \file time.h */ - -#include "nmea/time.h" - -#ifdef NMEA_WIN -# pragma warning(disable: 4201) -# pragma warning(disable: 4214) -# pragma warning(disable: 4115) -# include <windows.h> -# pragma warning(default: 4201) -# pragma warning(default: 4214) -# pragma warning(default: 4115) -#else -# include <time.h> -#endif - -#ifdef NMEA_WIN - -void nmea_time_now(nmeaTIME *stm) -{ - SYSTEMTIME st; - - GetSystemTime(&st); - - stm->year = st.wYear - 1900; - stm->mon = st.wMonth - 1; - stm->day = st.wDay; - stm->hour = st.wHour; - stm->min = st.wMinute; - stm->sec = st.wSecond; - stm->hsec = st.wMilliseconds / 10; -} - -#else /* NMEA_WIN */ - -void nmea_time_now(nmeaTIME *stm) -{ - time_t lt; - struct tm *tt; - - time(<); - tt = gmtime(<); - - stm->year = tt->tm_year; - stm->mon = tt->tm_mon; - stm->day = tt->tm_mday; - stm->hour = tt->tm_hour; - stm->min = tt->tm_min; - stm->sec = tt->tm_sec; - stm->hsec = 0; -} - -#endif |