summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-06-12 12:37:16 -0400
committerScott Murray <scott.murray@konsulko.com>2022-06-12 12:37:16 -0400
commit81ad8d4aca06b27d9c57730a7dead6e8e5ae1fd1 (patch)
treead1df1403f3b43bc945e338655675dc092a0ef4f
parent61e3d69532099d7215410c5b38e29ba3525dec46 (diff)
Update VIS vehicle signal support
Rework to change the VIS signals being used for next/previous/mode to new AGL custom steering wheel switch signals instead of trying to use the Vehicle.Cabin.Infotainment.Media.Action actuator signal. In practice mapping multiple CAN signals from the LIN polling to a single VIS signal does not work well with the behavior of the CAN feeder from KUKSA.val. With the separate steering wheel switch signals and duplicate filtering in libqtappfw, things look more like they did with signal-composer and should hopefully be robust. This should be revisited if a custom LIN signal feeder becomes an option, as overall it would be better to leverage the standard VSS schema signals if possible. Bug-AGL: SPEC-4409 Change-Id: I73512ba9c5746e820fc30a316a39db371d98f5e3 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
-rw-r--r--app/MediaPlayer.qml24
1 files changed, 12 insertions, 12 deletions
diff --git a/app/MediaPlayer.qml b/app/MediaPlayer.qml
index 95bc22b..03c85c4 100644
--- a/app/MediaPlayer.qml
+++ b/app/MediaPlayer.qml
@@ -96,21 +96,21 @@ ApplicationWindow {
}
onAuthorized: {
- VehicleSignals.subscribe("Vehicle.Cabin.Infotainment.Media.Action")
+ VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.Next")
+ VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.Previous")
+ VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.Mode")
}
onSignalNotification: {
- if (path === "Vehicle.Cabin.Infotainment.Media.Action") {
- if (value == "SkipForward") {
- mediaplayer.next()
- } else if (value == "SkipBackward") {
- mediaplayer.previous()
- } else if (value == "NextSource") {
- if (player.av_connected)
- mediaplayer.connect()
- else
- mediaplayer.disconnect()
- }
+ if (path === "Vehicle.Cabin.SteeringWheel.Switches.Next" && value === "true") {
+ mediaplayer.next()
+ } else if (path === "Vehicle.Cabin.SteeringWheel.Switches.Previous" && value === "true") {
+ mediaplayer.previous()
+ } else if (path === "Vehicle.Cabin.SteeringWheel.Switches.Mode" && value === "true") {
+ if (player.av_connected)
+ mediaplayer.connect()
+ else
+ mediaplayer.disconnect()
}
}
}