fix reading of speed
authorJohn Crispin <john@phrozen.org>
Thu, 18 Aug 2016 08:46:16 +0000 (10:46 +0200)
committerJohn Crispin <john@phrozen.org>
Thu, 18 Aug 2016 08:46:16 +0000 (10:46 +0200)
Signed-off-by: John Crispin <john@phrozen.org>
nmea.c

diff --git a/nmea.c b/nmea.c
index fecdef8d55185c5f3791d6fb9012db14e15ac25b..9c4bde8130c89f6781555543fbe218c6dc176a08 100644 (file)
--- a/nmea.c
+++ b/nmea.c
@@ -168,7 +168,7 @@ nmea_vtg_cb(void)
        if (!gps_valid)
                return;
        strncpy(course, nmea_params[1].str, sizeof(course));
-       strncpy(speed, nmea_params[6].str, sizeof(speed));
+       strncpy(speed, nmea_params[7].str, sizeof(speed));
        DEBUG(4, "course: %s\n", course);
        DEBUG(4, "speed: %s\n", speed);
 }