diff options
author | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-05-11 13:23:53 +0900 |
---|---|---|
committer | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-05-11 13:23:53 +0900 |
commit | 160b8947d684ce037120cf5237bd221bd9ea9785 (patch) | |
tree | 7b523f91da6516502528ad737e13d9eda847fd12 /src/main.cpp | |
parent | f73c5f5ff5cd4b424eed1a757c7bc8d3e34ec0e9 (diff) |
LowCanClient can receive accelerator.pedal.position signal
Change-Id: Ia6d4ad7888ec764fcd8dec696f6eda9d826cb62d
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 7abdfb0..99e7a7c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -683,6 +683,24 @@ void on_event(const char *event, struct json_object *object){ } }); } + if (g_afb_instance->lcc_.isChangedAccelPedalState()) { + // If accelerator pedal state is changed + HMI_DEBUG("wm", "Accelerator Pedal state is changed"); + + // Get parking brake state + const char* accel_pedal_state = g_afb_instance->lcc_.getCurrentAccelPedalState(); + +#if 0 // TODO: PolicyManager can not use accelerator pedal state + // Allocate window resource + g_afb_instance->app.allocateWindowResource(accel_pedal_state, nullptr, + nullptr, nullptr, + [](const char* errmsg){ + if (errmsg != nullptr) { + HMI_ERROR("wm", errmsg); + } + }); +#endif + } else if (g_afb_instance->lcc_.isChangedCarState()) { // If car state is changed HMI_DEBUG("wm", "Car state is changed"); |