Skip to content

Commit 737f8b7

Browse files
authored
Merge pull request #129 from foodini/patch-1
Fix issue with millisecond parsing.
2 parents 8d7ea10 + 1666dae commit 737f8b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NMEA_parse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ bool Adafruit_GPS::parseTime(char *p) {
785785
char *dec = strchr(p, '.');
786786
char *comstar = min(strchr(p, ','), strchr(p, '*'));
787787
if (dec != NULL && comstar != NULL && dec < comstar)
788-
milliseconds = atof(p) * 1000;
788+
milliseconds = atof(dec) * 1000;
789789
else
790790
milliseconds = 0;
791791
lastTime = sentTime;

0 commit comments

Comments
 (0)