aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp18
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");