diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/vehicle_info_plugin/src')
2 files changed, 14 insertions, 2 deletions
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc index 17a450ca89..18149fbe02 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc @@ -126,6 +126,12 @@ void GetVehicleDataRequest::on_event(const event_engine::Event& event) { std::string response_info; GetInfo(message, response_info); + if (message[strings::msg_params].keyExists(strings::tire_pressure)) { + ApplicationSharedPtr app = + application_manager_.application(connection_key()); + MessageHelper::AddDefaultParamsToTireStatus(app, message); + } + auto data_not_available_with_params = [this, &result_code, &message]() { if (hmi_apis::Common_Result::DATA_NOT_AVAILABLE != result_code) { return false; diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc index e062728217..0ae38a9398 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc @@ -89,16 +89,22 @@ void OnVehicleDataNotification::Run() { SDL_LOG_ERROR("NULL pointer"); continue; } + + smart_objects::SmartObject output_message = *message_; + if (strings::tire_pressure == name) { + MessageHelper::AddDefaultParamsToTireStatus(app, output_message); + } + notified_app_it = find(notify_apps.begin(), notify_apps.end(), app); if (notified_app_it == notify_apps.end()) { notify_apps.push_back(app); smart_objects::SmartObject msg_param = smart_objects::SmartObject(smart_objects::SmartType_Map); - msg_param[name] = (*message_)[strings::msg_params][name]; + msg_param[name] = output_message[strings::msg_params][name]; appSO.push_back(msg_param); } else { size_t idx = std::distance(notify_apps.begin(), notified_app_it); - appSO[idx][name] = (*message_)[strings::msg_params][name]; + appSO[idx][name] = output_message[strings::msg_params][name]; } } } |