From c5115f91d0bf432b3dca32c652bd6fc330b6d7d5 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Sun, 12 Jun 2022 12:45:31 -0400 Subject: Update VIS vehicle signal support Rework to change the VIS signals being used for the cruise control and display mode switching to new AGL custom steering wheel switch signals. In practice mapping multiple CAN signals from the LIN polling to a couple VIS cruise control actuator signals 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 as much of the standard VSS schema as possible. Bug-AGL: SPEC-4409 Change-Id: I6369b030e282a8040b144d6384daeec46dc7098d Signed-off-by: Scott Murray (cherry picked from commit c65fa79b1aecebdd6b6a395506e5161f117f2576) --- app/ValueSource.qml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/app/ValueSource.qml b/app/ValueSource.qml index 24a3a5f..b94a468 100644 --- a/app/ValueSource.qml +++ b/app/ValueSource.qml @@ -112,10 +112,12 @@ Item { onAuthorized: { VehicleSignals.subscribe("Vehicle.Speed") VehicleSignals.subscribe("Vehicle.Powertrain.CombustionEngine.Engine.Speed") - VehicleSignals.subscribe("Vehicle.ADAS.CruiseControl.IsActive") - VehicleSignals.subscribe("Vehicle.ADAS.CruiseControl.IsSet") - VehicleSignals.subscribe("Vehicle.ADAS.LaneDepartureDetection.IsActive") - VehicleSignals.subscribe("Vehicle.Cabin.Infotainment.Cluster.Mode") + VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.CruiseEnable") + VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.CruiseSet") + VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.CruiseResume") + VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.CruiseCancel") + VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.LaneDepartureWarning") + VehicleSignals.subscribe("Vehicle.Cabin.SteeringWheel.Switches.Info") VehicleSignals.get("Vehicle.Cabin.Infotainment.HMI.DistanceUnit") VehicleSignals.subscribe("Vehicle.Cabin.Infotainment.HMI.DistanceUnit") } @@ -144,23 +146,24 @@ Item { if(!runAnimation) { valueSource.rpm = parseFloat(value) / 1000 } - } else if (path === "Vehicle.ADAS.CruiseControl.IsActive" && value === "true") { + } else if (path === "Vehicle.Cabin.SteeringWheel.Switches.CruiseEnable" && value === "true") { if(valueSource.cruiseEnabled) { valueSource.cruiseEnabled = false valueSource.cruiseSet = false } else { valueSource.cruiseEnabled = true } - } else if (path === "Vehicle.ADAS.CruiseControl.IsSet") { - if (value === "true") { - if(valueSource.cruiseEnabled) - valueSource.cruiseSet = true - } else { - valueSource.cruiseSet = false + } else if ((path === "Vehicle.Cabin.SteeringWheel.Switches.CruiseSet" || + path === "Vehicle.Cabin.SteeringWheel.Switches.CruiseResume") && + value == "true") { + if(valueSource.cruiseEnabled) { + valueSource.cruiseSet = true } - } else if (path === "Vehicle.ADAS.LaneDepartureDetection.IsActive" && value === "true") { + } else if (path === "Vehicle.Cabin.SteeringWheel.Switches.CruiseCancel" && value === "true") { + valueSource.cruiseSet = false + } else if (path === "Vehicle.Cabin.SteeringWheel.Switches.LaneDepartureWarning" && value === "true") { valueSource.laneDepartureWarnEnabled = !valueSource.laneDepartureWarnEnabled - } else if (path === "Vehicle.Cabin.Infotainment.Cluster.Mode" && value === "true") { + } else if (path === "Vehicle.Cabin.SteeringWheel.Switches.Info" && value === "true") { valueSource.displayNumericSpeeds = !valueSource.displayNumericSpeeds } else if (path === "Vehicle.Cabin.Infotainment.HMI.DistanceUnit") { if (value === "km") { -- cgit 1.2.3-korg