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

Commit 20cc66a8 authored by Aaqib Ismail's avatar Aaqib Ismail
Browse files

Add HAL changes for LANE_KEEP_ASSIST_ENABLED

Bug: 261743711
Test: atest VtsHalAutomotiveVehicle_TargetTest
      atest CtsCarTestCases:CarPropertyManagerTest
      atest CtsCarTestCases:VehiclePropertyIdsTest
Change-Id: I9e8dbb601ad320357d062aa665a9a9ba215b469a
parent a5e54678
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -241,6 +241,7 @@ enum VehicleProperty {
  FORWARD_COLLISION_WARNING_ENABLED = 287313922,
  BLIND_SPOT_WARNING_ENABLED = 287313924,
  LANE_DEPARTURE_WARNING_ENABLED = 287313926,
  LANE_KEEP_ASSIST_ENABLED = 287313928,
  LANE_CENTERING_ASSIST_ENABLED = 287313930,
  EMERGENCY_LANE_KEEP_ASSIST_ENABLED = 287313933,
  ADAPTIVE_CRUISE_CONTROL_ENABLED = 287313935,
+20 −0
Original line number Diff line number Diff line
@@ -3484,6 +3484,26 @@ enum VehicleProperty {
    LANE_DEPARTURE_WARNING_ENABLED =
            0x1006 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,

    /**
     * Enable or disable Lane Keep Assist (LKA).
     *
     * Set true to enable LKA and false to disable LKA. When LKA is enabled, the ADAS system in the
     * vehicle should be turned on and monitoring if the driver unintentionally drifts toward or
     * over the lane marking. If an unintentional lane departure is detected, the system applies
     * steering control to return the vehicle into the current lane.
     *
     * This is different from Lane Centering Assist (LCA) which, when activated, applies continuous
     * steering control to keep the vehicle centered in the current lane.
     *
     * This property is defined as read_write, but OEMs have the option to implement it as read
     * only.
     *
     * @change_mode VehiclePropertyChangeMode.ON_CHANGE
     * @access VehiclePropertyAccess.READ_WRITE
     */
    LANE_KEEP_ASSIST_ENABLED =
            0x1008 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,

    /**
     * Enable or disable lane centering assist (LCA).
     *
+1 −0
Original line number Diff line number Diff line
@@ -241,6 +241,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
        {VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::BLIND_SPOT_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::LANE_DEPARTURE_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::LANE_KEEP_ASSIST_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::EMERGENCY_LANE_KEEP_ASSIST_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::ADAPTIVE_CRUISE_CONTROL_ENABLED, VehiclePropertyAccess::READ_WRITE},
+1 −0
Original line number Diff line number Diff line
@@ -241,6 +241,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
        {VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::BLIND_SPOT_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::LANE_DEPARTURE_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::LANE_KEEP_ASSIST_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::EMERGENCY_LANE_KEEP_ASSIST_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::ADAPTIVE_CRUISE_CONTROL_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
+1 −0
Original line number Diff line number Diff line
@@ -233,6 +233,7 @@ public final class AccessForVehicleProperty {
        Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.BLIND_SPOT_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.LANE_DEPARTURE_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.LANE_KEEP_ASSIST_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.EMERGENCY_LANE_KEEP_ASSIST_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_ENABLED, VehiclePropertyAccess.READ_WRITE),
Loading