diff options
author | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-05-14 17:04:28 +0900 |
---|---|---|
committer | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-05-14 17:04:28 +0900 |
commit | 701f1ff00b3b6cf5f5a50b4cf3f65e176cb26460 (patch) | |
tree | 0a5978ce85085f52357531cb5438d3ec1f47afe2 /src/layout_manager | |
parent | b126caef1760902eb863af8ea892c4db9b9663f9 (diff) |
Change the policy of switchng car run/stop in dummy stm
Change-Id: Ie3770060828f32749e7c47076d901263454e43c2
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src/layout_manager')
-rw-r--r-- | src/layout_manager/layout.cpp | 27 |
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 |