Merge changes from topics "LaneCenteringAssistCommand", "LaneCenteringAssistState", "LaneDepartureWarningState"
* changes: Update FORWARD_COLLISION_WARNING_ENABLED documentation in HAL Update AUTOMATIC_EMERGENCY_BRAKING_ENABLED documentation in HAL Update LANE_DEPARTURE_WARNING_ENABLED documentation in HAL Add HAL changes for LANE_DEPARTURE_WARNING_STATE Add HAL changes for LANE_CENTERING_ASSIST_COMMAND Update LANE_CENTERING_ASSIST_ENABLED documentation in HAL Add HAL changes for LANE_CENTERING_ASSIST_STATE
This commit is contained in:
commit
ff29c893c0
17 changed files with 470 additions and 8 deletions
|
@ -251,9 +251,12 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
|
|||
{VehicleProperty::BLIND_SPOT_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::BLIND_SPOT_WARNING_STATE, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::LANE_DEPARTURE_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::LANE_DEPARTURE_WARNING_STATE, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::LANE_KEEP_ASSIST_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::LANE_KEEP_ASSIST_STATE, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::LANE_CENTERING_ASSIST_COMMAND, VehiclePropertyAccess::WRITE},
|
||||
{VehicleProperty::LANE_CENTERING_ASSIST_STATE, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::EMERGENCY_LANE_KEEP_ASSIST_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::ADAPTIVE_CRUISE_CONTROL_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::HANDS_ON_DETECTION_ENABLED, VehiclePropertyAccess::READ_WRITE},
|
||||
|
|
|
@ -251,9 +251,12 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
|
|||
{VehicleProperty::BLIND_SPOT_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::BLIND_SPOT_WARNING_STATE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::LANE_DEPARTURE_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::LANE_DEPARTURE_WARNING_STATE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::LANE_KEEP_ASSIST_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::LANE_KEEP_ASSIST_STATE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::LANE_CENTERING_ASSIST_COMMAND, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::LANE_CENTERING_ASSIST_STATE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::EMERGENCY_LANE_KEEP_ASSIST_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::ADAPTIVE_CRUISE_CONTROL_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::HANDS_ON_DETECTION_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
|
|
|
@ -243,9 +243,12 @@ public final class AccessForVehicleProperty {
|
|||
Map.entry(VehicleProperty.BLIND_SPOT_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.BLIND_SPOT_WARNING_STATE, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.LANE_DEPARTURE_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.LANE_DEPARTURE_WARNING_STATE, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.LANE_KEEP_ASSIST_ENABLED, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.LANE_KEEP_ASSIST_STATE, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_COMMAND, VehiclePropertyAccess.WRITE),
|
||||
Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_STATE, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.EMERGENCY_LANE_KEEP_ASSIST_ENABLED, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_ENABLED, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.HANDS_ON_DETECTION_ENABLED, VehiclePropertyAccess.READ_WRITE),
|
||||
|
|
|
@ -243,9 +243,12 @@ public final class ChangeModeForVehicleProperty {
|
|||
Map.entry(VehicleProperty.BLIND_SPOT_WARNING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.BLIND_SPOT_WARNING_STATE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.LANE_DEPARTURE_WARNING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.LANE_DEPARTURE_WARNING_STATE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.LANE_KEEP_ASSIST_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.LANE_KEEP_ASSIST_STATE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_COMMAND, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_STATE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.EMERGENCY_LANE_KEEP_ASSIST_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.ADAPTIVE_CRUISE_CONTROL_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.HANDS_ON_DETECTION_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
|
|
|
@ -45,6 +45,9 @@ using ::aidl::android::hardware::automotive::vehicle::EvsServiceType;
|
|||
using ::aidl::android::hardware::automotive::vehicle::ForwardCollisionWarningState;
|
||||
using ::aidl::android::hardware::automotive::vehicle::FuelType;
|
||||
using ::aidl::android::hardware::automotive::vehicle::GsrComplianceRequirementType;
|
||||
using ::aidl::android::hardware::automotive::vehicle::LaneCenteringAssistCommand;
|
||||
using ::aidl::android::hardware::automotive::vehicle::LaneCenteringAssistState;
|
||||
using ::aidl::android::hardware::automotive::vehicle::LaneDepartureWarningState;
|
||||
using ::aidl::android::hardware::automotive::vehicle::LaneKeepAssistState;
|
||||
using ::aidl::android::hardware::automotive::vehicle::RawPropValues;
|
||||
using ::aidl::android::hardware::automotive::vehicle::VehicleApPowerStateReport;
|
||||
|
@ -222,8 +225,14 @@ JsonValueParser::JsonValueParser() {
|
|||
std::make_unique<ConstantParser<ForwardCollisionWarningState>>();
|
||||
mConstantParsersByType["BlindSpotWarningState"] =
|
||||
std::make_unique<ConstantParser<BlindSpotWarningState>>();
|
||||
mConstantParsersByType["LaneDepartureWarningState"] =
|
||||
std::make_unique<ConstantParser<LaneDepartureWarningState>>();
|
||||
mConstantParsersByType["LaneKeepAssistState"] =
|
||||
std::make_unique<ConstantParser<LaneKeepAssistState>>();
|
||||
mConstantParsersByType["LaneCenteringAssistCommand"] =
|
||||
std::make_unique<ConstantParser<LaneCenteringAssistCommand>>();
|
||||
mConstantParsersByType["LaneCenteringAssistState"] =
|
||||
std::make_unique<ConstantParser<LaneCenteringAssistState>>();
|
||||
mConstantParsersByType["Constants"] = std::make_unique<LocalVariableParser>();
|
||||
}
|
||||
|
||||
|
|
|
@ -3322,10 +3322,32 @@
|
|||
"property": "VehicleProperty::LANE_DEPARTURE_WARNING_ENABLED",
|
||||
"defaultValue": {
|
||||
"int32Values": [
|
||||
0
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::LANE_DEPARTURE_WARNING_STATE",
|
||||
"defaultValue": {
|
||||
"int32Values": [
|
||||
"LaneDepartureWarningState::NO_WARNING"
|
||||
]
|
||||
},
|
||||
"areas": [
|
||||
{
|
||||
"areaId": 0,
|
||||
"supportedEnumValues": [
|
||||
"ErrorState::NOT_AVAILABLE_SAFETY",
|
||||
"ErrorState::NOT_AVAILABLE_SPEED_HIGH",
|
||||
"ErrorState::NOT_AVAILABLE_SPEED_LOW",
|
||||
"ErrorState::NOT_AVAILABLE_DISABLED",
|
||||
"LaneDepartureWarningState::NO_WARNING",
|
||||
"LaneDepartureWarningState::WARNING_LEFT",
|
||||
"LaneDepartureWarningState::WARNING_RIGHT"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::LANE_KEEP_ASSIST_ENABLED",
|
||||
"defaultValue": {
|
||||
|
@ -3361,9 +3383,36 @@
|
|||
"property": "VehicleProperty::LANE_CENTERING_ASSIST_ENABLED",
|
||||
"defaultValue": {
|
||||
"int32Values": [
|
||||
0
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::LANE_CENTERING_ASSIST_COMMAND"
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::LANE_CENTERING_ASSIST_STATE",
|
||||
"defaultValue": {
|
||||
"int32Values": [
|
||||
"LaneCenteringAssistState::ENABLED"
|
||||
]
|
||||
},
|
||||
"areas": [
|
||||
{
|
||||
"areaId": 0,
|
||||
"supportedEnumValues": [
|
||||
"ErrorState::NOT_AVAILABLE_SAFETY",
|
||||
"ErrorState::NOT_AVAILABLE_SPEED_HIGH",
|
||||
"ErrorState::NOT_AVAILABLE_SPEED_LOW",
|
||||
"ErrorState::NOT_AVAILABLE_DISABLED",
|
||||
"LaneCenteringAssistState::ENABLED",
|
||||
"LaneCenteringAssistState::ACTIVATION_REQUESTED",
|
||||
"LaneCenteringAssistState::ACTIVATED",
|
||||
"LaneCenteringAssistState::USER_OVERRIDE",
|
||||
"LaneCenteringAssistState::FORCED_DEACTIVATION_WARNING"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -147,8 +147,14 @@ We support the following constant types:
|
|||
|
||||
* BlindSpotWarningState
|
||||
|
||||
* LaneDepartureWarningState
|
||||
|
||||
* LaneKeepAssistState
|
||||
|
||||
* LaneCenteringAssistCommand
|
||||
|
||||
* LaneCenteringAssistState
|
||||
|
||||
* ErrorState
|
||||
|
||||
* WindshieldWipersState
|
||||
|
|
|
@ -32,6 +32,9 @@
|
|||
#include <aidl/android/hardware/automotive/vehicle/GetValueResult.h>
|
||||
#include <aidl/android/hardware/automotive/vehicle/GetValueResults.h>
|
||||
#include <aidl/android/hardware/automotive/vehicle/GsrComplianceRequirementType.h>
|
||||
#include <aidl/android/hardware/automotive/vehicle/LaneCenteringAssistCommand.h>
|
||||
#include <aidl/android/hardware/automotive/vehicle/LaneCenteringAssistState.h>
|
||||
#include <aidl/android/hardware/automotive/vehicle/LaneDepartureWarningState.h>
|
||||
#include <aidl/android/hardware/automotive/vehicle/LaneKeepAssistState.h>
|
||||
#include <aidl/android/hardware/automotive/vehicle/Obd2CommonIgnitionMonitors.h>
|
||||
#include <aidl/android/hardware/automotive/vehicle/Obd2FuelSystemStatus.h>
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.automotive.vehicle;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum LaneCenteringAssistCommand {
|
||||
ACTIVATE = 1,
|
||||
DEACTIVATE = 2,
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.automotive.vehicle;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum LaneCenteringAssistState {
|
||||
OTHER = 0,
|
||||
ENABLED = 1,
|
||||
ACTIVATION_REQUESTED = 2,
|
||||
ACTIVATED = 3,
|
||||
USER_OVERRIDE = 4,
|
||||
FORCED_DEACTIVATION_WARNING = 5,
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.automotive.vehicle;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum LaneDepartureWarningState {
|
||||
OTHER = 0,
|
||||
NO_WARNING = 1,
|
||||
WARNING_LEFT = 2,
|
||||
WARNING_RIGHT = 3,
|
||||
}
|
|
@ -249,9 +249,12 @@ enum VehicleProperty {
|
|||
BLIND_SPOT_WARNING_ENABLED = (((0x1004 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313924 */,
|
||||
BLIND_SPOT_WARNING_STATE = (((0x1005 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.MIRROR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 339742725 */,
|
||||
LANE_DEPARTURE_WARNING_ENABLED = (((0x1006 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313926 */,
|
||||
LANE_DEPARTURE_WARNING_STATE = (((0x1007 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411079 */,
|
||||
LANE_KEEP_ASSIST_ENABLED = (((0x1008 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313928 */,
|
||||
LANE_KEEP_ASSIST_STATE = (((0x1009 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411081 */,
|
||||
LANE_CENTERING_ASSIST_ENABLED = (((0x100A + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313930 */,
|
||||
LANE_CENTERING_ASSIST_COMMAND = (((0x100B + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411083 */,
|
||||
LANE_CENTERING_ASSIST_STATE = (((0x100C + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411084 */,
|
||||
EMERGENCY_LANE_KEEP_ASSIST_ENABLED = (((0x100D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313933 */,
|
||||
ADAPTIVE_CRUISE_CONTROL_ENABLED = (((0x100F + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313935 */,
|
||||
HANDS_ON_DETECTION_ENABLED = (((0x1016 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313942 */,
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.automotive.vehicle;
|
||||
|
||||
/**
|
||||
* Used by Lane Centering Assist (LCA) to enumerate commands.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum LaneCenteringAssistCommand {
|
||||
/**
|
||||
* When VehicleProperty#LANE_CENTERING_ASSIST_STATE = LaneCenteringAssistState#ENABLED, this
|
||||
* command sends a request to activate steering control that keeps the vehicle centered in its
|
||||
* lane. While waiting for the LCA System to take control of the vehicle,
|
||||
* VehicleProperty#LANE_CENTERING_ASSIST_STATE must be in the
|
||||
* LaneCenteringAssistState#ACTIVATION_REQUESTED state. Once the vehicle takes control of
|
||||
* steering, then VehicleProperty#LANE_CENTERING_ASSIST_STATE must be in the
|
||||
* LaneCenteringAssistState#ACTIVATED state. Otherwise, an error can be communicated through an
|
||||
* ErrorState value.
|
||||
*/
|
||||
ACTIVATE = 1,
|
||||
/**
|
||||
* When VehicleProperty#LANE_CENTERING_ASSIST_STATE is set to
|
||||
* LaneCenteringAssistState#ACTIVATION_REQUESTED or LaneCenteringAssistState#ACTIVATED, this
|
||||
* command deactivates steering control and the driver should take full control of the vehicle.
|
||||
* If this command succeeds, VehicleProperty#LANE_CENTERING_ASSIST_STATE must be updated to
|
||||
* LaneCenteringAssistState#ENABLED.
|
||||
*/
|
||||
DEACTIVATE = 2,
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.automotive.vehicle;
|
||||
|
||||
/**
|
||||
* Used to enumerate the state of Lane Centering Assist (LCA).
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum LaneCenteringAssistState {
|
||||
|
||||
/**
|
||||
* This state is used as an alternative for any LaneCenteringAssistState value that is not
|
||||
* defined in the platform. Ideally, implementations of
|
||||
* VehicleProperty#LANE_CENTERING_ASSIST_STATE should not use this state. The framework
|
||||
* can use this field to remain backwards compatible if LaneCenteringAssistState is
|
||||
* extended to include additional states.
|
||||
*/
|
||||
OTHER = 0,
|
||||
/**
|
||||
* LCA is enabled but the ADAS system has not received an activation signal from the driver.
|
||||
* Therefore, LCA is not steering the car and waits for the driver to send a
|
||||
* LaneCenteringAssistCommand#ACTIVATE command.
|
||||
*/
|
||||
ENABLED = 1,
|
||||
/**
|
||||
* LCA is enabled and the driver has sent an activation command to the LCA system, but the
|
||||
* system has not started actively steering the vehicle. This may happen when LCA needs time to
|
||||
* detect valid lane lines. The activation command can be sent through the
|
||||
* VehicleProperty#LANE_CENTERING_ASSIST_COMMAND vehicle property or through a system external
|
||||
* to Android. Once LCA is actively steering the vehicle, the state must be updated to
|
||||
* ACTIVATED. If the feature is not able to activate, then the cause can be communicated through
|
||||
* the ErrorState values and then return to the ENABLED state.
|
||||
*/
|
||||
ACTIVATION_REQUESTED = 2,
|
||||
/**
|
||||
* LCA is enabled and actively steering the car to keep it centered in its lane.
|
||||
*/
|
||||
ACTIVATED = 3,
|
||||
/**
|
||||
* Many LCA implementations allow the driver to override LCA. This means that the car has
|
||||
* determined it should go a certain direction to keep the car centered in the lane, but a user
|
||||
* decides to take over and do something else. This is often done for safety reasons and to
|
||||
* ensure that the driver can always take control of the vehicle. This state should be set when
|
||||
* the user is actively overriding the LCA system.
|
||||
*/
|
||||
USER_OVERRIDE = 4,
|
||||
/**
|
||||
* When LCA is in the ACTIVATED state but it will potentially need to deactivate because of
|
||||
* external conditions (e.g. roads curvature is too extreme, the driver does not have their
|
||||
* hands on the steering wheel for a long period of time, or the driver is not paying
|
||||
* attention), then the ADAS system will notify the driver of a potential need to deactivate and
|
||||
* give control back to the driver.
|
||||
*/
|
||||
FORCED_DEACTIVATION_WARNING = 5,
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.automotive.vehicle;
|
||||
|
||||
/**
|
||||
* Used to enumerate the state of Lane Departure Warning (LDW).
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum LaneDepartureWarningState {
|
||||
|
||||
/**
|
||||
* This state is used as an alternative for any LaneDepartureWarningState value that is not
|
||||
* defined in the platform. Ideally, implementations of
|
||||
* VehicleProperty#LANE_DEPARTURE_WARNING_STATE should not use this state. The framework
|
||||
* can use this field to remain backwards compatible if LaneDepartureWarningState is
|
||||
* extended to include additional states.
|
||||
*/
|
||||
OTHER = 0,
|
||||
/**
|
||||
* LDW is enabled and monitoring, but the vehicle is centered in the lane.
|
||||
*/
|
||||
NO_WARNING = 1,
|
||||
/**
|
||||
* LDW is enabled, detects the vehicle is approaching or crossing lane lines on the left side
|
||||
* of the vehicle, and is currently warning the user.
|
||||
*/
|
||||
WARNING_LEFT = 2,
|
||||
/**
|
||||
* LDW is enabled, detects the vehicle is approaching or crossing lane lines on the right side
|
||||
* of the vehicle, and is currently warning the user.
|
||||
*/
|
||||
WARNING_RIGHT = 3,
|
||||
}
|
|
@ -3542,9 +3542,10 @@ enum VehicleProperty {
|
|||
* Set true to enable AEB and false to disable AEB. When AEB is enabled, the ADAS system in the
|
||||
* vehicle should be turned on and monitoring to avoid potential collisions.
|
||||
*
|
||||
* If AEB is not available, IVehicle#get must not return any NOT_AVAILABLE value in StatusCode.
|
||||
* Other StatusCode values like TRY_AGAIN may still be used as needed. For example, if AEB is
|
||||
* not available because the vehicle speed is too low, IVehicle#get must return false.
|
||||
* In general, AUTOMATIC_EMERGENCY_BRAKING_ENABLED should always return true or false. If the
|
||||
* feature is not available due to some temporary state, such as the vehicle speed being too
|
||||
* low, that information must be conveyed through the ErrorState values in the
|
||||
* AUTOMATIC_EMERGENCY_BRAKING_STATE property.
|
||||
*
|
||||
* This property is defined as read_write, but OEMs have the option to implement it as read
|
||||
* only.
|
||||
|
@ -3583,9 +3584,10 @@ enum VehicleProperty {
|
|||
* 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.
|
||||
*
|
||||
* If FCW is not available, IVehicle#get must not return any NOT_AVAILABLE value in StatusCode.
|
||||
* Other StatusCode values like TRY_AGAIN may still be used as needed. For example, if FCW is
|
||||
* not available because the vehicle speed is too low, IVehicle#get must return false.
|
||||
* In general, FORWARD_COLLISION_WARNING_ENABLED should always return true or false. If the
|
||||
* feature is not available due to some temporary state, such as the vehicle speed being too
|
||||
* low, that information must be conveyed through the ErrorState values in the
|
||||
* FORWARD_COLLISION_WARNING_STATE property.
|
||||
*
|
||||
* This property is defined as read_write, but OEMs have the option to implement it as read
|
||||
* only.
|
||||
|
@ -3660,6 +3662,11 @@ enum VehicleProperty {
|
|||
* vehicle should be turned on and monitoring if the vehicle is approaching or crossing lane
|
||||
* lines, in which case a warning will be given.
|
||||
*
|
||||
* In general, LANE_DEPARTURE_WARNING_ENABLED should always return true or false. If the feature
|
||||
* is not available due to some temporary state, such as the vehicle speed being too low or too
|
||||
* high, that information must be conveyed through the ErrorState values in the
|
||||
* LANE_DEPARTURE_WARNING_STATE property.
|
||||
*
|
||||
* This property is defined as read_write, but OEMs have the option to implement it as read
|
||||
* only.
|
||||
*
|
||||
|
@ -3669,6 +3676,25 @@ enum VehicleProperty {
|
|||
LANE_DEPARTURE_WARNING_ENABLED =
|
||||
0x1006 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
|
||||
|
||||
/**
|
||||
* Lane Departure Warning (LDW) state.
|
||||
*
|
||||
* Returns the current state of LDW. This property must always return a valid state defined in
|
||||
* LaneDepartureWarningState or ErrorState. It must not surface errors through StatusCode
|
||||
* and must use the supported error states instead.
|
||||
*
|
||||
* For the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined
|
||||
* unless all states of both LaneDepartureWarningState (including OTHER, which is not
|
||||
* recommended) and ErrorState are supported.
|
||||
*
|
||||
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
|
||||
* @access VehiclePropertyAccess.READ
|
||||
* @data_enum LaneDepartureWarningState
|
||||
* @data_enum ErrorState
|
||||
*/
|
||||
LANE_DEPARTURE_WARNING_STATE =
|
||||
0x1007 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
|
||||
|
||||
/**
|
||||
* Enable or disable Lane Keep Assist (LKA).
|
||||
*
|
||||
|
@ -3728,6 +3754,11 @@ enum VehicleProperty {
|
|||
* 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.
|
||||
*
|
||||
* In general, LANE_CENTERING_ASSIST_ENABLED should always return true or false. If the feature
|
||||
* is not available due to some temporary state, such as the vehicle speed being too low or too
|
||||
* high, that information must be conveyed through the ErrorState values in the
|
||||
* LANE_CENTERING_ASSIST_STATE property.
|
||||
*
|
||||
* This property is defined as read_write, but OEMs have the option to implement it as read
|
||||
* only.
|
||||
*
|
||||
|
@ -3737,6 +3768,52 @@ enum VehicleProperty {
|
|||
LANE_CENTERING_ASSIST_ENABLED =
|
||||
0x100A + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
|
||||
|
||||
/**
|
||||
* Lane Centering Assist (LCA) commands.
|
||||
*
|
||||
* Commands to activate and suspend LCA. They are only valid when LANE_CENTERING_ASSIST_ENABLED
|
||||
* = true. Otherwise, these commands must return StatusCode#NOT_AVAILABLE or
|
||||
* StatusCode#NOT_AVAILABLE_DISABLED.
|
||||
*
|
||||
* When the command ACTIVATE from LaneCenteringAssistCommmand is sent,
|
||||
* LANE_CENTERING_ASSIST_STATE must be set to LaneCenteringAssistState#ACTIVATION_REQUESTED.
|
||||
* When the ACTIVATE command succeeds, LANE_CENTERING_ASSIST_STATE must be set to
|
||||
* LaneCenteringAssistState#ACTIVATED. When the command DEACTIVATE from
|
||||
* LaneCenteringAssistCommmand succeeds, LANE_CENTERING_ASSIST_STATE must be set to
|
||||
* LaneCenteringAssistState#ENABLED.
|
||||
*
|
||||
* For the global area ID (0), the VehicleAreaConfig#supportedEnumValues must be defined unless
|
||||
* all enum values of LaneCenteringAssistCommand are supported.
|
||||
*
|
||||
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
|
||||
* @access VehiclePropertyAccess.WRITE
|
||||
* @data_enum LaneCenteringAssistCommmand
|
||||
*/
|
||||
LANE_CENTERING_ASSIST_COMMAND =
|
||||
0x100B + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
|
||||
|
||||
/**
|
||||
* Lane Centering Assist (LCA) state.
|
||||
*
|
||||
* Returns the current state of LCA. This property must always return a valid state defined in
|
||||
* LaneCenteringAssistState or ErrorState. It must not surface errors through StatusCode
|
||||
* and must use the supported error states instead.
|
||||
*
|
||||
* If LCA includes lane departure warnings, those warnings must be surfaced through the Lane
|
||||
* Departure Warning (LDW) properties.
|
||||
*
|
||||
* For the global area ID (0), the VehicleAreaConfig#supportedEnumValues array must be defined
|
||||
* unless all states of both LaneCenteringAssistState (including OTHER, which is not
|
||||
* recommended) and ErrorState are supported.
|
||||
*
|
||||
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
|
||||
* @access VehiclePropertyAccess.READ
|
||||
* @data_enum LaneCenteringAssistState
|
||||
* @data_enum ErrorState
|
||||
*/
|
||||
LANE_CENTERING_ASSIST_STATE =
|
||||
0x100C + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
|
||||
|
||||
/*
|
||||
* Enable or disable emergency lane keep assist (ELKA).
|
||||
*
|
||||
|
|
|
@ -744,6 +744,12 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyLaneDepartureWarningEnabledConfi
|
|||
VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::BOOLEAN);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyLaneDepartureWarningStateConfig) {
|
||||
verifyProperty(VehicleProperty::LANE_DEPARTURE_WARNING_STATE, VehiclePropertyAccess::READ,
|
||||
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
|
||||
VehicleArea::GLOBAL, VehiclePropertyType::INT32);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyLaneKeepAssistEnabledConfig) {
|
||||
verifyProperty(VehicleProperty::LANE_KEEP_ASSIST_ENABLED, VehiclePropertyAccess::READ_WRITE,
|
||||
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
|
||||
|
@ -762,6 +768,18 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyLaneCenteringAssistEnabledConfig
|
|||
VehiclePropertyGroup::SYSTEM, VehicleArea::GLOBAL, VehiclePropertyType::BOOLEAN);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyLaneCenteringAssistCommandConfig) {
|
||||
verifyProperty(VehicleProperty::LANE_CENTERING_ASSIST_COMMAND, VehiclePropertyAccess::WRITE,
|
||||
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
|
||||
VehicleArea::GLOBAL, VehiclePropertyType::INT32);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyLaneCenteringAssistStateConfig) {
|
||||
verifyProperty(VehicleProperty::LANE_CENTERING_ASSIST_STATE, VehiclePropertyAccess::READ,
|
||||
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
|
||||
VehicleArea::GLOBAL, VehiclePropertyType::INT32);
|
||||
}
|
||||
|
||||
std::vector<ServiceDescriptor> getDescriptors() {
|
||||
std::vector<ServiceDescriptor> descriptors;
|
||||
for (std::string name : getAidlHalInstanceNames(IVehicle::descriptor)) {
|
||||
|
|
Loading…
Reference in a new issue