From 47dfe44ebab1698c1dee6757b6ce0f19b5e030a3 Mon Sep 17 00:00:00 2001 From: asterix Date: Mon, 5 Oct 2009 16:40:10 +0000 Subject: [PATCH] Add comment. Reformat. Read always char from channel. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3026 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/net/nmea.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bertos/net/nmea.c b/bertos/net/nmea.c index 00c6d076..11dcf374 100644 --- a/bertos/net/nmea.c +++ b/bertos/net/nmea.c @@ -196,6 +196,7 @@ static time_t timestampToSec(uint32_t time_stamp, uint32_t date_stamp) t.tm_sec = tmr[0] + (ROUND_UP(msec, 1000) / 1000); t.tm_min = tmr[1]; t.tm_hour = tmr[2]; + //If we not have refence data, we set as default 1/1/1970. t.tm_mday = 1; t.tm_mon = 1; t.tm_year = 70; @@ -374,7 +375,7 @@ int nmea_gpgsv(nmeap_context_t *context, nmeap_sentence_t *sentence) * if the sentence has a callout, call it */ if (sentence->callout != 0) - (*sentence->callout)(context,gsv,context->user_data); + (*sentence->callout)(context, gsv, context->user_data); return NMEA_GPGSV; } @@ -384,8 +385,7 @@ void nmea_poll(nmeap_context_t *context, KFile *channel) int c; while ((c = kfile_getc(channel)) != EOF) { - if (nmeap_parse(context, c) == -1) - break; + nmeap_parse(context, c); } } -- 2.25.1