Closed rkyleg closed 7 years ago
However, the encode function always returns false in each case statement. I wasn't getting any results using the example code, but when I removed the if statement, I got valid gps sentences returned.
the examples are correct the encode
function may return true
, but only when a complete sentence is received:
https://github.com/mikalhart/TinyGPSPlus/blob/master/TinyGPS%2B%2B.cpp#L77
In all of the examples, the code wraps gps.encode in an if statement.
if (gps.encode(ss.read()))
However, the encode function always returns false in each case statement. I wasn't getting any results using the example code, but when I removed the if statement, I got valid gps sentences returned.
bool TinyGPSPlus::encode(char c)