Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h +702 −666 Original line number Diff line number Diff line Loading @@ -347,24 +347,33 @@ const ConfigDeclaration kVehicleProperties[]{ .initialValue = {.floatValues = {100.0f}}}, // units in meters {.config = {.prop = toInt(VehicleProperty::TIRE_PRESSURE), { .prop = toInt(VehicleProperty::TIRE_PRESSURE), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::CONTINUOUS, .minSampleRate = 1.0f, .maxSampleRate = 2.0f, .areaConfigs = {VehicleAreaConfig{ .areaId = WHEEL_FRONT_LEFT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, .areaConfigs = {VehicleAreaConfig{ .areaId = WHEEL_FRONT_LEFT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, }, VehicleAreaConfig{ .areaId = WHEEL_FRONT_RIGHT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, .areaId = WHEEL_FRONT_RIGHT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, }, VehicleAreaConfig{ .areaId = WHEEL_REAR_LEFT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, .areaId = WHEEL_REAR_LEFT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, }, VehicleAreaConfig{ .areaId = WHEEL_REAR_RIGHT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, }}}, .areaId = WHEEL_REAR_RIGHT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, }}, .minSampleRate = 1.0f, .maxSampleRate = 2.0f, }, .initialValue = {.floatValues = {200}}}, // units in kPa {.config = Loading Loading @@ -415,8 +424,10 @@ const ConfigDeclaration kVehicleProperties[]{ .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{.areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)}, VehicleAreaConfig{.areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}}, {VehicleAreaConfig{ .areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)}, VehicleAreaConfig{ .areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}}, .initialValue = {.int32Values = {0}} // Will be used for all areas. }, Loading Loading @@ -486,12 +497,17 @@ const ConfigDeclaration kVehicleProperties[]{ .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{ .areaId = SEAT_1_LEFT, .minInt32Value = 0, .maxInt32Value = 3, .areaId = SEAT_1_LEFT, .minInt32Value = 0, .maxInt32Value = 3, }, VehicleAreaConfig{ .areaId = SEAT_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 3, .areaId = SEAT_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 3, }}}, .initialValue = {.int32Values = {0}}}, // 0 is off and +ve values indicate ventilation level. .initialValue = {.int32Values = {0}}}, // 0 is off and +ve values indicate ventilation level. {.config = {.prop = toInt(VehicleProperty::HVAC_STEERING_WHEEL_HEAT), .access = VehiclePropertyAccess::READ_WRITE, Loading @@ -504,10 +520,14 @@ const ConfigDeclaration kVehicleProperties[]{ .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{ .areaId = SEAT_1_LEFT, .minInt32Value = -2, .maxInt32Value = 2, .areaId = SEAT_1_LEFT, .minInt32Value = -2, .maxInt32Value = 2, }, VehicleAreaConfig{ .areaId = SEAT_1_RIGHT, .minInt32Value = -2, .maxInt32Value = 2, .areaId = SEAT_1_RIGHT, .minInt32Value = -2, .maxInt32Value = 2, }}}, .initialValue = {.int32Values = {0}}}, // +ve values for heating and -ve for cooling Loading Loading @@ -538,11 +558,14 @@ const ConfigDeclaration kVehicleProperties[]{ }, .initialValue = {.floatValues = {25.0f}}}, {.config = {.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_DISPLAY_UNITS), {.config = { .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_DISPLAY_UNITS), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{.areaId = (0)}}, .configArray = {(int)VehicleUnit::FAHRENHEIT, (int)VehicleUnit::CELSIUS}, .areaConfigs = {VehicleAreaConfig{.areaId = (0)}}}, }, .initialValue = {.int32Values = {(int)VehicleUnit::FAHRENHEIT}}}, {.config = Loading Loading @@ -608,17 +631,22 @@ const ConfigDeclaration kVehicleProperties[]{ {DOOR_2_LEFT, {.int32Values = {1}}}, {DOOR_2_RIGHT, {.int32Values = {1}}}}}, {.config = { .prop = toInt(VehicleProperty::DOOR_POS), {.config = {.prop = toInt(VehicleProperty::DOOR_POS), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{.areaId = DOOR_1_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_2_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_2_RIGHT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_REAR, .minInt32Value = 0, .maxInt32Value = 1}}}, {VehicleAreaConfig{ .areaId = DOOR_1_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{ .areaId = DOOR_2_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_2_RIGHT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{ .areaId = DOOR_REAR, .minInt32Value = 0, .maxInt32Value = 1}}}, .initialValue = {.int32Values = {0}}}, {.config = {.prop = toInt(VehicleProperty::WINDOW_LOCK), Loading @@ -629,18 +657,24 @@ const ConfigDeclaration kVehicleProperties[]{ .initialAreaValues = {{WINDOW_1_RIGHT | WINDOW_2_LEFT | WINDOW_2_RIGHT, {.int32Values = {0}}}}}, {.config = {.prop = toInt(VehicleProperty::WINDOW_POS), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{.areaId = WINDOW_1_LEFT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_2_LEFT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_2_RIGHT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{ .areaId = WINDOW_ROOF_TOP_1, .minInt32Value = -10, .maxInt32Value = 10}}}, {.config = {.prop = toInt(VehicleProperty::WINDOW_POS), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{.areaId = WINDOW_1_LEFT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_2_LEFT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_2_RIGHT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_ROOF_TOP_1, .minInt32Value = -10, .maxInt32Value = 10}}}, .initialValue = {.int32Values = {0}}}, {.config = Loading Loading @@ -800,18 +834,20 @@ const ConfigDeclaration kVehicleProperties[]{ {.config = {.prop = VENDOR_EXTENSION_FLOAT_PROPERTY, .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{ .areaId = HVAC_LEFT, .minFloatValue = -10, .maxFloatValue = 10}, .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_LEFT, .minFloatValue = -10, .maxFloatValue = 10}, VehicleAreaConfig{.areaId = HVAC_RIGHT, .minFloatValue = -10, .maxFloatValue = 10}}}, .initialAreaValues = {{HVAC_LEFT, {.floatValues = {1}}}, {HVAC_RIGHT, {.floatValues = {2}}}}}, .initialAreaValues = {{HVAC_LEFT, {.floatValues = {1}}}, {HVAC_RIGHT, {.floatValues = {2}}}}}, {.config = {.prop = VENDOR_EXTENSION_INT_PROPERTY, .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{ .areaId = (int)VehicleAreaWindow::FRONT_WINDSHIELD, .areaConfigs = {VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::FRONT_WINDSHIELD, .minInt32Value = -100, .maxInt32Value = 100}, VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::REAR_WINDSHIELD, Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -249,8 +249,8 @@ void EmulatedVehicleHal::onCreate() { // Create a separate instance for each individual zone VehiclePropValue prop = { .prop = cfg.prop, .areaId = curArea, .prop = cfg.prop, }; if (it.initialAreaValues.size() > 0) { Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/JsonFakeValueGenerator.cpp +5 −3 Original line number Diff line number Diff line Loading @@ -101,9 +101,11 @@ std::vector<VehiclePropValue> JsonFakeValueGenerator::parseFakeValueJson(std::is rawEvent.toStyledString().c_str()); continue; } VehiclePropValue event = {.prop = rawEvent["prop"].asInt(), VehiclePropValue event = { .timestamp = rawEvent["timestamp"].asInt64(), .areaId = rawEvent["areaId"].asInt(), .timestamp = rawEvent["timestamp"].asInt64()}; .prop = rawEvent["prop"].asInt(), }; Json::Value rawEventValue = rawEvent["value"]; auto& value = event.value; Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/VehicleEmulator.cpp +8 −5 Original line number Diff line number Diff line Loading @@ -120,7 +120,10 @@ void VehicleEmulator::doGetProperty(VehicleEmulator::EmulatorMessage const& rxMs } { VehiclePropValue request = { .prop = propId, .areaId = areaId }; VehiclePropValue request = { .areaId = areaId, .prop = propId, }; StatusCode halStatus; auto val = mHal->get(request, &halStatus); if (val != nullptr) { Loading Loading @@ -150,10 +153,10 @@ void VehicleEmulator::doSetProperty(VehicleEmulator::EmulatorMessage const& rxMs VehicleEmulator::EmulatorMessage& respMsg) { emulator::VehiclePropValue protoVal = rxMsg.value(0); VehiclePropValue val = { .prop = protoVal.prop(), .timestamp = elapsedRealtimeNano(), .areaId = protoVal.area_id(), .prop = protoVal.prop(), .status = (VehiclePropertyStatus)protoVal.status(), .timestamp = elapsedRealtimeNano(), }; respMsg.set_msg_type(emulator::SET_PROPERTY_RESP); Loading Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h +702 −666 Original line number Diff line number Diff line Loading @@ -347,24 +347,33 @@ const ConfigDeclaration kVehicleProperties[]{ .initialValue = {.floatValues = {100.0f}}}, // units in meters {.config = {.prop = toInt(VehicleProperty::TIRE_PRESSURE), { .prop = toInt(VehicleProperty::TIRE_PRESSURE), .access = VehiclePropertyAccess::READ, .changeMode = VehiclePropertyChangeMode::CONTINUOUS, .minSampleRate = 1.0f, .maxSampleRate = 2.0f, .areaConfigs = {VehicleAreaConfig{ .areaId = WHEEL_FRONT_LEFT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, .areaConfigs = {VehicleAreaConfig{ .areaId = WHEEL_FRONT_LEFT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, }, VehicleAreaConfig{ .areaId = WHEEL_FRONT_RIGHT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, .areaId = WHEEL_FRONT_RIGHT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, }, VehicleAreaConfig{ .areaId = WHEEL_REAR_LEFT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, .areaId = WHEEL_REAR_LEFT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, }, VehicleAreaConfig{ .areaId = WHEEL_REAR_RIGHT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, }}}, .areaId = WHEEL_REAR_RIGHT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f, }}, .minSampleRate = 1.0f, .maxSampleRate = 2.0f, }, .initialValue = {.floatValues = {200}}}, // units in kPa {.config = Loading Loading @@ -415,8 +424,10 @@ const ConfigDeclaration kVehicleProperties[]{ .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{.areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)}, VehicleAreaConfig{.areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}}, {VehicleAreaConfig{ .areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)}, VehicleAreaConfig{ .areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}}, .initialValue = {.int32Values = {0}} // Will be used for all areas. }, Loading Loading @@ -486,12 +497,17 @@ const ConfigDeclaration kVehicleProperties[]{ .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{ .areaId = SEAT_1_LEFT, .minInt32Value = 0, .maxInt32Value = 3, .areaId = SEAT_1_LEFT, .minInt32Value = 0, .maxInt32Value = 3, }, VehicleAreaConfig{ .areaId = SEAT_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 3, .areaId = SEAT_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 3, }}}, .initialValue = {.int32Values = {0}}}, // 0 is off and +ve values indicate ventilation level. .initialValue = {.int32Values = {0}}}, // 0 is off and +ve values indicate ventilation level. {.config = {.prop = toInt(VehicleProperty::HVAC_STEERING_WHEEL_HEAT), .access = VehiclePropertyAccess::READ_WRITE, Loading @@ -504,10 +520,14 @@ const ConfigDeclaration kVehicleProperties[]{ .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{ .areaId = SEAT_1_LEFT, .minInt32Value = -2, .maxInt32Value = 2, .areaId = SEAT_1_LEFT, .minInt32Value = -2, .maxInt32Value = 2, }, VehicleAreaConfig{ .areaId = SEAT_1_RIGHT, .minInt32Value = -2, .maxInt32Value = 2, .areaId = SEAT_1_RIGHT, .minInt32Value = -2, .maxInt32Value = 2, }}}, .initialValue = {.int32Values = {0}}}, // +ve values for heating and -ve for cooling Loading Loading @@ -538,11 +558,14 @@ const ConfigDeclaration kVehicleProperties[]{ }, .initialValue = {.floatValues = {25.0f}}}, {.config = {.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_DISPLAY_UNITS), {.config = { .prop = toInt(VehicleProperty::HVAC_TEMPERATURE_DISPLAY_UNITS), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{.areaId = (0)}}, .configArray = {(int)VehicleUnit::FAHRENHEIT, (int)VehicleUnit::CELSIUS}, .areaConfigs = {VehicleAreaConfig{.areaId = (0)}}}, }, .initialValue = {.int32Values = {(int)VehicleUnit::FAHRENHEIT}}}, {.config = Loading Loading @@ -608,17 +631,22 @@ const ConfigDeclaration kVehicleProperties[]{ {DOOR_2_LEFT, {.int32Values = {1}}}, {DOOR_2_RIGHT, {.int32Values = {1}}}}}, {.config = { .prop = toInt(VehicleProperty::DOOR_POS), {.config = {.prop = toInt(VehicleProperty::DOOR_POS), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{.areaId = DOOR_1_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_2_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_2_RIGHT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_REAR, .minInt32Value = 0, .maxInt32Value = 1}}}, {VehicleAreaConfig{ .areaId = DOOR_1_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{ .areaId = DOOR_2_LEFT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{.areaId = DOOR_2_RIGHT, .minInt32Value = 0, .maxInt32Value = 1}, VehicleAreaConfig{ .areaId = DOOR_REAR, .minInt32Value = 0, .maxInt32Value = 1}}}, .initialValue = {.int32Values = {0}}}, {.config = {.prop = toInt(VehicleProperty::WINDOW_LOCK), Loading @@ -629,18 +657,24 @@ const ConfigDeclaration kVehicleProperties[]{ .initialAreaValues = {{WINDOW_1_RIGHT | WINDOW_2_LEFT | WINDOW_2_RIGHT, {.int32Values = {0}}}}}, {.config = {.prop = toInt(VehicleProperty::WINDOW_POS), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{.areaId = WINDOW_1_LEFT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_2_LEFT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_2_RIGHT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{ .areaId = WINDOW_ROOF_TOP_1, .minInt32Value = -10, .maxInt32Value = 10}}}, {.config = {.prop = toInt(VehicleProperty::WINDOW_POS), .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{.areaId = WINDOW_1_LEFT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_2_LEFT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_2_RIGHT, .minInt32Value = 0, .maxInt32Value = 10}, VehicleAreaConfig{.areaId = WINDOW_ROOF_TOP_1, .minInt32Value = -10, .maxInt32Value = 10}}}, .initialValue = {.int32Values = {0}}}, {.config = Loading Loading @@ -800,18 +834,20 @@ const ConfigDeclaration kVehicleProperties[]{ {.config = {.prop = VENDOR_EXTENSION_FLOAT_PROPERTY, .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{ .areaId = HVAC_LEFT, .minFloatValue = -10, .maxFloatValue = 10}, .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_LEFT, .minFloatValue = -10, .maxFloatValue = 10}, VehicleAreaConfig{.areaId = HVAC_RIGHT, .minFloatValue = -10, .maxFloatValue = 10}}}, .initialAreaValues = {{HVAC_LEFT, {.floatValues = {1}}}, {HVAC_RIGHT, {.floatValues = {2}}}}}, .initialAreaValues = {{HVAC_LEFT, {.floatValues = {1}}}, {HVAC_RIGHT, {.floatValues = {2}}}}}, {.config = {.prop = VENDOR_EXTENSION_INT_PROPERTY, .access = VehiclePropertyAccess::READ_WRITE, .changeMode = VehiclePropertyChangeMode::ON_CHANGE, .areaConfigs = {VehicleAreaConfig{ .areaId = (int)VehicleAreaWindow::FRONT_WINDSHIELD, .areaConfigs = {VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::FRONT_WINDSHIELD, .minInt32Value = -100, .maxInt32Value = 100}, VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::REAR_WINDSHIELD, Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -249,8 +249,8 @@ void EmulatedVehicleHal::onCreate() { // Create a separate instance for each individual zone VehiclePropValue prop = { .prop = cfg.prop, .areaId = curArea, .prop = cfg.prop, }; if (it.initialAreaValues.size() > 0) { Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/JsonFakeValueGenerator.cpp +5 −3 Original line number Diff line number Diff line Loading @@ -101,9 +101,11 @@ std::vector<VehiclePropValue> JsonFakeValueGenerator::parseFakeValueJson(std::is rawEvent.toStyledString().c_str()); continue; } VehiclePropValue event = {.prop = rawEvent["prop"].asInt(), VehiclePropValue event = { .timestamp = rawEvent["timestamp"].asInt64(), .areaId = rawEvent["areaId"].asInt(), .timestamp = rawEvent["timestamp"].asInt64()}; .prop = rawEvent["prop"].asInt(), }; Json::Value rawEventValue = rawEvent["value"]; auto& value = event.value; Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/VehicleEmulator.cpp +8 −5 Original line number Diff line number Diff line Loading @@ -120,7 +120,10 @@ void VehicleEmulator::doGetProperty(VehicleEmulator::EmulatorMessage const& rxMs } { VehiclePropValue request = { .prop = propId, .areaId = areaId }; VehiclePropValue request = { .areaId = areaId, .prop = propId, }; StatusCode halStatus; auto val = mHal->get(request, &halStatus); if (val != nullptr) { Loading Loading @@ -150,10 +153,10 @@ void VehicleEmulator::doSetProperty(VehicleEmulator::EmulatorMessage const& rxMs VehicleEmulator::EmulatorMessage& respMsg) { emulator::VehiclePropValue protoVal = rxMsg.value(0); VehiclePropValue val = { .prop = protoVal.prop(), .timestamp = elapsedRealtimeNano(), .areaId = protoVal.area_id(), .prop = protoVal.prop(), .status = (VehiclePropertyStatus)protoVal.status(), .timestamp = elapsedRealtimeNano(), }; respMsg.set_msg_type(emulator::SET_PROPERTY_RESP); Loading