diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 067a006..7abdfb0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -667,7 +667,23 @@ void on_event(const char *event, struct json_object *object){ // Analyze low can signal g_afb_instance->lcc_.analyzeCanSignal(object); - if (g_afb_instance->lcc_.isChangedCarState()) { + if (g_afb_instance->lcc_.isChangedParkingBrakeState()) { + // If parking brake state is changed + HMI_DEBUG("wm", "Parking Brake state is changed"); + + // Get parking brake state + const char* parking_brake_state = g_afb_instance->lcc_.getCurrentParkingBrakeState(); + + // Allocate window resource + g_afb_instance->app.allocateWindowResource(parking_brake_state, nullptr, + nullptr, nullptr, + [](const char* errmsg){ + if (errmsg != nullptr) { + HMI_ERROR("wm", errmsg); + } + }); + } + else if (g_afb_instance->lcc_.isChangedCarState()) { // If car state is changed HMI_DEBUG("wm", "Car state is changed"); |