Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h +3 −3 Original line number Diff line number Diff line Loading @@ -28,9 +28,9 @@ namespace V2_0 { namespace impl { const VehicleProperty kHvacPowerProperties[] = { VehicleProperty::HVAC_FAN_SPEED, VehicleProperty::HVAC_FAN_DIRECTION, const int32_t kHvacPowerProperties[] = { toInt(VehicleProperty::HVAC_FAN_SPEED), toInt(VehicleProperty::HVAC_FAN_DIRECTION), }; const VehiclePropConfig kVehicleProperties[] = { Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp +9 −10 Original line number Diff line number Diff line Loading @@ -503,18 +503,17 @@ StatusCode DefaultVehicleHal::set(const VehiclePropValue& propValue) { StatusCode status; switch (propId) { default: if (mHvacPowerProps.find(VehicleProperty(propId)) != mHvacPowerProps.end()) { auto prop = mProps.find( std::make_pair(toInt(VehicleProperty::HVAC_POWER_ON), 0)); if (prop != mProps.end()) { if (prop->second->value.int32Values.size() == 1 && prop->second->value.int32Values[0] == 0) { if (mHvacPowerProps.count(propId)) { std::lock_guard<std::mutex> lock(mPropsMutex); auto hvacPowerOn = getVehiclePropValueLocked(toInt(VehicleProperty::HVAC_POWER_ON), toInt(VehicleAreaZone::ROW_1)); if (hvacPowerOn && hvacPowerOn->value.int32Values.size() == 1 && hvacPowerOn->value.int32Values[0] == 0) { status = StatusCode::NOT_AVAILABLE; break; } } } status = updateProperty(propValue); if (status == StatusCode::OK) { // Send property update to emulator Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.h +1 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ private: std::pair<int32_t /*VehicleProperty*/, int32_t /*areaId*/>, std::unique_ptr<VehiclePropValue>> mProps; std::atomic<int> mExit; std::unordered_set<VehicleProperty> mHvacPowerProps; std::unordered_set<int32_t> mHvacPowerProps; std::mutex mPropsMutex; std::thread mThread; std::unique_ptr<CommBase> mComm{nullptr}; Loading Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h +3 −3 Original line number Diff line number Diff line Loading @@ -28,9 +28,9 @@ namespace V2_0 { namespace impl { const VehicleProperty kHvacPowerProperties[] = { VehicleProperty::HVAC_FAN_SPEED, VehicleProperty::HVAC_FAN_DIRECTION, const int32_t kHvacPowerProperties[] = { toInt(VehicleProperty::HVAC_FAN_SPEED), toInt(VehicleProperty::HVAC_FAN_DIRECTION), }; const VehiclePropConfig kVehicleProperties[] = { Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp +9 −10 Original line number Diff line number Diff line Loading @@ -503,18 +503,17 @@ StatusCode DefaultVehicleHal::set(const VehiclePropValue& propValue) { StatusCode status; switch (propId) { default: if (mHvacPowerProps.find(VehicleProperty(propId)) != mHvacPowerProps.end()) { auto prop = mProps.find( std::make_pair(toInt(VehicleProperty::HVAC_POWER_ON), 0)); if (prop != mProps.end()) { if (prop->second->value.int32Values.size() == 1 && prop->second->value.int32Values[0] == 0) { if (mHvacPowerProps.count(propId)) { std::lock_guard<std::mutex> lock(mPropsMutex); auto hvacPowerOn = getVehiclePropValueLocked(toInt(VehicleProperty::HVAC_POWER_ON), toInt(VehicleAreaZone::ROW_1)); if (hvacPowerOn && hvacPowerOn->value.int32Values.size() == 1 && hvacPowerOn->value.int32Values[0] == 0) { status = StatusCode::NOT_AVAILABLE; break; } } } status = updateProperty(propValue); if (status == StatusCode::OK) { // Send property update to emulator Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.h +1 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ private: std::pair<int32_t /*VehicleProperty*/, int32_t /*areaId*/>, std::unique_ptr<VehiclePropValue>> mProps; std::atomic<int> mExit; std::unordered_set<VehicleProperty> mHvacPowerProps; std::unordered_set<int32_t> mHvacPowerProps; std::mutex mPropsMutex; std::thread mThread; std::unique_ptr<CommBase> mComm{nullptr}; Loading