My version of TinyGPS mostly add dbg
Fork of TinyGPS by
Diff: TinyGPS.cpp
- Revision:
- 2:34b4815eb82f
- Parent:
- 1:f522b8bdf987
--- a/TinyGPS.cpp Thu Apr 28 15:24:13 2011 +0000 +++ b/TinyGPS.cpp Tue Apr 14 13:24:45 2015 +0000 @@ -22,6 +22,16 @@ #include "TinyGPS.h" +// Becarefull when adding debug here +// it take a lot of time to print on console +// so if you do debuging please ensure your +// RX buffers don't gonna ovf. +#define __DEBUG__ 0 +#ifndef __MODULE__ +#define __MODULE__ "TinyGPS.cpp" +#endif +#include "MyDebug.h" + #define _GPRMC_TERM "GPRMC" #define _GPGGA_TERM "GPGGA" #define _GPGSV_TERM "GPGSV" @@ -64,6 +74,8 @@ { bool valid_sentence = false; + DBG("INSERTING %c",c); + ++_encoded_characters; switch(c) { @@ -72,6 +84,7 @@ case '\r': case '\n': case '*': + DBG("*END"); if (_term_offset < sizeof(_term)) { _term[_term_offset] = 0; @@ -83,6 +96,7 @@ return valid_sentence; case '$': // sentence begin + DBG("$START"); _term_number = _term_offset = 0; _parity = 0; _sentence_type = _GPS_SENTENCE_OTHER; @@ -195,6 +209,7 @@ _gga_ready = true; _hdop = _new_hdop; _sat_count = _new_sat_count; + DBG("YEAH GPGGA"); case _GPS_SENTENCE_GPGSV: _gsv_ready = true; break; @@ -238,6 +253,7 @@ break; case 103: // Latitude case 202: + DBG("GOT LAT"); _new_latitude = parse_degrees(); _new_position_fix = millis(); break;