Teach Vehicle HAL a way to indicate which subset of OBD2 sensors are valid for a given frame.
We are now using the "bytes" element of VehiclePropValue::RawValue as a storage place for a bitmask that indicates
which sensor indices, among those defined, actually map to valid values in the int32Values and floatValues respectively.
Test: make vts BUILD_GOOGLE_VTS=true -j32 && vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VehicleHidlTest -l INFO
Test: adb root && adb push out/target/product/bat/data/nativetest/android.hardware.vehicle@2.0-manager-unit-tests/android.hardware.vehicle@2.0-manager-unit-tests /data/nativetest/android.hardware.vehicle@2.0-manager-unit-tests/android.hardware.vehicle@2.0-manager-unit-tests && adb shell /data/nativetest/android.hardware.vehicle@2.0-manager-unit-tests/android.hardware.vehicle@2.0-manager-unit-tests | grep Obd2
Change-Id: I4e9a116555001d2577d50d50009f75d8f78603b0
diff --git a/vehicle/2.0/default/impl/DefaultConfig.h b/vehicle/2.0/default/impl/DefaultConfig.h
index 12c1c1b..f4e1e53 100644
--- a/vehicle/2.0/default/impl/DefaultConfig.h
+++ b/vehicle/2.0/default/impl/DefaultConfig.h
@@ -165,12 +165,14 @@
.prop = VehicleProperty::OBD2_LIVE_FRAME,
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ .configArray = {0,0}
},
{
.prop = VehicleProperty::OBD2_FREEZE_FRAME,
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ .configArray = {0,0}
}
};