typo fix
authorJohn Crispin <blogic@openwrt.org>
Tue, 11 Aug 2015 14:51:32 +0000 (16:51 +0200)
committerJohn Crispin <blogic@openwrt.org>
Tue, 11 Aug 2015 14:51:32 +0000 (16:51 +0200)
Signed-off-by: Maurice-Jörg Nießen <post@mjniessen.com>
main.c
nmea.c
nmea.h

diff --git a/main.c b/main.c
index 841a2b6034cea082eb6ecea0672f246925389304..29b341b2dcc696102a9cf2d3f765a7d38cdfee83 100644 (file)
--- a/main.c
+++ b/main.c
@@ -53,7 +53,7 @@ gps_info(struct ubus_context *ctx, struct ubus_object *obj,
                blobmsg_add_u8(&b, "signal", 0);
        } else {
                blobmsg_add_u32(&b, "age", now.tv_sec - stamp.tv_sec);
-               blobmsg_add_string(&b, "lattitude", lattitude);
+               blobmsg_add_string(&b, "latitude", latitude);
                blobmsg_add_string(&b, "longitude", longitude);
                blobmsg_add_string(&b, "elivation", elivation);
                blobmsg_add_string(&b, "course", course);
diff --git a/nmea.c b/nmea.c
index 2478f9fe9853ee8ff7ea6c4bcc64a654cca7d088..ec0a350d33a7a1a8fbe950c774b87b41d4b12605 100644 (file)
--- a/nmea.c
+++ b/nmea.c
@@ -49,7 +49,7 @@ struct nmea_param {
 } nmea_params[MAX_NMEA_PARAM];
 
 static int nmea_bad_time;
-char longitude[32] = { 0 }, lattitude[32] = { 0 }, course[16] = { 0 }, speed[16] = { 0 }, elivation[16] = { 0 };
+char longitude[32] = { 0 }, latitude[32] = { 0 }, course[16] = { 0 }, speed[16] = { 0 }, elivation[16] = { 0 };
 int gps_valid = 0;
 
 static void
@@ -144,9 +144,9 @@ nmea_rmc_cb(void)
                LOG("position: %d°%d'%.1f\" %d°%d'%.1f\"\n",
                        latd, latm, flats, lngd, lngm, flngs);
 
-               snprintf(lattitude, sizeof(lattitude), "%d.%d", latd, ms_to_deg(latm, lats));
+               snprintf(latitude, sizeof(latitude), "%d.%d", latd, ms_to_deg(latm, lats));
                snprintf(longitude, sizeof(longitude), "%d.%d", lngd, ms_to_deg(lngm, lngs));
-               LOG("position: %s %s\n", lattitude, longitude);
+               LOG("position: %s %s\n", latitude, longitude);
                gps_timestamp();
        }
 }
diff --git a/nmea.h b/nmea.h
index fea9879eb48e001255f4a49761bcedc7b7802b65..641f49ec9ec9ce219cbca8481e1e5526858cdcc9 100644 (file)
--- a/nmea.h
+++ b/nmea.h
@@ -23,7 +23,7 @@
 
 #include <libubox/ustream.h>
 
-extern char longitude[32], lattitude[32], course[16], speed[16], elivation[16];
+extern char longitude[32], latitude[32], course[16], speed[16], elivation[16];
 extern int nmea_open(char *dev, struct ustream_fd *s, speed_t speed);
 extern void gps_timestamp(void);