ugps: add quality measurement parameters
[project/ugps.git] / main.c
diff --git a/main.c b/main.c
index 76a5aab4d0bc83b501dd4d1044f24605b8e617d8..acd6a42a5c778b5be944bcaa786c8254ede0bb5b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -66,6 +66,10 @@ gps_info(struct ubus_context *ctx, struct ubus_object *obj,
                        blobmsg_add_string(&b, "course", course);
                if (gps_fields & GPS_FIELD_SPD)
                        blobmsg_add_string(&b, "speed", speed);
+               if (gps_fields & GPS_FIELD_SAT)
+                       blobmsg_add_string(&b, "satellites", satellites);
+               if (gps_fields & GPS_FIELD_HDP)
+                       blobmsg_add_string(&b, "HDOP", hdop);
        }
        ubus_send_reply(ctx, req, b.head);
 
@@ -147,7 +151,7 @@ main(int argc, char ** argv)
                unsetenv("DBGLVL");
        }
 
-       while ((ch = getopt(argc, argv, "ad:s:S:b:")) != -1) {
+       while ((ch = getopt(argc, argv, "ad:s:Sb:")) != -1) {
                switch (ch) {
                case 'a':
                        adjust_clock = -1;