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

Commit a251367e authored by Aaqib Ismail's avatar Aaqib Ismail
Browse files

Add HAL changes for FORWARD_COLLISION_WARNING_ENABLED

Bug: 261743618
Test: atest VtsHalAutomotiveVehicle_TargetTest
      atest CtsCarTestCases:CarPropertyManagerTest
      atest CtsCarTestCases:VehiclePropertyIdsTest
Change-Id: I37cbb2830732ab6c8cc918d7d83725bf4a618bb0
parent b1680a7b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -232,5 +232,6 @@ enum VehicleProperty {
  SUPPORTED_PROPERTY_IDS = 289476424,
  SHUTDOWN_REQUEST = 289410889,
  AUTOMATIC_EMERGENCY_BRAKING_ENABLED = 287313920,
  FORWARD_COLLISION_WARNING_ENABLED = 287313922,
  LANE_CENTERING_ASSIST_ENABLED = 287313930,
}
+15 −0
Original line number Diff line number Diff line
@@ -3317,6 +3317,21 @@ enum VehicleProperty {
    AUTOMATIC_EMERGENCY_BRAKING_ENABLED =
            0x1000 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,

    /**
     * Enable or disable forward collision warning (FCW).
     *
     * Set true to enable FCW and false to disable FCW. When FCW is enabled, the ADAS system in the
     * vehicle should be turned on and monitoring for potential collisions.
     *
     * 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
     */
    FORWARD_COLLISION_WARNING_ENABLED =
            0x1002 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,

    /**
     * Enable or disable lane centering assist (LCA).
     *
+1 −0
Original line number Diff line number Diff line
@@ -232,6 +232,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
        {VehicleProperty::SUPPORTED_PROPERTY_IDS, VehiclePropertyAccess::READ},
        {VehicleProperty::SHUTDOWN_REQUEST, VehiclePropertyAccess::WRITE},
        {VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyAccess::READ_WRITE},
};

+1 −0
Original line number Diff line number Diff line
@@ -232,6 +232,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
        {VehicleProperty::SUPPORTED_PROPERTY_IDS, VehiclePropertyChangeMode::STATIC},
        {VehicleProperty::SHUTDOWN_REQUEST, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
};

+1 −0
Original line number Diff line number Diff line
@@ -224,6 +224,7 @@ public final class AccessForVehicleProperty {
        Map.entry(VehicleProperty.SUPPORTED_PROPERTY_IDS, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.SHUTDOWN_REQUEST, VehiclePropertyAccess.WRITE),
        Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyAccess.READ_WRITE)
    );

Loading