diff options
Diffstat (limited to 'binding/afm-gps-binding.c')
-rw-r--r-- | binding/afm-gps-binding.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/binding/afm-gps-binding.c b/binding/afm-gps-binding.c index c7b3d2f..da5f57f 100644 --- a/binding/afm-gps-binding.c +++ b/binding/afm-gps-binding.c @@ -238,7 +238,7 @@ static void subscribe(afb_req_t request) afb_req_success(request, NULL, NULL); return; } - + afb_req_fail(request, "failed", "Invalid event"); } @@ -399,7 +399,7 @@ void set_gps(afb_req_t request) */ static void onevent(afb_api_t api, const char *event, struct json_object *object) { - AFB_API_NOTICE(api, "on_event %s , object %s", event, json_object_get_string(object)); +// AFB_API_NOTICE(api, "on_event %s , object %s", event, json_object_get_string(object)); struct json_object *lati = NULL; struct json_object *longi = NULL; @@ -452,6 +452,8 @@ static void SubscribeCarlaclient(afb_api_t api) struct json_object* obj = json_object_new_object(); json_object_object_add(obj, "event", json_object_new_string("positionUpdated")); api_call(api, "carlaclient", "subscribe" ,obj); + api_call(api, "carlaclient", "unsubscribe" ,obj); + api_call(api, "carlaclient", "subscribe" ,obj); } /* * Test to see if in demo mode first, then enable if not enable gpsd |