aboutsummaryrefslogtreecommitdiffstats
path: root/src/layout_manager/layout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout_manager/layout.cpp')
-rw-r--r--src/layout_manager/layout.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/layout_manager/layout.cpp b/src/layout_manager/layout.cpp
index e469e30..6bec42d 100644
--- a/src/layout_manager/layout.cpp
+++ b/src/layout_manager/layout.cpp
@@ -69,21 +69,6 @@ bool LayoutManager::updateLayout(json_object* obj,
bool ret = false;
- // Check accelerator pedal state change
- json_object* json_accel_pedal;
- if (!json_object_object_get_ex(obj, "accel_pedal", &json_accel_pedal)) {
- HMI_ERROR("wm:lm", "Parse Error!!");
- return -1;
- }
-
- json_bool is_accel_pedal_state_changed;
- std::string accel_pedal_state = "";
- is_accel_pedal_state_changed = jh::getBoolFromJson(json_accel_pedal, "is_changed");
- if (is_accel_pedal_state_changed) {
- // If car state is changed, get car state
- accel_pedal_state = jh::getStringFromJson(json_accel_pedal, "state");
- }
-
// Check car state change
json_object* json_car;
if (!json_object_object_get_ex(obj, "car", &json_car)) {
@@ -127,11 +112,8 @@ bool LayoutManager::updateLayout(json_object* obj,
std::string prv_layout_name = this->prv_layers_[layer].begin()->first;
// If car state is changed car_stop -> car_run,
- // OR accel pedal state is changed accel_pedal_off -> accel_pedal_on,
// store current state for state of car stop
- if (((is_car_state_changed) && ("car_run" == car_state))
- || ((is_accel_pedal_state_changed)
- && ("accel_pedal_on" == accel_pedal_state))) {
+ if ((is_car_state_changed) && ("car_run" == car_state)) {
HMI_DEBUG("wm:lm", "Store current state for state of car stop");
this->prv_layers_car_stop_[layer] = this->crr_layers_[layer];
}
@@ -157,11 +139,8 @@ bool LayoutManager::updateLayout(json_object* obj,
HMI_DEBUG("wm:lm", "crr state: %s", crr_layout_name);
TypeLayouts crr_layout;
- if (((is_car_state_changed) && ("car_stop" == car_state))
- || ((is_accel_pedal_state_changed)
- && ("accel_pedal_off" == accel_pedal_state))) {
+ if ((is_car_state_changed) && ("car_stop" == car_state)) {
// If car state is changed car_run -> car_stop,
- // OR accel pedal state is changed accel_pedal_on -> accel_pedal_off,
// restore state of car stop
HMI_DEBUG("wm:lm", "Restore state of car stop");
crr_layout = this->prv_layers_car_stop_[layer];
@@ -188,7 +167,7 @@ bool LayoutManager::updateLayout(json_object* obj,
}
// Update role in new area
- if (is_car_state_changed || is_accel_pedal_state_changed) {
+ if (is_car_state_changed) {
// Updating role is not necessary
// because new_role is not specified
// when car or accel pedal state is changed