diff options
author | Scott Murray <scott.murray@konsulko.com> | 2024-05-16 18:24:25 -0400 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2024-05-29 10:27:17 +0000 |
commit | 25ec251da61ff53495d609b3400db0a1d7f957d7 (patch) | |
tree | e2e62e8a3f9a6b63f31d101387483a536111988c /recipes-connectivity/vss | |
parent | 2f6a12454e558f79f24d4f76bf9c6a16590a5bca (diff) |
Add gateway demo
Changes:
- Add recipe for AGL VSS to MQTT proxy daemon
- Update agl-vcar.dbc CAN database definition to add signals useful
for demoing the proxy (per V2C EG discussion).
- Add a patch to kuksa-dbc-feeder to allow sensor signal updates to
generate CAN messages in output mode.
- Add VSS vspec variants to define the desired CAN input and output
support for the various kuksa-dbc-feeder instances in the default
and full gateway demos.
- Add configurations for kuksa-dbc-feeder for the running the default
gateway demo with CAN output from a demo control panel instance on
a single CAN interface, as well as a fuller setup with a second
kuksa-dbc-feeder running against a second CAN interface on the
gateway to handle the demo steering wheel and HVAC support.
- Add gateway demo specific configuration files for various KUKSA.val
databroker clients to override the databroker location.
- Add agl-gateway-demo and agl-gateway-demo-preconfigured images for
the default and full demos.
- Add *-preconfigured-gateway image flavors for the Flutter IVI, IC,
and KVM demo images that support running with the databroker on
the gateway.
NOTES:
- The *-preconfigured-gateway images assume the gateway has an IP
address of 192.168.10.4.
- Required changes to the agl-demo-control-panel application and the
addition of a agl-ivi-demo-control-panel-preconfigured-gateway
image will come in a subsequent change.
Bug-AGL: SPEC-5107, SPEC-5138
Change-Id: I9797aa72737af7af3d791a5151198f80b6d90e0d
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/29906
Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'recipes-connectivity/vss')
5 files changed, 1454 insertions, 30 deletions
diff --git a/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec b/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec index 6c0a08ae2..b8a01e362 100644 --- a/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec +++ b/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec @@ -1,23 +1,184 @@ -# Define DBC mappings for vehicle and engine speeds +# DBC mappings for vehicle and engine speeds Vehicle.Speed: datatype: float type: sensor - dbc: + dbc2vss: signal: PT_VehicleAvgSpeed interval_ms: 100 + vss2dbc: + signal: PT_VehicleAvgSpeed Vehicle.Powertrain.CombustionEngine.Speed: datatype: float type: sensor - dbc: + dbc2vss: signal: PT_EngineSpeed interval_ms: 100 transform: math: "floor(x+0.5)" + vss2dbc: + signal: PT_EngineSpeed + +# DBC mappings for other signals for V2C demo + +Vehicle.Body.Lights.Hazard.IsSignaling: + datatype: boolean + type: actuator + dbc2vss: + signal: PT_HazardOn + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Body.Lights.DirectionIndicator.Left.IsSignaling: + datatype: boolean + type: actuator + dbc2vss: + signal: PT_LeftTurnOn + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Body.Lights.DirectionIndicator.Right.IsSignaling: + datatype: boolean + type: actuator + dbc2vss: + signal: PT_RightTurnOn + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.OBD.ThrottlePosition: + datatype: float + type: sensor + dbc2vss: + signal: ThrottlePosition + interval_ms: 100 + vss2dbc: + signal: ThrottlePosition + +Vehicle.Chassis.SteeringWheel.Angle: + datatype: int16 + type: sensor + dbc2vss: + signal: SteeringPosition + interval_ms: 100 + vss2dbc: + signal: SteeringPosition + +Vehicle.Chassis.Brake.PedalPosition: + datatype: uint8 + type: sensor + dbc2vss: + signal: BrakePressure + interval_ms: 100 + transform: + math: "floor(x / 19125 * 100 + 0.5)" + vss2dbc: + signal: BrakePressure + transform: + math: "x * 191.25" + +Vehicle.Powertrain.Transmission.SelectedGear: + datatype: int8 + type: sensor + dbc2vss: + signal: Gear + interval_ms: 100 + vss2dbc: + signal: Gear + +Vehicle.Acceleration.Lateral: + datatype: float + type: sensor + dbc2vss: + signal: AccelerationX + interval_ms: 100 + vss2dbc: + signal: AccelerationX + +Vehicle.Acceleration.Longitudinal: + datatype: float + type: sensor + dbc2vss: + signal: AccelerationY + interval_ms: 100 + vss2dbc: + signal: AccelerationY + +Vehicle.Acceleration.Vertical: + datatype: float + type: sensor + dbc2vss: + signal: AccelerationZ + interval_ms: 100 + vss2dbc: + signal: AccelerationZ + +Vehicle.AngularVelocity.Pitch: + datatype: float + type: sensor + dbc2vss: + signal: GyroscopeX + interval_ms: 100 + vss2dbc: + signal: GyroscopeX + +Vehicle.AngularVelocity.Roll: + datatype: float + type: sensor + dbc2vss: + signal: GyroscopeY + interval_ms: 100 + vss2dbc: + signal: GyroscopeY + +Vehicle.AngularVelocity.Yaw: + datatype: float + type: sensor + dbc2vss: + signal: GyroscopeZ + interval_ms: 100 + vss2dbc: + signal: GyroscopeZ + +Vehicle.CurrentLocation.Latitude: + datatype: double + type: sensor + dbc2vss: + signal: Latitude + interval_ms: 100 + vss2dbc: + signal: Latitude + +Vehicle.CurrentLocation.Longitude: + datatype: double + type: sensor + dbc2vss: + signal: Longitude + interval_ms: 100 + vss2dbc: + signal: Longitude + +# +# AGL VSS additions +# -# Define extra navigation state signals +# Extra navigation state signals Vehicle.Cabin.Infotainment.Navigation.State: datatype: string @@ -32,7 +193,7 @@ Vehicle.Cabin.Infotainment.Navigation.ElapsedDistance: description: Navigation elapsed distance. -# Define audio control signals +# Extra audio control signals Vehicle.Cabin.Infotainment.Media.Audio: type: branch @@ -71,7 +232,7 @@ Vehicle.Cabin.Infotainment.Media.Audio.Treble: description: Audio high-frequency filter control. -# Define extra steering wheel switch signals, including DBC mappings +# Extra steering wheel switch signals, including DBC mappings Vehicle.Cabin.SteeringWheel: type: branch @@ -85,7 +246,7 @@ Vehicle.Cabin.SteeringWheel.Switches.VolumeUp: datatype: boolean type: sensor description: Steering wheel volume up switch engaged. - dbc: + dbc2vss: signal: SW_VolumeUp on_change: true transform: @@ -99,7 +260,7 @@ Vehicle.Cabin.SteeringWheel.Switches.VolumeDown: datatype: boolean type: sensor description: Steering wheel volume down switch engaged. - dbc: + dbc2vss: signal: SW_VolumeDown on_change: true transform: @@ -113,7 +274,7 @@ Vehicle.Cabin.SteeringWheel.Switches.VolumeMute: datatype: boolean type: sensor description: Steering wheel volume mute switch engaged. - dbc: + dbc2vss: signal: SW_VolumeMute on_change: true transform: @@ -127,7 +288,7 @@ Vehicle.Cabin.SteeringWheel.Switches.Next: datatype: boolean type: sensor description: Steering wheel next switch engaged. - dbc: + dbc2vss: signal: SW_Next on_change: true transform: @@ -141,7 +302,7 @@ Vehicle.Cabin.SteeringWheel.Switches.Previous: datatype: boolean type: sensor description: Steering wheel previous switch engaged. - dbc: + dbc2vss: signal: SW_Previous on_change: true transform: @@ -155,7 +316,7 @@ Vehicle.Cabin.SteeringWheel.Switches.Mode: datatype: boolean type: sensor description: Steering wheel mode switch engaged. - dbc: + dbc2vss: signal: SW_Mode on_change: true transform: @@ -169,7 +330,7 @@ Vehicle.Cabin.SteeringWheel.Switches.Info: datatype: boolean type: sensor description: Steering wheel info switch engaged. - dbc: + dbc2vss: signal: SW_Info on_change: true transform: @@ -183,7 +344,7 @@ Vehicle.Cabin.SteeringWheel.Switches.CruiseEnable: datatype: boolean type: sensor description: Steering wheel cruise enable switch engaged. - dbc: + dbc2vss: signal: SW_CruiseEnable on_change: true transform: @@ -197,7 +358,7 @@ Vehicle.Cabin.SteeringWheel.Switches.CruiseSet: datatype: boolean type: sensor description: Steering wheel cruise set switch engaged. - dbc: + dbc2vss: signal: SW_CruiseSet on_change: true transform: @@ -211,7 +372,7 @@ Vehicle.Cabin.SteeringWheel.Switches.CruiseResume: datatype: boolean type: sensor description: Steering wheel cruise resume switch engaged. - dbc: + dbc2vss: signal: SW_CruiseResume on_change: true transform: @@ -225,7 +386,7 @@ Vehicle.Cabin.SteeringWheel.Switches.CruiseCancel: datatype: boolean type: sensor description: Steering wheel cruise cancel switch engaged. - dbc: + dbc2vss: signal: SW_CruiseCancel on_change: true transform: @@ -239,7 +400,7 @@ Vehicle.Cabin.SteeringWheel.Switches.CruiseLimit: datatype: boolean type: sensor description: Steering wheel cruise limit switch engaged. - dbc: + dbc2vss: signal: SW_CruiseLimit on_change: true transform: @@ -253,7 +414,7 @@ Vehicle.Cabin.SteeringWheel.Switches.CruiseDistance: datatype: boolean type: sensor description: Steering wheel cruise distance switch engaged. - dbc: + dbc2vss: signal: SW_CruiseDistance on_change: true transform: @@ -267,7 +428,7 @@ Vehicle.Cabin.SteeringWheel.Switches.Voice: datatype: boolean type: sensor description: Steering wheel voice switch engaged. - dbc: + dbc2vss: signal: SW_Voice on_change: true transform: @@ -281,7 +442,7 @@ Vehicle.Cabin.SteeringWheel.Switches.PhoneCall: datatype: boolean type: sensor description: Steering wheel phone call switch engaged. - dbc: + dbc2vss: signal: SW_PhoneCall on_change: true transform: @@ -295,7 +456,7 @@ Vehicle.Cabin.SteeringWheel.Switches.PhoneHangup: datatype: boolean type: sensor description: Steering wheel phone hangup switch engaged. - dbc: + dbc2vss: signal: SW_PhoneHangup on_change: true transform: @@ -309,7 +470,7 @@ Vehicle.Cabin.SteeringWheel.Switches.Horn: datatype: boolean type: sensor description: Steering wheel horn switch engaged. - dbc: + dbc2vss: signal: SW_Horn on_change: true transform: @@ -323,7 +484,7 @@ Vehicle.Cabin.SteeringWheel.Switches.LaneDepartureWarning: datatype: boolean type: sensor description: Steering wheel lane departure warning switch engaged. - dbc: + dbc2vss: signal: SW_LaneDepartureWarning on_change: true transform: diff --git a/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec.control-panel b/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec.control-panel new file mode 100644 index 000000000..b5e2b8a3d --- /dev/null +++ b/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec.control-panel @@ -0,0 +1,446 @@ +# DBC mappings for vehicle and engine speeds + +Vehicle.Speed: + datatype: float + type: sensor + vss2dbc: + signal: PT_VehicleAvgSpeed + +Vehicle.Powertrain.CombustionEngine.Speed: + datatype: float + type: sensor + vss2dbc: + signal: PT_EngineSpeed + +# DBC mappings for other signals for V2C demo + +Vehicle.Body.Lights.Hazard.IsSignaling: + datatype: boolean + type: actuator + vss2dbc: + signal: PT_HazardOn + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Body.Lights.DirectionIndicator.Left.IsSignaling: + datatype: boolean + type: actuator + vss2dbc: + signal: PT_LeftTurnOn + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Body.Lights.DirectionIndicator.Right.IsSignaling: + datatype: boolean + type: actuator + vss2dbc: + signal: PT_RightTurnOn + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.OBD.ThrottlePosition: + datatype: float + type: sensor + vss2dbc: + signal: ThrottlePosition + +Vehicle.Chassis.SteeringWheel.Angle: + datatype: int16 + type: sensor + vss2dbc: + signal: SteeringPosition + +Vehicle.Chassis.Brake.PedalPosition: + datatype: uint8 + type: sensor + vss2dbc: + signal: BrakePressure + transform: + math: "x * 191.25" + +Vehicle.Powertrain.Transmission.SelectedGear: + datatype: int8 + type: sensor + vss2dbc: + signal: Gear + +Vehicle.Acceleration.Lateral: + datatype: float + type: sensor + vss2dbc: + signal: AccelerationX + +Vehicle.Acceleration.Longitudinal: + datatype: float + type: sensor + vss2dbc: + signal: AccelerationY + +Vehicle.Acceleration.Vertical: + datatype: float + type: sensor + vss2dbc: + signal: AccelerationZ + +Vehicle.AngularVelocity.Pitch: + datatype: float + type: sensor + vss2dbc: + signal: GyroscopeX + +Vehicle.AngularVelocity.Roll: + datatype: float + type: sensor + vss2dbc: + signal: GyroscopeY + +Vehicle.AngularVelocity.Yaw: + datatype: float + type: sensor + vss2dbc: + signal: GyroscopeZ + +Vehicle.CurrentLocation.Latitude: + datatype: double + type: sensor + vss2dbc: + signal: Latitude + +Vehicle.CurrentLocation.Longitude: + datatype: double + type: sensor + vss2dbc: + signal: Longitude + + +# +# AGL VSS additions +# + +# Extra navigation state signals + +Vehicle.Cabin.Infotainment.Navigation.State: + datatype: string + type: sensor + allowed: [ 'UNKNOWN', 'ACTIVE', 'ARRIVED', 'STOPPED' ] + description: Navigation state. + +Vehicle.Cabin.Infotainment.Navigation.ElapsedDistance: + datatype: float + type: sensor + unit: km + description: Navigation elapsed distance. + + +# Extra audio control signals + +Vehicle.Cabin.Infotainment.Media.Audio: + type: branch + description: Media audio controls. + +Vehicle.Cabin.Infotainment.Media.Audio.Balance: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio left/right balance. + +Vehicle.Cabin.Infotainment.Media.Audio.Fade: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio front/rear balance. + +Vehicle.Cabin.Infotainment.Media.Audio.Bass: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio low-frequency filter control. + +Vehicle.Cabin.Infotainment.Media.Audio.Treble: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio high-frequency filter control. + + +# Extra steering wheel switch signals, including DBC mappings + +Vehicle.Cabin.SteeringWheel: + type: branch + description: AGL steering wheel demo data. + +Vehicle.Cabin.SteeringWheel.Switches: + type: branch + description: AGL steering wheel demo switch data. + +Vehicle.Cabin.SteeringWheel.Switches.VolumeUp: + datatype: boolean + type: sensor + description: Steering wheel volume up switch engaged. + dbc2vss: + signal: SW_VolumeUp + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.VolumeDown: + datatype: boolean + type: sensor + description: Steering wheel volume down switch engaged. + dbc2vss: + signal: SW_VolumeDown + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.VolumeMute: + datatype: boolean + type: sensor + description: Steering wheel volume mute switch engaged. + dbc2vss: + signal: SW_VolumeMute + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Next: + datatype: boolean + type: sensor + description: Steering wheel next switch engaged. + dbc2vss: + signal: SW_Next + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Previous: + datatype: boolean + type: sensor + description: Steering wheel previous switch engaged. + dbc2vss: + signal: SW_Previous + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Mode: + datatype: boolean + type: sensor + description: Steering wheel mode switch engaged. + dbc2vss: + signal: SW_Mode + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Info: + datatype: boolean + type: sensor + description: Steering wheel info switch engaged. + dbc2vss: + signal: SW_Info + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseEnable: + datatype: boolean + type: sensor + description: Steering wheel cruise enable switch engaged. + dbc2vss: + signal: SW_CruiseEnable + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseSet: + datatype: boolean + type: sensor + description: Steering wheel cruise set switch engaged. + dbc2vss: + signal: SW_CruiseSet + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseResume: + datatype: boolean + type: sensor + description: Steering wheel cruise resume switch engaged. + dbc2vss: + signal: SW_CruiseResume + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseCancel: + datatype: boolean + type: sensor + description: Steering wheel cruise cancel switch engaged. + dbc2vss: + signal: SW_CruiseCancel + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseLimit: + datatype: boolean + type: sensor + description: Steering wheel cruise limit switch engaged. + dbc2vss: + signal: SW_CruiseLimit + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseDistance: + datatype: boolean + type: sensor + description: Steering wheel cruise distance switch engaged. + dbc2vss: + signal: SW_CruiseDistance + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Voice: + datatype: boolean + type: sensor + description: Steering wheel voice switch engaged. + dbc2vss: + signal: SW_Voice + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.PhoneCall: + datatype: boolean + type: sensor + description: Steering wheel phone call switch engaged. + dbc2vss: + signal: SW_PhoneCall + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.PhoneHangup: + datatype: boolean + type: sensor + description: Steering wheel phone hangup switch engaged. + dbc2vss: + signal: SW_PhoneHangup + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Horn: + datatype: boolean + type: sensor + description: Steering wheel horn switch engaged. + dbc2vss: + signal: SW_Horn + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.LaneDepartureWarning: + datatype: boolean + type: sensor + description: Steering wheel lane departure warning switch engaged. + dbc2vss: + signal: SW_LaneDepartureWarning + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true diff --git a/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec.gw-control-panel b/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec.gw-control-panel new file mode 100644 index 000000000..6b0a9a38a --- /dev/null +++ b/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec.gw-control-panel @@ -0,0 +1,447 @@ +# DBC mappings for vehicle and engine speeds + +Vehicle.Speed: + datatype: float + type: sensor + dbc2vss: + signal: PT_VehicleAvgSpeed + interval_ms: 100 + +Vehicle.Powertrain.CombustionEngine.Speed: + datatype: float + type: sensor + dbc2vss: + signal: PT_EngineSpeed + interval_ms: 100 + transform: + math: "floor(x+0.5)" + +# DBC mappings for other signals for V2C demo + +Vehicle.Body.Lights.Hazard.IsSignaling: + datatype: boolean + type: actuator + dbc2vss: + signal: PT_HazardOn + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Body.Lights.DirectionIndicator.Left.IsSignaling: + datatype: boolean + type: actuator + dbc2vss: + signal: PT_LeftTurnOn + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Body.Lights.DirectionIndicator.Right.IsSignaling: + datatype: boolean + type: actuator + dbc2vss: + signal: PT_RightTurnOn + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.OBD.ThrottlePosition: + datatype: float + type: sensor + dbc2vss: + signal: ThrottlePosition + interval_ms: 100 + +Vehicle.Chassis.SteeringWheel.Angle: + datatype: int16 + type: sensor + dbc2vss: + signal: SteeringPosition + interval_ms: 100 + +Vehicle.Chassis.Brake.PedalPosition: + datatype: uint8 + type: sensor + dbc2vss: + signal: BrakePressure + interval_ms: 100 + transform: + math: "floor(x / 19125 * 100 + 0.5)" + +Vehicle.Powertrain.Transmission.SelectedGear: + datatype: int8 + type: sensor + dbc2vss: + signal: Gear + interval_ms: 100 + +Vehicle.Acceleration.Lateral: + datatype: float + type: sensor + dbc2vss: + signal: AccelerationX + interval_ms: 100 + +Vehicle.Acceleration.Longitudinal: + datatype: float + type: sensor + dbc2vss: + signal: AccelerationY + interval_ms: 100 + +Vehicle.Acceleration.Vertical: + datatype: float + type: sensor + dbc2vss: + signal: AccelerationZ + interval_ms: 100 + +Vehicle.AngularVelocity.Pitch: + datatype: float + type: sensor + dbc2vss: + signal: GyroscopeX + interval_ms: 100 + +Vehicle.AngularVelocity.Roll: + datatype: float + type: sensor + dbc2vss: + signal: GyroscopeY + interval_ms: 100 + +Vehicle.AngularVelocity.Yaw: + datatype: float + type: sensor + dbc2vss: + signal: GyroscopeZ + interval_ms: 100 + +Vehicle.CurrentLocation.Latitude: + datatype: double + type: sensor + dbc2vss: + signal: Latitude + interval_ms: 100 + +Vehicle.CurrentLocation.Longitude: + datatype: double + type: sensor + dbc2vss: + signal: Longitude + interval_ms: 100 + + +# +# AGL VSS additions +# + +# Extra navigation state signals + +Vehicle.Cabin.Infotainment.Navigation.State: + datatype: string + type: sensor + allowed: [ 'UNKNOWN', 'ACTIVE', 'ARRIVED', 'STOPPED' ] + description: Navigation state. + +Vehicle.Cabin.Infotainment.Navigation.ElapsedDistance: + datatype: float + type: sensor + unit: km + description: Navigation elapsed distance. + + +# Extra audio control signals + +Vehicle.Cabin.Infotainment.Media.Audio: + type: branch + description: Media audio controls. + +Vehicle.Cabin.Infotainment.Media.Audio.Balance: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio left/right balance. + +Vehicle.Cabin.Infotainment.Media.Audio.Fade: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio front/rear balance. + +Vehicle.Cabin.Infotainment.Media.Audio.Bass: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio low-frequency filter control. + +Vehicle.Cabin.Infotainment.Media.Audio.Treble: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio high-frequency filter control. + + +# Extra steering wheel switch signals, including DBC mappings + +Vehicle.Cabin.SteeringWheel: + type: branch + description: AGL steering wheel demo data. + +Vehicle.Cabin.SteeringWheel.Switches: + type: branch + description: AGL steering wheel demo switch data. + +Vehicle.Cabin.SteeringWheel.Switches.VolumeUp: + datatype: boolean + type: sensor + description: Steering wheel volume up switch engaged. + vss2dbc: + signal: SW_VolumeUp + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.VolumeDown: + datatype: boolean + type: sensor + description: Steering wheel volume down switch engaged. + vss2dbc: + signal: SW_VolumeDown + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.VolumeMute: + datatype: boolean + type: sensor + description: Steering wheel volume mute switch engaged. + vss2dbc: + signal: SW_VolumeMute + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.Next: + datatype: boolean + type: sensor + description: Steering wheel next switch engaged. + vss2dbc: + signal: SW_Next + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.Previous: + datatype: boolean + type: sensor + description: Steering wheel previous switch engaged. + vss2dbc: + signal: SW_Previous + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.Mode: + datatype: boolean + type: sensor + description: Steering wheel mode switch engaged. + vss2dbc: + signal: SW_Mode + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.Info: + datatype: boolean + type: sensor + description: Steering wheel info switch engaged. + vss2dbc: + signal: SW_Info + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.CruiseEnable: + datatype: boolean + type: sensor + description: Steering wheel cruise enable switch engaged. + vss2dbc: + signal: SW_CruiseEnable + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.CruiseSet: + datatype: boolean + type: sensor + description: Steering wheel cruise set switch engaged. + vss2dbc: + signal: SW_CruiseSet + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.CruiseResume: + datatype: boolean + type: sensor + description: Steering wheel cruise resume switch engaged. + vss2dbc: + signal: SW_CruiseResume + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.CruiseCancel: + datatype: boolean + type: sensor + description: Steering wheel cruise cancel switch engaged. + vss2dbc: + signal: SW_CruiseCancel + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.CruiseLimit: + datatype: boolean + type: sensor + description: Steering wheel cruise limit switch engaged. + vss2dbc: + signal: SW_CruiseLimit + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.CruiseDistance: + datatype: boolean + type: sensor + description: Steering wheel cruise distance switch engaged. + vss2dbc: + signal: SW_CruiseDistance + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.Voice: + datatype: boolean + type: sensor + description: Steering wheel voice switch engaged. + vss2dbc: + signal: SW_Voice + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.PhoneCall: + datatype: boolean + type: sensor + description: Steering wheel phone call switch engaged. + vss2dbc: + signal: SW_PhoneCall + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.PhoneHangup: + datatype: boolean + type: sensor + description: Steering wheel phone hangup switch engaged. + vss2dbc: + signal: SW_PhoneHangup + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.Horn: + datatype: boolean + type: sensor + description: Steering wheel horn switch engaged. + vss2dbc: + signal: SW_Horn + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 + +Vehicle.Cabin.SteeringWheel.Switches.LaneDepartureWarning: + datatype: boolean + type: sensor + description: Steering wheel lane departure warning switch engaged. + vss2dbc: + signal: SW_LaneDepartureWarning + transform: + mapping: + - from: false + to: 0 + - from: true + to: 1 diff --git a/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec.gw-hardware b/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec.gw-hardware new file mode 100644 index 000000000..869b33d3d --- /dev/null +++ b/recipes-connectivity/vss/vss-agl/agl_vss_overlay.vspec.gw-hardware @@ -0,0 +1,341 @@ +# DBC mappings for other signals for V2C demo + +# DBC mappings for demo HVAC + +Vehicle.Cabin.HVAC.Station.Row1.Driver.Temperature: + datatype: int8 + type: actuator + vss2dbc: + signal: PT_TempLeft + +Vehicle.Cabin.HVAC.Station.Row1.Passenger.Temperature: + datatype: int8 + type: actuator + vss2dbc: + signal: PT_TempRight + +Vehicle.Cabin.HVAC.Station.Row1.Driver.FanSpeed: + datatype: uint8 + type: actuator + vss2dbc: + signal: PT_FanSpeed + +# +# AGL VSS additions +# + +# Extra navigation state signals + +Vehicle.Cabin.Infotainment.Navigation.State: + datatype: string + type: sensor + allowed: [ 'UNKNOWN', 'ACTIVE', 'ARRIVED', 'STOPPED' ] + description: Navigation state. + +Vehicle.Cabin.Infotainment.Navigation.ElapsedDistance: + datatype: float + type: sensor + unit: km + description: Navigation elapsed distance. + + +# Extra audio control signals + +Vehicle.Cabin.Infotainment.Media.Audio: + type: branch + description: Media audio controls. + +Vehicle.Cabin.Infotainment.Media.Audio.Balance: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio left/right balance. + +Vehicle.Cabin.Infotainment.Media.Audio.Fade: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio front/rear balance. + +Vehicle.Cabin.Infotainment.Media.Audio.Bass: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio low-frequency filter control. + +Vehicle.Cabin.Infotainment.Media.Audio.Treble: + datatype: int8 + type: actuator + min: -100 + max: 100 + unit: percent + description: Audio high-frequency filter control. + + +# Extra steering wheel switch signals, including DBC mappings + +Vehicle.Cabin.SteeringWheel: + type: branch + description: AGL steering wheel demo data. + +Vehicle.Cabin.SteeringWheel.Switches: + type: branch + description: AGL steering wheel demo switch data. + +Vehicle.Cabin.SteeringWheel.Switches.VolumeUp: + datatype: boolean + type: sensor + description: Steering wheel volume up switch engaged. + dbc2vss: + signal: SW_VolumeUp + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.VolumeDown: + datatype: boolean + type: sensor + description: Steering wheel volume down switch engaged. + dbc2vss: + signal: SW_VolumeDown + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.VolumeMute: + datatype: boolean + type: sensor + description: Steering wheel volume mute switch engaged. + dbc2vss: + signal: SW_VolumeMute + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Next: + datatype: boolean + type: sensor + description: Steering wheel next switch engaged. + dbc2vss: + signal: SW_Next + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Previous: + datatype: boolean + type: sensor + description: Steering wheel previous switch engaged. + dbc2vss: + signal: SW_Previous + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Mode: + datatype: boolean + type: sensor + description: Steering wheel mode switch engaged. + dbc2vss: + signal: SW_Mode + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Info: + datatype: boolean + type: sensor + description: Steering wheel info switch engaged. + dbc2vss: + signal: SW_Info + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseEnable: + datatype: boolean + type: sensor + description: Steering wheel cruise enable switch engaged. + dbc2vss: + signal: SW_CruiseEnable + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseSet: + datatype: boolean + type: sensor + description: Steering wheel cruise set switch engaged. + dbc2vss: + signal: SW_CruiseSet + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseResume: + datatype: boolean + type: sensor + description: Steering wheel cruise resume switch engaged. + dbc2vss: + signal: SW_CruiseResume + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseCancel: + datatype: boolean + type: sensor + description: Steering wheel cruise cancel switch engaged. + dbc2vss: + signal: SW_CruiseCancel + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseLimit: + datatype: boolean + type: sensor + description: Steering wheel cruise limit switch engaged. + dbc2vss: + signal: SW_CruiseLimit + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.CruiseDistance: + datatype: boolean + type: sensor + description: Steering wheel cruise distance switch engaged. + dbc2vss: + signal: SW_CruiseDistance + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Voice: + datatype: boolean + type: sensor + description: Steering wheel voice switch engaged. + dbc2vss: + signal: SW_Voice + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.PhoneCall: + datatype: boolean + type: sensor + description: Steering wheel phone call switch engaged. + dbc2vss: + signal: SW_PhoneCall + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.PhoneHangup: + datatype: boolean + type: sensor + description: Steering wheel phone hangup switch engaged. + dbc2vss: + signal: SW_PhoneHangup + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.Horn: + datatype: boolean + type: sensor + description: Steering wheel horn switch engaged. + dbc2vss: + signal: SW_Horn + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true + +Vehicle.Cabin.SteeringWheel.Switches.LaneDepartureWarning: + datatype: boolean + type: sensor + description: Steering wheel lane departure warning switch engaged. + dbc2vss: + signal: SW_LaneDepartureWarning + on_change: true + transform: + mapping: + - from: 0 + to: false + - from: 1 + to: true diff --git a/recipes-connectivity/vss/vss-agl_4.0.bb b/recipes-connectivity/vss/vss-agl_4.0.bb index 83fb4b1a1..00d83a7a5 100644 --- a/recipes-connectivity/vss/vss-agl_4.0.bb +++ b/recipes-connectivity/vss/vss-agl_4.0.bb @@ -8,29 +8,58 @@ inherit allarch update-alternatives require vss.inc -SRC_URI += "file://agl_vss_overlay.vspec" - +SRC_URI += "file://agl_vss_overlay.vspec \ + file://agl_vss_overlay.vspec.control-panel \ + file://agl_vss_overlay.vspec.gw-control-panel \ + file://agl_vss_overlay.vspec.gw-hardware \ +" # Since we're not relying on the simple upstream repo Makefile, use # best practices and output into a separate directory. B = "${WORKDIR}/build" do_configure[noexec] = "1" -VSPEC2JSON_OPTS = "-e dbc -o ${WORKDIR}/agl_vss_overlay.vspec --no-uuid --json-pretty" +#VSPEC2JSON_OPTS = "-e dbc2vss,vss2dbc -o ${WORKDIR}/agl_vss_overlay.vspec --no-uuid --json-pretty" +VSPEC2JSON_OPTS = "-e dbc2vss,vss2dbc --no-uuid --json-pretty" do_compile() { - vspec2json.py -I ${S}/spec ${VSPEC2JSON_OPTS} -u ${S}/spec/units.yaml ${S}/spec/VehicleSignalSpecification.vspec vss_rel_${PV}-agl.json + vspec2json.py -I ${S}/spec ${VSPEC2JSON_OPTS} -o ${WORKDIR}/agl_vss_overlay.vspec -u ${S}/spec/units.yaml ${S}/spec/VehicleSignalSpecification.vspec vss_rel_${PV}-agl.json + vspec2json.py -I ${S}/spec ${VSPEC2JSON_OPTS} -o ${WORKDIR}/agl_vss_overlay.vspec.control-panel -u ${S}/spec/units.yaml ${S}/spec/VehicleSignalSpecification.vspec vss_rel_${PV}-agl-control-panel.json + vspec2json.py -I ${S}/spec ${VSPEC2JSON_OPTS} -o ${WORKDIR}/agl_vss_overlay.vspec.gw-control-panel -u ${S}/spec/units.yaml ${S}/spec/VehicleSignalSpecification.vspec vss_rel_${PV}-agl-gw-control-panel.json + vspec2json.py -I ${S}/spec ${VSPEC2JSON_OPTS} -o ${WORKDIR}/agl_vss_overlay.vspec.gw-hardware -u ${S}/spec/units.yaml ${S}/spec/VehicleSignalSpecification.vspec vss_rel_${PV}-agl-gw-hardware.json } do_install() { install -d ${D}${datadir}/vss install -m 0644 vss_rel_${PV}-agl.json ${D}${datadir}/vss/ + install -m 0644 vss_rel_${PV}-agl-control-panel.json ${D}${datadir}/vss/ + install -m 0644 vss_rel_${PV}-agl-gw-control-panel.json ${D}${datadir}/vss/ + install -m 0644 vss_rel_${PV}-agl-gw-hardware.json ${D}${datadir}/vss/ } +PACKAGE_BEFORE_PN += "${PN}-control-panel ${PN}-gw-control-panel ${PN}-gw-hardware" + ALTERNATIVE_LINK_NAME[vss.json] = "${datadir}/vss/vss.json" -ALTERNATIVE_PRIORITY = "20" ALTERNATIVE:${PN} = "vss.json" ALTERNATIVE_TARGET_${PN} = "${datadir}/vss/vss_rel_${PV}-agl.json" +ALTERNATIVE_PRIORITY_${PN} = "20" +FILES:${PN} += "${datadir}/vss/vss_rel_${PV}-agl.json" + +ALTERNATIVE:${PN}-control-panel = "vss.json" +ALTERNATIVE_TARGET_${PN}-control-panel = "${datadir}/vss/vss_rel_${PV}-agl-control-panel.json" +ALTERNATIVE_PRIORITY_${PN}-control-panel = "30" +FILES:${PN}-control-panel += "${datadir}/vss/vss_rel_${PV}-agl-control-panel.json" + +ALTERNATIVE:${PN}-gw-hardware = "vss.json" +ALTERNATIVE_TARGET_${PN}-gw-hardware = "${datadir}/vss/vss_rel_${PV}-agl-gw-hardware.json" +ALTERNATIVE_PRIORITY_${PN}-gw-hardware = "31" +FILES:${PN}-gw-hardware += "${datadir}/vss/vss_rel_${PV}-agl-gw-hardware.json" -FILES:${PN} += "${datadir}/vss/" +# Higher priority than gw-hardware, as we want it to be the default +# if both are installed (as is the case with the full gateway demo +# setup). +ALTERNATIVE:${PN}-gw-control-panel = "vss.json" +ALTERNATIVE_TARGET_${PN}-gw-control-panel = "${datadir}/vss/vss_rel_${PV}-agl-gw-control-panel.json" +ALTERNATIVE_PRIORITY_${PN}-gw-control-panel = "32" +FILES:${PN}-gw-control-panel += "${datadir}/vss/vss_rel_${PV}-agl-gw-control-panel.json" |