X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=inline;f=src%2Fmain.cpp;h=99e7a7c259df6d63b5dc1ac4698fc4833155bb37;hb=160b8947d684ce037120cf5237bd221bd9ea9785;hp=7abdfb0a4a31f396217480bd1f9b05eda4a7fddc;hpb=f73c5f5ff5cd4b424eed1a757c7bc8d3e34ec0e9;p=apps%2Fagl-service-windowmanager.git 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");