mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "Add HAL changes for WINDSHIELD_WIPERS_SWITCH"
This commit is contained in:
@@ -179,6 +179,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
|
||||
{VehicleProperty::WINDOW_LOCK, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::WINDSHIELD_WIPERS_PERIOD, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::WINDSHIELD_WIPERS_STATE, VehiclePropertyAccess::READ},
|
||||
{VehicleProperty::WINDSHIELD_WIPERS_SWITCH, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::STEERING_WHEEL_DEPTH_POS, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::STEERING_WHEEL_DEPTH_MOVE, VehiclePropertyAccess::READ_WRITE},
|
||||
{VehicleProperty::STEERING_WHEEL_HEIGHT_POS, VehiclePropertyAccess::READ_WRITE},
|
||||
|
||||
@@ -179,6 +179,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
|
||||
{VehicleProperty::WINDOW_LOCK, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::WINDSHIELD_WIPERS_PERIOD, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::WINDSHIELD_WIPERS_STATE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::WINDSHIELD_WIPERS_SWITCH, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::STEERING_WHEEL_DEPTH_POS, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::STEERING_WHEEL_DEPTH_MOVE, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
{VehicleProperty::STEERING_WHEEL_HEIGHT_POS, VehiclePropertyChangeMode::ON_CHANGE},
|
||||
|
||||
@@ -171,6 +171,7 @@ public final class AccessForVehicleProperty {
|
||||
Map.entry(VehicleProperty.WINDOW_LOCK, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.WINDSHIELD_WIPERS_PERIOD, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.WINDSHIELD_WIPERS_STATE, VehiclePropertyAccess.READ),
|
||||
Map.entry(VehicleProperty.WINDSHIELD_WIPERS_SWITCH, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.STEERING_WHEEL_DEPTH_POS, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.STEERING_WHEEL_DEPTH_MOVE, VehiclePropertyAccess.READ_WRITE),
|
||||
Map.entry(VehicleProperty.STEERING_WHEEL_HEIGHT_POS, VehiclePropertyAccess.READ_WRITE),
|
||||
|
||||
@@ -171,6 +171,7 @@ public final class ChangeModeForVehicleProperty {
|
||||
Map.entry(VehicleProperty.WINDOW_LOCK, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.WINDSHIELD_WIPERS_PERIOD, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.WINDSHIELD_WIPERS_STATE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.WINDSHIELD_WIPERS_SWITCH, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.STEERING_WHEEL_DEPTH_POS, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.STEERING_WHEEL_DEPTH_MOVE, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
Map.entry(VehicleProperty.STEERING_WHEEL_HEIGHT_POS, VehiclePropertyChangeMode.ON_CHANGE),
|
||||
|
||||
@@ -76,6 +76,7 @@ using ::aidl::android::hardware::automotive::vehicle::VehicleTurnSignal;
|
||||
using ::aidl::android::hardware::automotive::vehicle::VehicleUnit;
|
||||
using ::aidl::android::hardware::automotive::vehicle::VehicleVendorPermission;
|
||||
using ::aidl::android::hardware::automotive::vehicle::WindshieldWipersState;
|
||||
using ::aidl::android::hardware::automotive::vehicle::WindshieldWipersSwitch;
|
||||
|
||||
using ::android::base::Error;
|
||||
using ::android::base::Result;
|
||||
@@ -226,6 +227,8 @@ JsonValueParser::JsonValueParser() {
|
||||
mConstantParsersByType["FuelType"] = std::make_unique<ConstantParser<FuelType>>();
|
||||
mConstantParsersByType["WindshieldWipersState"] =
|
||||
std::make_unique<ConstantParser<WindshieldWipersState>>();
|
||||
mConstantParsersByType["WindshieldWipersSwitch"] =
|
||||
std::make_unique<ConstantParser<WindshieldWipersSwitch>>();
|
||||
mConstantParsersByType["EmergencyLaneKeepAssistState"] =
|
||||
std::make_unique<ConstantParser<EmergencyLaneKeepAssistState>>();
|
||||
mConstantParsersByType["CruiseControlType"] =
|
||||
|
||||
@@ -2693,6 +2693,47 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::WINDSHIELD_WIPERS_SWITCH",
|
||||
"defaultValue": {
|
||||
"int32Values": [
|
||||
"WindshieldWipersSwitch::OFF"
|
||||
]
|
||||
},
|
||||
"areas": [
|
||||
{
|
||||
"areaId": "VehicleAreaWindow::FRONT_WINDSHIELD",
|
||||
"supportedEnumValues": [
|
||||
"WindshieldWipersSwitch::OFF",
|
||||
"WindshieldWipersSwitch::MIST",
|
||||
"WindshieldWipersSwitch::INTERMITTENT_LEVEL_1",
|
||||
"WindshieldWipersSwitch::INTERMITTENT_LEVEL_2",
|
||||
"WindshieldWipersSwitch::INTERMITTENT_LEVEL_3",
|
||||
"WindshieldWipersSwitch::INTERMITTENT_LEVEL_4",
|
||||
"WindshieldWipersSwitch::INTERMITTENT_LEVEL_5",
|
||||
"WindshieldWipersSwitch::CONTINUOUS_LEVEL_1",
|
||||
"WindshieldWipersSwitch::CONTINUOUS_LEVEL_2",
|
||||
"WindshieldWipersSwitch::CONTINUOUS_LEVEL_3",
|
||||
"WindshieldWipersSwitch::CONTINUOUS_LEVEL_4",
|
||||
"WindshieldWipersSwitch::CONTINUOUS_LEVEL_5",
|
||||
"WindshieldWipersSwitch::AUTO",
|
||||
"WindshieldWipersSwitch::SERVICE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"areaId": "VehicleAreaWindow::REAR_WINDSHIELD",
|
||||
"supportedEnumValues": [
|
||||
"WindshieldWipersSwitch::OFF",
|
||||
"WindshieldWipersSwitch::INTERMITTENT_LEVEL_1",
|
||||
"WindshieldWipersSwitch::INTERMITTENT_LEVEL_2",
|
||||
"WindshieldWipersSwitch::CONTINUOUS_LEVEL_1",
|
||||
"WindshieldWipersSwitch::CONTINUOUS_LEVEL_2",
|
||||
"WindshieldWipersSwitch::AUTO",
|
||||
"WindshieldWipersSwitch::SERVICE"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "VehicleProperty::STEERING_WHEEL_DEPTH_POS",
|
||||
"defaultValue": {
|
||||
|
||||
@@ -159,6 +159,8 @@ We support the following constant types:
|
||||
|
||||
* WindshieldWipersState
|
||||
|
||||
* WindshieldWipersSwitch
|
||||
|
||||
* Constants
|
||||
|
||||
Every constant type except "Constants" corresponds to a enum defined in Vehicle
|
||||
|
||||
@@ -85,5 +85,6 @@
|
||||
#include <aidl/android/hardware/automotive/vehicle/VehicleUnit.h>
|
||||
#include <aidl/android/hardware/automotive/vehicle/VehicleVendorPermission.h>
|
||||
#include <aidl/android/hardware/automotive/vehicle/WindshieldWipersState.h>
|
||||
#include <aidl/android/hardware/automotive/vehicle/WindshieldWipersSwitch.h>
|
||||
|
||||
#endif // android_hardware_automotive_vehicle_aidl_impl_utils_common_include_VehicleHalTypes_H_
|
||||
|
||||
@@ -177,6 +177,7 @@ enum VehicleProperty {
|
||||
WINDOW_LOCK = (((0x0BC4 + 0x10000000) + 0x03000000) + 0x00200000) /* 320867268 */,
|
||||
WINDSHIELD_WIPERS_PERIOD = (((0x0BC5 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.WINDOW) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 322964421 */,
|
||||
WINDSHIELD_WIPERS_STATE = (((0x0BC6 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.WINDOW) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 322964422 */,
|
||||
WINDSHIELD_WIPERS_SWITCH = (((0x0BC7 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.WINDOW) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 322964423 */,
|
||||
STEERING_WHEEL_DEPTH_POS = (((0x0BE0 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410016 */,
|
||||
STEERING_WHEEL_DEPTH_MOVE = (((0x0BE1 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410017 */,
|
||||
STEERING_WHEEL_HEIGHT_POS = (((0x0BE2 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410018 */,
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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 WindshieldWipersSwitch {
|
||||
OTHER = 0,
|
||||
OFF = 1,
|
||||
MIST = 2,
|
||||
INTERMITTENT_LEVEL_1 = 3,
|
||||
INTERMITTENT_LEVEL_2 = 4,
|
||||
INTERMITTENT_LEVEL_3 = 5,
|
||||
INTERMITTENT_LEVEL_4 = 6,
|
||||
INTERMITTENT_LEVEL_5 = 7,
|
||||
CONTINUOUS_LEVEL_1 = 8,
|
||||
CONTINUOUS_LEVEL_2 = 9,
|
||||
CONTINUOUS_LEVEL_3 = 10,
|
||||
CONTINUOUS_LEVEL_4 = 11,
|
||||
CONTINUOUS_LEVEL_5 = 12,
|
||||
AUTO = 13,
|
||||
SERVICE = 14,
|
||||
}
|
||||
@@ -2131,6 +2131,31 @@ enum VehicleProperty {
|
||||
WINDSHIELD_WIPERS_STATE =
|
||||
0x0BC6 + VehiclePropertyGroup.SYSTEM + VehicleArea.WINDOW + VehiclePropertyType.INT32,
|
||||
|
||||
/**
|
||||
* Windshield wipers switch.
|
||||
*
|
||||
* Represents the position of the switch controlling the windshield wipers. The value of
|
||||
* WINDSHIELD_WIPERS_SWITCH may not match the value of WINDSHIELD_WIPERS_STATE (e.g.
|
||||
* WINDSHIELD_WIPERS_SWITCH = AUTO and WINDSHIELD_WIPERS_STATE = WindshieldWipersState#ON).
|
||||
*
|
||||
* For each supported area ID, the VehicleAreaConfig#supportedEnumValues array must be defined
|
||||
* unless all states in WindshieldWipersSwitch are supported (including OTHER, which is not
|
||||
* recommended).
|
||||
*
|
||||
* This property is defined as read_write, but OEMs have the option to implement it as read
|
||||
* only.
|
||||
*
|
||||
* If this property is implemented as read_write and the OTHER state is listed in the
|
||||
* VehicleAreaConfig#supportedEnumValues array, then OTHER is not a supported value for writing.
|
||||
* It is only a supported value for reading.
|
||||
*
|
||||
* @change_mode VehiclePropertyChangeMode.ON_CHANGE
|
||||
* @access VehiclePropertyAccess.READ_WRITE
|
||||
* @data_enum WindshieldWipersSwitch
|
||||
*/
|
||||
WINDSHIELD_WIPERS_SWITCH =
|
||||
0x0BC7 + VehiclePropertyGroup.SYSTEM + VehicleArea.WINDOW + VehiclePropertyType.INT32,
|
||||
|
||||
/**
|
||||
* Steering wheel depth position
|
||||
*
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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 current position of VehicleProperty#WINDSHIELD_WIPERS_SWITCH.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum WindshieldWipersSwitch {
|
||||
|
||||
/**
|
||||
* This value is used as an alternative for any WindshieldWipersSwitch value that is not defined
|
||||
* in the platform. Ideally, implementations of VehicleProperty#WINDSHIELD_WIPERS_SWITCH should
|
||||
* not use this value. The framework can use this field to remain backwards compatible if
|
||||
* WindshieldWipersSwitch is extended to include additional values.
|
||||
*/
|
||||
OTHER = 0,
|
||||
/**
|
||||
* The windshield wipers switch is set to the off position.
|
||||
*/
|
||||
OFF = 1,
|
||||
/**
|
||||
* MIST mode performs a single wipe, and then returns to the OFF position.
|
||||
*/
|
||||
MIST = 2,
|
||||
/**
|
||||
* INTERMITTENT_LEVEL_* modes performs intermittent wiping. As the level increases, the
|
||||
* intermittent time period decreases.
|
||||
*/
|
||||
INTERMITTENT_LEVEL_1 = 3,
|
||||
INTERMITTENT_LEVEL_2 = 4,
|
||||
INTERMITTENT_LEVEL_3 = 5,
|
||||
INTERMITTENT_LEVEL_4 = 6,
|
||||
INTERMITTENT_LEVEL_5 = 7,
|
||||
/**
|
||||
* CONTINUOUS_LEVEL_* modes performs continuous wiping. As the level increases the speed of the
|
||||
* wiping increases as well.
|
||||
*/
|
||||
CONTINUOUS_LEVEL_1 = 8,
|
||||
CONTINUOUS_LEVEL_2 = 9,
|
||||
CONTINUOUS_LEVEL_3 = 10,
|
||||
CONTINUOUS_LEVEL_4 = 11,
|
||||
CONTINUOUS_LEVEL_5 = 12,
|
||||
/**
|
||||
* AUTO allows the vehicle to decide the required wiping level based on the exterior weather
|
||||
* conditions.
|
||||
*/
|
||||
AUTO = 13,
|
||||
/**
|
||||
* Windshield wipers are set to the service mode.
|
||||
*/
|
||||
SERVICE = 14,
|
||||
}
|
||||
@@ -612,6 +612,12 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyWindshieldWipersStateConfig) {
|
||||
VehicleArea::WINDOW, VehiclePropertyType::INT32);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifyWindshieldWipersSwitchConfig) {
|
||||
verifyProperty(VehicleProperty::WINDSHIELD_WIPERS_SWITCH, VehiclePropertyAccess::READ_WRITE,
|
||||
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
|
||||
VehicleArea::WINDOW, VehiclePropertyType::INT32);
|
||||
}
|
||||
|
||||
TEST_P(VtsHalAutomotiveVehicleTargetTest, verifySteeringWheelDepthPosConfig) {
|
||||
verifyProperty(VehicleProperty::STEERING_WHEEL_DEPTH_POS, VehiclePropertyAccess::READ_WRITE,
|
||||
VehiclePropertyChangeMode::ON_CHANGE, VehiclePropertyGroup::SYSTEM,
|
||||
|
||||
Reference in New Issue
Block a user