aboutsummaryrefslogtreecommitdiffstats
path: root/binding/afm-gps-binding.c
diff options
context:
space:
mode:
Diffstat (limited to 'binding/afm-gps-binding.c')
-rw-r--r--binding/afm-gps-binding.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/binding/afm-gps-binding.c b/binding/afm-gps-binding.c
index 91b82cd..90d9155 100644
--- a/binding/afm-gps-binding.c
+++ b/binding/afm-gps-binding.c
@@ -101,6 +101,11 @@ static json_object *populate_json_data(json_object *jresp)
json_object_object_add(jresp, "speed", value);
}
+ if (data.set & TRACK_SET) {
+ value = json_object_new_double(data.fix.track);
+ json_object_object_add(jresp, "track", value);
+ }
+
if (data.set & TIME_SET) {
char time[30];
unix_to_iso8601(data.fix.time, (char *) &time, sizeof(time));