VHAL: fix CTS CarPropertyManagerTest#testRegisterCallback
This case asserts property PERF_VEHICLE_SPEED can have different
number event happened with different event rate:
SENSOR_RATE_NORMAL or SENSOR_RATE_FASTEST.
But CarPropertyManager.java says:
Rate has no effect if the property has one of the following change modes
* CarPropertyConfig#VEHICLE_PROPERTY_CHANGE_MODE_STATIC
* CarPropertyConfig#VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE
So modify PERF_VEHICLE_SPEED change mode to CONTINUOUS.
Test:
run cts -m CtsCarTestCases -t android.car.cts.CarPropertyManagerTest#testRegisterCallback
Change-Id: I99e3d672d052a5cde9aaad78221caac510e81b40
Signed-off-by: Jindong <jindong.yue@nxp.com>
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 2c5e5cc..2948ecb 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
@@ -234,7 +234,7 @@
{
.prop = toInt(VehicleProperty::PERF_VEHICLE_SPEED),
.access = VehiclePropertyAccess::READ,
- .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
.minSampleRate = 1.0f,
.maxSampleRate = 10.0f,
},