From: John Crispin Date: Tue, 11 Aug 2015 14:51:32 +0000 (+0200) Subject: typo fix X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fugps.git;a=commitdiff_plain;h=fc6274aeb808f6717449f66df8bb8b07f53d4678;ds=sidebyside typo fix Signed-off-by: Maurice-Jörg Nießen --- diff --git a/main.c b/main.c index 841a2b6..29b341b 100644 --- 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 2478f9f..ec0a350 100644 --- 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 fea9879..641f49e 100644 --- a/nmea.h +++ b/nmea.h @@ -23,7 +23,7 @@ #include -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);