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 841a2b6..29b341b 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_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);
                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 2478f9f..ec0a350 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;
 } 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
 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);
 
                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));
                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();
        }
 }
                gps_timestamp();
        }
 }
diff --git a/nmea.h b/nmea.h
index fea9879..641f49e 100644 (file)
--- a/nmea.h
+++ b/nmea.h
@@ -23,7 +23,7 @@
 
 #include <libubox/ustream.h>
 
 
 #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);
 
 extern int nmea_open(char *dev, struct ustream_fd *s, speed_t speed);
 extern void gps_timestamp(void);