Commit Graph

16 Commits

Author SHA1 Message Date
Ron Barry 1666dae26b
Fix issue with millisecond parsing.
By calling atof() on p, we're converting the entire time string  (101520.123 for 10:15:20am and 123 milliseconds) to a float, then multiplying by 1000 to get ms. This results in a value that overflows and exhibits all sorts of strange behavior as seconds and minutes turn over. It's clearly not what was intended. From the if statement wrapping the conversion, it is clear that the author intended to make the atof() conversion on the dec pointer, instead. Making this change actually does fix the parsing so that Adafruit_GPS' milliseconds property correctly matches the value in the NMEA sentence.

You guys do great work. Thanks for everything!
2020-10-18 01:41:23 -07:00
Matt Goodrich e5ad8934d8 Bugfix for parseCoord 2020-06-04 14:43:11 -04:00
Owen Torres a0cf6d860a Fix formatting 2020-02-23 18:53:32 -05:00
Owen Torres e3caa7d491 Fix boolean deprecation and -Wdouble-promotion warnings 2020-02-23 18:39:46 -05:00
Rick Sellens fdda5b6e1e clang 2020-02-07 20:20:30 -05:00
Rick Sellens 8c550d278e fix to parsing bug on RMB sentence 2020-02-07 14:54:26 -05:00
Rick Sellens a047465a73 More rigor in parseTime()
previous version ran ok with M0, but generated exceptions in ESP32 when decimals not found.
2020-02-07 14:26:39 -05:00
Rick Sellens deb312b293 Clear thisSentence and thisSource at start of each check
that way previous sentence identifiers won't bleed through on failure.
2020-01-29 19:52:13 -05:00
Rick Sellens 84eaad66e4 Fail Check if sentence not recognized
Previous check would pass for unknown but properly formatted sentence.
2020-01-29 19:44:05 -05:00
Rick Sellens ebb09d0480 clang 2020-01-29 13:23:02 -05:00
Rick Sellens 1afe1df764 clang 2020-01-29 13:10:43 -05:00
Rick Sellens 8ae6a7b75a clang 2020-01-29 12:57:20 -05:00
Rick Sellens 3876f29fc1 New parse() with more sentences
move other parsing functions in NMEA_parse.cpp
fix parseTime to be insensitive to number of decimal places and return bool.
add isEmpty() checks where needed.
reorder some declarations.
2020-01-29 10:18:41 -05:00
Owen Torres 17bb6d1ed2 Replace boolean with standard bool
This causes deprecation warnings when compiling with the STM32duino
Arduino core.
2020-01-27 18:54:28 +00:00
Rick Sellens c006654469 clang hates trailing white space 2020-01-19 08:56:06 -05:00
Rick Sellens d1c93e04a7 Move parse and build to their own source files 2020-01-19 07:43:48 -05:00