Skip to content

Commit

Permalink
Version 1.0.0: reorganize per new Arduino library standard, fix bug w…
Browse files Browse the repository at this point in the history
…ith course in FullExample.ino
  • Loading branch information
mikalhart-intel committed Oct 5, 2017
1 parent 2c9ac0b commit 0a9d3c9
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 23 deletions.
4 changes: 2 additions & 2 deletions examples/FullExample/FullExample.ino
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void loop()
printFloat(gps.altitude.meters(), gps.altitude.isValid(), 7, 2);
printFloat(gps.course.deg(), gps.course.isValid(), 7, 2);
printFloat(gps.speed.kmph(), gps.speed.isValid(), 6, 2);
printStr(gps.course.isValid() ? TinyGPSPlus::cardinal(gps.course.value()) : "*** ", 6);
printStr(gps.course.isValid() ? TinyGPSPlus::cardinal(gps.course.deg()) : "*** ", 6);

unsigned long distanceKmToLondon =
(unsigned long)TinyGPSPlus::distanceBetween(
Expand Down Expand Up @@ -156,4 +156,4 @@ static void printStr(const char *str, int len)
for (int i=0; i<len; ++i)
Serial.print(i<slen ? str[i] : ' ');
smartDelay(0);
}
}
6 changes: 2 additions & 4 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ passedChecksum KEYWORD2
isValid KEYWORD2
isUpdated KEYWORD2
age KEYWORD2
rawLatDegrees KEYWORD2
rawLngDegrees KEYWORD2
rawLatBillionths KEYWORD2
rawLngBillionths KEYWORD2
lat KEYWORD2
lng KEYWORD2
isUpdatedDate KEYWORD2
Expand All @@ -62,6 +58,8 @@ mph KEYWORD2
mps KEYWORD2
kmph KEYWORD2
deg KEYWORD2
billionths KEYWORD2
negative KEYWORD2
meters KEYWORD2
miles KEYWORD2
kilometers KEYWORD2
Expand Down
33 changes: 21 additions & 12 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
{
"name": "TinyGPSPlus",
"keywords": "gps",
"description": "A new, customizable Arduino NMEA parsing library",
"repository":
{
"type": "git",
"url": "https://github.com/mikalhart/TinyGPSPlus.git"
},
"frameworks": "arduino",
"platforms": "atmelavr"
}
{
"name": "TinyGPSPlus",
"keywords": "gps,NMEA",
"description": "A new, customizable Arduino NMEA parsing library",
"repository":
{
"type": "git",
"url": "https://github.com/mikalhart/TinyGPSPlus.git"
},
"authors":
[
{
"name": "Mikal Hart",
"email": "[email protected]",
"url": "http://arduiniana.org",
"maintainer": true
}
],
"frameworks": "arduino",
"platforms": "*"
}
9 changes: 9 additions & 0 deletions library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=TinyGPS++
version=1.0.0
author=Mikal Hart
maintainer=Mikal Hart<[email protected]>
sentence=TinyGPS++ provides object-oriented parsing of GPS (NMEA) sentences
paragraph=NMEA is the standard format GPS devices use to report location, time, altitude, etc. TinyGPS++ is a compact, resilient library that parses the most common NMEA 'sentences' used: GGA and RMC. It can also be customized to extract data from *any* compliant sentence.
category=Communication
url=https://github.com/mikalhart/TinyGPSPlus
architectures=*
6 changes: 2 additions & 4 deletions TinyGPS++.cpp → src/TinyGPS++.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <stdlib.h>

#define _GPRMCterm "GPRMC"
#define _GNRMCterm "GNRMC"
#define _GPGGAterm "GPGGA"
#define _GNGGAterm "GNGGA"

TinyGPSPlus::TinyGPSPlus()
: parity(0)
Expand Down Expand Up @@ -209,9 +207,9 @@ bool TinyGPSPlus::endOfTermHandler()
// the first term determines the sentence type
if (curTermNumber == 0)
{
if (!strcmp(term, _GPRMCterm) || !strcmp(term, _GNRMCterm))
if (!strcmp(term, _GPRMCterm))
curSentenceType = GPS_SENTENCE_GPRMC;
else if (!strcmp(term, _GPGGAterm) || !strcmp(term, _GNGGAterm))
else if (!strcmp(term, _GPGGAterm))
curSentenceType = GPS_SENTENCE_GPGGA;
else
curSentenceType = GPS_SENTENCE_OTHER;
Expand Down
2 changes: 1 addition & 1 deletion TinyGPS++.h → src/TinyGPS++.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#include <limits.h>

#define _GPS_VERSION "0.95" // software version of this library
#define _GPS_VERSION "0.92" // software version of this library
#define _GPS_MPH_PER_KNOT 1.15077945
#define _GPS_MPS_PER_KNOT 0.51444444
#define _GPS_KMPH_PER_KNOT 1.852
Expand Down

0 comments on commit 0a9d3c9

Please sign in to comment.