From 717601ead4c45b05407ff394e1f82622495d269f Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Thu, 5 Dec 2019 19:38:14 -0500 Subject: Add steering wheel and non-diagnostic vehicle status signals Add definitions for the steering wheel button CAN signals to provide an abstraction for application usage. Also add signals based on the non-diagnostic vehicle speed, engine speed, and fuel CAN signals to allow abstracting usage of those by e.g. the dashboard application. In addition, SourceAPI::addSignal in source.cpp required a tweak to allow subscribing to signals without specifying an explicit action, i.e. getting the default on receive behavior as documented. Without this change, the signals will silently not be subscribed to, and no events are generated. Since there is no longer an explicit built-in plugin function that could be called in an action to yield the same behavior (it was removed in commit 3e45dda and not restored with the other built-in function by commit bf964e8), I believe this restores the intended default behavior. Bug-AGL: SPEC-3024 Signed-off-by: Scott Murray Change-Id: I86e8be66ff27484b34a52145b969661277332a50 --- signal-composer-binding/source.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'signal-composer-binding/source.cpp') diff --git a/signal-composer-binding/source.cpp b/signal-composer-binding/source.cpp index 4b21443..f265f40 100644 --- a/signal-composer-binding/source.cpp +++ b/signal-composer-binding/source.cpp @@ -147,7 +147,7 @@ void SourceAPI::addSignal(const std::string& id, const std::string& event, std:: { std::shared_ptr sig = std::make_shared(id, event, depends, unit, metadata, retention, frequency, onReceived, getSignalsArgs); - if(onReceived && ! event.empty()) + if(!event.empty()) afb_api_event_handler_add(afbBindingV3root, event.c_str(), SourceAPI::onSignalEvents, (void*)sig.get()); newSignalsM_[id] = sig; -- cgit 1.2.3-korg