MicroNMEA update compatibility by type inference
This commit is contained in:
parent
8d560599f1
commit
32cb370964
|
|
@ -1117,8 +1117,14 @@ void initTouch() {
|
||||||
char buffer[85];
|
char buffer[85];
|
||||||
MicroNMEA nmea(buffer, sizeof(buffer));
|
MicroNMEA nmea(buffer, sizeof(buffer));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int lastCourse = 0;
|
int lastCourse = 0;
|
||||||
void unkHandler(const MicroNMEA& nmea) {
|
|
||||||
|
/// Arrg. MicroNMEA changes type definition... so lets auto-infer type
|
||||||
|
template<typename T>
|
||||||
|
//void unkHandler(const MicroNMEA& nmea) {
|
||||||
|
void unkHandler(T nmea) {
|
||||||
if (strcmp(nmea.getMessageID(), "VTG") == 0) {
|
if (strcmp(nmea.getMessageID(), "VTG") == 0) {
|
||||||
const char *s = nmea.getSentence();
|
const char *s = nmea.getSentence();
|
||||||
while (*s && *s != ',') s++;
|
while (*s && *s != ',') s++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue