mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 15:58:43 +00:00
Merge "[hardware][interfaces][automotive] fix -Wreorder-init-list"
am: 0d5782e99e
Change-Id: I6cf4376bbcbf7ae19f1e8ebfd443b7f96a16d545
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -249,8 +249,8 @@ void EmulatedVehicleHal::onCreate() {
|
||||
|
||||
// Create a separate instance for each individual zone
|
||||
VehiclePropValue prop = {
|
||||
.prop = cfg.prop,
|
||||
.areaId = curArea,
|
||||
.areaId = curArea,
|
||||
.prop = cfg.prop,
|
||||
};
|
||||
|
||||
if (it.initialAreaValues.size() > 0) {
|
||||
|
||||
@@ -101,9 +101,11 @@ std::vector<VehiclePropValue> JsonFakeValueGenerator::parseFakeValueJson(std::is
|
||||
rawEvent.toStyledString().c_str());
|
||||
continue;
|
||||
}
|
||||
VehiclePropValue event = {.prop = rawEvent["prop"].asInt(),
|
||||
.areaId = rawEvent["areaId"].asInt(),
|
||||
.timestamp = rawEvent["timestamp"].asInt64()};
|
||||
VehiclePropValue event = {
|
||||
.timestamp = rawEvent["timestamp"].asInt64(),
|
||||
.areaId = rawEvent["areaId"].asInt(),
|
||||
.prop = rawEvent["prop"].asInt(),
|
||||
};
|
||||
|
||||
Json::Value rawEventValue = rawEvent["value"];
|
||||
auto& value = event.value;
|
||||
|
||||
@@ -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) {
|
||||
@@ -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(),
|
||||
.areaId = protoVal.area_id(),
|
||||
.status = (VehiclePropertyStatus)protoVal.status(),
|
||||
.timestamp = elapsedRealtimeNano(),
|
||||
.timestamp = elapsedRealtimeNano(),
|
||||
.areaId = protoVal.area_id(),
|
||||
.prop = protoVal.prop(),
|
||||
.status = (VehiclePropertyStatus)protoVal.status(),
|
||||
};
|
||||
|
||||
respMsg.set_msg_type(emulator::SET_PROPERTY_RESP);
|
||||
|
||||
Reference in New Issue
Block a user