From cb8d72c70709996964b74ae651513e884a93d818 Mon Sep 17 00:00:00 2001 From: Tyler Trephan Date: Tue, 10 Dec 2019 18:43:05 -0800 Subject: [PATCH] Updated PERF_STEERING_ANGLE to support rear steering. Change-Id: I2d8d8eff076ab2b76476a8b4edc18d213df71d45 Fix: 146022250 Test: Tested on device. --- .../default/impl/vhal_v2_0/DefaultConfig.h | 19 ++++++++++++++++++- automotive/vehicle/2.0/types.hal | 17 ++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h index 2dbcbba28f..5fa8438b0f 100644 --- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h +++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h @@ -293,7 +293,24 @@ const ConfigDeclaration kVehicleProperties[]{ .maxSampleRate = 10.0f, }, .initialValue = {.floatValues = {0.0f}}}, - + {.config = + { + .prop = toInt(VehicleProperty::PERF_STEERING_ANGLE), + .access = VehiclePropertyAccess::READ, + .changeMode = VehiclePropertyChangeMode::CONTINUOUS, + .minSampleRate = 0.0f, + .maxSampleRate = 10.0f, + }, + .initialValue = {.floatValues = {0.0f}}}, + {.config = + { + .prop = toInt(VehicleProperty::PERF_REAR_STEERING_ANGLE), + .access = VehiclePropertyAccess::READ, + .changeMode = VehiclePropertyChangeMode::CONTINUOUS, + .minSampleRate = 0.0f, + .maxSampleRate = 10.0f, + }, + .initialValue = {.floatValues = {0.0f}}}, { .config = { diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal index 24fcf76b2f..b3dfe846a7 100644 --- a/automotive/vehicle/2.0/types.hal +++ b/automotive/vehicle/2.0/types.hal @@ -340,7 +340,7 @@ enum VehicleProperty : int32_t { | VehicleArea:GLOBAL), /** - * Steering angle of the vehicle + * Front bicycle model steering angle for vehicle * * Angle is in degrees. Left is negative. * @@ -354,6 +354,21 @@ enum VehicleProperty : int32_t { | VehiclePropertyType:FLOAT | VehicleArea:GLOBAL), + /** + * Rear bicycle model steering angle for vehicle + * + * Angle is in degrees. Left is negative. + * + * @change_mode VehiclePropertyChangeMode:CONTINUOUS + * @access VehiclePropertyAccess:READ + * @unit VehicleUnit:DEGREES + */ + PERF_REAR_STEERING_ANGLE = ( + 0x0210 + | VehiclePropertyGroup:SYSTEM + | VehiclePropertyType:FLOAT + | VehicleArea:GLOBAL), + /** * Temperature of engine coolant *