aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--binding/afm-gps-binding.c6
-rw-r--r--conf.d/wgt/config.xml.in2
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 @@
<feature name="urn:AGL:widget:required-permission">
<param name="urn:AGL:permission::public:hidden" value="required" />
+ <param name="urn:AGL:permission::system:run-by-default" value="required" />
<param name="urn:AGL:permission::public:no-htdocs" value="required" />
</feature>
<feature name="urn:AGL:widget:provided-api">
<param name="gps" value="ws" />
+ <param name="192.168.123.11:4001/gps" value="tcp" />
</feature>
<feature name="urn:AGL:widget:required-api">
<param name="carlaclient" value="ws" />