Merge "Add CarSensor properties to DefaultVehicleHal"
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 02f8438..3c17183 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
@@ -36,6 +36,30 @@
},
{
+ .prop = toInt(VehicleProperty::PERF_VEHICLE_SPEED),
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ },
+
+ {
+ .prop = toInt(VehicleProperty::CURRENT_GEAR),
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ },
+
+ {
+ .prop = toInt(VehicleProperty::PARKING_BRAKE_ON),
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ },
+
+ {
+ .prop = toInt(VehicleProperty::FUEL_LEVEL_LOW),
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ },
+
+ {
.prop = toInt(VehicleProperty::HVAC_POWER_ON),
.access = VehiclePropertyAccess::READ_WRITE,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp
index f020ba7..38e21c7 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp
@@ -361,6 +361,18 @@
case toInt(VehicleProperty::INFO_MAKE):
prop->value.stringValue = "Default Car";
break;
+ case toInt(VehicleProperty::PERF_VEHICLE_SPEED):
+ prop->value.floatValues[0] = 0;
+ break;
+ case toInt(VehicleProperty::CURRENT_GEAR):
+ prop->value.int32Values[0] = toInt(VehicleGear::GEAR_PARK);
+ break;
+ case toInt(VehicleProperty::PARKING_BRAKE_ON):
+ prop->value.int32Values[0] = 1;
+ break;
+ case toInt(VehicleProperty::FUEL_LEVEL_LOW):
+ prop->value.int32Values[0] = 0;
+ break;
case toInt(VehicleProperty::HVAC_POWER_ON):
prop->value.int32Values[0] = 1;
break;