Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bda042a7 authored by shrikar's avatar shrikar
Browse files

Added VEHICLE_PASSIVE_SUSPENSION_HEIGHT to HAL

Bug: 374760342
Test: atest VtsHalAutomotiveVehicle_TargetTest
Change-Id: Idec2de51b1469e4cd56d78d7fdda0b2ded28ccf3
parent 993f20bb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -245,6 +245,11 @@
                "value": 287310610,
                "description": "Brake fluid low.\nThis property must communicate that the brake fluid level in the vehicle is low according to the OEM. This property must match the vehicle's brake fluid level status as displayed on the instrument cluster. If the brake fluid level is low, this property must be set to true. If not, it must be set to false."
            },
            {
                "name": "VEHICLE_PASSIVE_SUSPENSION_HEIGHT",
                "value": 390071059,
                "description": "Vehicle Passive Suspension Height in mm.\nThis property must communicate the real-time suspension displacement of the vehicle relative to its neutral position, given in mm. In other words, the displacement of the suspension at any given point in time relative to the suspension's position when the vehicle is on a flat surface with no passengers or cargo. When the suspension is compressed in comparison to the neutral position, the value should be negative. When the suspension is decompressed in comparison to the neutral position, the value should be positive.\nExamples for further clarity: 1) Suppose the user is driving on a smooth flat surface, and all wheels are currently compressed by 2 cm in comparison to the default suspension height. In this scenario, this property must be set to -20 for all wheels. 2) Suppose the user drives over a pothole. While the front left wheel is over the pothole, it's decompressed by 3 cm in comparison to the rest of the wheels, or 1 cm in comparison to the default suspension height. All the others are still compressed by 2 cm. In this scenario, this property must be set to -20 for all wheels except for the front left, which must be set to 10.\nHasSupportedValueInfo.hasMinSupportedValue and HasSupportedValueInfo.hasMaxSupportedValue must be true for all areas.\nMinMaxSupportedValueResult.minSupportedValue represents the lower bound of the suspension height for the wheel at the specified area ID.\nMinMaxSupportedValueResult.maxSupportedValue represents the upper bound of the suspension height for the wheel at the specified area ID."
            },
            {
                "name": "ENGINE_IDLE_AUTO_STOP_ENABLED",
                "value": 287310624,
+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
        {VehicleProperty::BRAKE_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyAccess::READ},
        {VehicleProperty::BRAKE_PAD_WEAR_PERCENTAGE, VehiclePropertyAccess::READ},
        {VehicleProperty::BRAKE_FLUID_LEVEL_LOW, VehiclePropertyAccess::READ},
        {VehicleProperty::VEHICLE_PASSIVE_SUSPENSION_HEIGHT, VehiclePropertyAccess::READ},
        {VehicleProperty::ENGINE_IDLE_AUTO_STOP_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::IMPACT_DETECTED, VehiclePropertyAccess::READ},
        {VehicleProperty::VEHICLE_HORN_ENGAGED, VehiclePropertyAccess::READ_WRITE},
+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
        {VehicleProperty::BRAKE_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyChangeMode::CONTINUOUS},
        {VehicleProperty::BRAKE_PAD_WEAR_PERCENTAGE, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::BRAKE_FLUID_LEVEL_LOW, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::VEHICLE_PASSIVE_SUSPENSION_HEIGHT, VehiclePropertyChangeMode::CONTINUOUS},
        {VehicleProperty::ENGINE_IDLE_AUTO_STOP_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::IMPACT_DETECTED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::VEHICLE_HORN_ENGAGED, VehiclePropertyChangeMode::ON_CHANGE},
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ std::unordered_map<VehicleProperty, int32_t> VersionForVehicleProperty = {
        {VehicleProperty::BRAKE_PEDAL_COMPRESSION_PERCENTAGE, 4},
        {VehicleProperty::BRAKE_PAD_WEAR_PERCENTAGE, 4},
        {VehicleProperty::BRAKE_FLUID_LEVEL_LOW, 4},
        {VehicleProperty::VEHICLE_PASSIVE_SUSPENSION_HEIGHT, 4},
        {VehicleProperty::ENGINE_IDLE_AUTO_STOP_ENABLED, 2},
        {VehicleProperty::IMPACT_DETECTED, 3},
        {VehicleProperty::VEHICLE_HORN_ENGAGED, 4},
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ public final class AccessForVehicleProperty {
        Map.entry(VehicleProperty.BRAKE_PEDAL_COMPRESSION_PERCENTAGE, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.BRAKE_PAD_WEAR_PERCENTAGE, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.BRAKE_FLUID_LEVEL_LOW, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.VEHICLE_PASSIVE_SUSPENSION_HEIGHT, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.ENGINE_IDLE_AUTO_STOP_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.IMPACT_DETECTED, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.VEHICLE_HORN_ENGAGED, VehiclePropertyAccess.READ_WRITE),
Loading