MicroNMEA update compatibility by type inference

This commit is contained in:
Hansi, dl9rdz 2020-12-30 12:02:57 +01:00
parent 8d560599f1
commit 32cb370964
1 changed files with 7 additions and 1 deletions

View File

@ -1117,8 +1117,14 @@ void initTouch() {
char buffer[85];
MicroNMEA nmea(buffer, sizeof(buffer));
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) {
const char *s = nmea.getSentence();
while (*s && *s != ',') s++;