From 7cca8039aec47b1958dc329959fb3a9a0d4ed2ae 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 --- conf.d/project/etc/control-signal-composer.json | 2 +- conf.d/project/etc/sig-demoboard.json | 19 ++++++ conf.d/project/etc/sig-steering-wheel.json | 77 +++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 conf.d/project/etc/sig-steering-wheel.json (limited to 'conf.d') diff --git a/conf.d/project/etc/control-signal-composer.json b/conf.d/project/etc/control-signal-composer.json index 0ed9fac..58f8435 100644 --- a/conf.d/project/etc/control-signal-composer.json +++ b/conf.d/project/etc/control-signal-composer.json @@ -25,7 +25,7 @@ } ], "signals": { - "files": ["sig-doors", "sig-demoboard", "sig-geoloc" ] + "files": [ "sig-doors", "sig-demoboard", "sig-steering-wheel", "sig-geoloc" ] }, "sources": { "files": "sources-basic" diff --git a/conf.d/project/etc/sig-demoboard.json b/conf.d/project/etc/sig-demoboard.json index bdd5e4e..bf67144 100644 --- a/conf.d/project/etc/sig-demoboard.json +++ b/conf.d/project/etc/sig-demoboard.json @@ -39,6 +39,25 @@ "retention":30, "unit": "Nm", "frequency": 1 + }, + { + "uid": "event.vehicle.speed", + "event": "low-can/messages.vehicle.average.speed", + "unit": "km/h" + }, + { + "uid": "event.engine.speed", + "event": "low-can/messages.engine.speed", + "unit": "rpm" + }, + { + "uid": "event.fuel.level", + "event": "low-can/messages.fuel.level", + "unit": "liters" + }, + { + "uid": "event.fuel.level.low", + "event": "low-can/messages.fuel.level.low", } ] } diff --git a/conf.d/project/etc/sig-steering-wheel.json b/conf.d/project/etc/sig-steering-wheel.json new file mode 100644 index 0000000..6c03f73 --- /dev/null +++ b/conf.d/project/etc/sig-steering-wheel.json @@ -0,0 +1,77 @@ +{ + "$schema": "http://iot.bzh/download/public/schema/json/signal-composer-schema.json", + "signals": [ + { + "uid": "event.media.previous", + "event": "low-can/messages.steering_wheel.previous" + }, + { + "uid": "event.media.next", + "event": "low-can/messages.steering_wheel.next" + }, + { + "uid": "event.media.mode", + "event": "low-can/messages.steering_wheel.mode" + }, + { + "uid": "event.volume.up", + "event": "low-can/messages.steering_wheel.volume.up" + }, + { + "uid": "event.volume.down", + "event": "low-can/messages.steering_wheel.volume.down" + }, + { + "uid": "event.volume.mute", + "event": "low-can/messages.steering_wheel.volume.mute" + }, + { + "uid": "event.phone.call", + "event": "low-can/messages.steering_wheel.phone.call" + }, + { + "uid": "event.phone.hangup", + "event": "low-can/messages.steering_wheel.phone.hangup" + }, + { + "uid": "event.cruise.enable", + "event": "low-can/messages.steering_wheel.cruise.enable" + }, + { + "uid": "event.cruise.resume", + "event": "low-can/messages.steering_wheel.cruise.resume" + }, + { + "uid": "event.cruise.set", + "event": "low-can/messages.steering_wheel.cruise.set" + }, + { + "uid": "event.cruise.cancel", + "event": "low-can/messages.steering_wheel.cruise.cancel" + }, + { + "uid": "event.cruise.limit", + "event": "low-can/messages.steering_wheel.cruise.limit" + }, + { + "uid": "event.cruise.distance", + "event": "low-can/messages.steering_wheel.cruise.distance" + }, + { + "uid": "event.lane_departure_warning.enable", + "event": "low-can/messages.steering_wheel.lane_departure_warning" + }, + { + "uid": "event.info", + "event": "low-can/messages.steering_wheel.info" + }, + { + "uid": "event.voice", + "event": "low-can/messages.steering_wheel.voice" + }, + { + "uid": "event.horn", + "event": "low-can/messages.steering_wheel.horn" + } + ] +} -- cgit 1.2.3-korg