summaryrefslogtreecommitdiff
path: root/libraries/TinyGPS/TinyGPS.h
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2017-05-31 23:35:26 +1000
committerStanley Huang <stanleyhuangyc@gmail.com>2017-05-31 23:35:26 +1000
commit668e49d0471c9caa7243d51d416dde34bb0e00f3 (patch)
tree4779bd04c4b8a6179ffd42a9a6d125d0db0a8a1b /libraries/TinyGPS/TinyGPS.h
parentfb77c5e5b484ffd974de026244132f721c9aadaf (diff)
download2021-arduino-obd-668e49d0471c9caa7243d51d416dde34bb0e00f3.tar.gz
2021-arduino-obd-668e49d0471c9caa7243d51d416dde34bb0e00f3.tar.bz2
2021-arduino-obd-668e49d0471c9caa7243d51d416dde34bb0e00f3.zip
Minor optimizations
Diffstat (limited to 'libraries/TinyGPS/TinyGPS.h')
-rw-r--r--libraries/TinyGPS/TinyGPS.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/libraries/TinyGPS/TinyGPS.h b/libraries/TinyGPS/TinyGPS.h
index 89d4148..6399d18 100644
--- a/libraries/TinyGPS/TinyGPS.h
+++ b/libraries/TinyGPS/TinyGPS.h
@@ -35,7 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define _GPS_KMPH_PER_KNOT 1.852
#define _GPS_MILES_PER_METER 0.00062137112
#define _GPS_KM_PER_METER 0.001
-// #define _GPS_NO_STATS
+//#define _GPS_NO_STATS
class TinyGPS
{
@@ -93,6 +93,11 @@ public:
#ifndef _GPS_NO_STATS
void stats(unsigned long *chars, unsigned short *good_sentences, unsigned short *failed_cs);
+ // statistics
+ unsigned long _encoded_characters;
+ unsigned short _good_sentences;
+ unsigned short _failed_checksum;
+ unsigned short _passed_checksum;
#endif
private:
@@ -121,16 +126,9 @@ private:
byte _term_offset;
bool _gps_data_good;
-#ifndef _GPS_NO_STATS
- // statistics
- unsigned long _encoded_characters;
- unsigned short _good_sentences;
- unsigned short _failed_checksum;
- unsigned short _passed_checksum;
-#endif
-
// internal utilities
- int from_hex(char a);
+ byte from_hex(char a);
+ byte hex2uint8(const char* p);
unsigned long parse_decimal();
unsigned long parse_degrees();
bool term_complete();