From 272b5ed0e9984e152fd04412a88e1c664b38ce0c Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Tue, 9 Jul 2019 14:27:46 +0900 Subject: add retry --- binding/afm-gps-binding.c | 6 ++++-- conf.d/wgt/config.xml.in | 2 ++ 2 files changed, 6 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 diff --git a/conf.d/wgt/config.xml.in b/conf.d/wgt/config.xml.in index 3cc53de..b9d08c4 100644 --- a/conf.d/wgt/config.xml.in +++ b/conf.d/wgt/config.xml.in @@ -9,11 +9,13 @@ + + -- cgit 1.2.3-korg