aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.cpp
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2018-05-14 13:10:00 +0900
committerYuta Doi <yuta-d@witz-inc.co.jp>2018-05-14 13:10:00 +0900
commitb126caef1760902eb863af8ea892c4db9b9663f9 (patch)
treeb70b06dd54bb585ab29d9109e9e608754ef1a0f8 /src/app.cpp
parent3a3f1ddf5c67403d61341034d5d189d13a900474 (diff)
Add policy of switchng accel pedal status to dummy stm
Change-Id: Iea389d3899f2d01430400374ed0ab0f2fe882ec8 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src/app.cpp')
-rw-r--r--src/app.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app.cpp b/src/app.cpp
index 07aab0b..296ce35 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -386,6 +386,13 @@ void App::allocateWindowResource(char const *event, char const *drawing_name,
}
}
+ // Check accelerator pedal state
+ json_object* json_accel_pedal;
+ if (!json_object_object_get_ex(json_out, "accel_pedal", &json_accel_pedal)) {
+ reply("Not found key \"accel_pedal\"");
+ return;
+ }
+
// Check car state
json_object* json_car;
if (!json_object_object_get_ex(json_out, "car", &json_car)) {