stm_state_t g_prv_state;
int g_prv_restriction_state_car_stop = 0;
int g_prv_apps_state_car_stop = 0;
+int g_map_is_activated = STM_FALSE;
void stmInitialize() {
// Initialize previous state
// Update apps layer
g_prv_apps_state_car_stop = apps_state;
- g_crr_state.layer.apps.state = gStmLayoutNoM1;
- g_crr_state.layer.apps.is_changed = STM_TRUE;
+ if (STM_TRUE == g_map_is_activated) {
+ g_crr_state.layer.apps.state = gStmLayoutNoM1;
+ g_crr_state.layer.apps.is_changed = STM_TRUE;
+ }
}
}
else {
g_crr_state.layer.restriction.is_changed = STM_TRUE;
// Update apps layer
- g_crr_state.layer.apps.state = g_prv_apps_state_car_stop;
- g_crr_state.layer.apps.is_changed = STM_TRUE;
+ if (STM_TRUE == g_map_is_activated) {
+ g_crr_state.layer.apps.state = g_prv_apps_state_car_stop;
+ g_crr_state.layer.apps.is_changed = STM_TRUE;
+ }
}
}
}
// Copy current state for return
memcpy(state, &g_crr_state, sizeof(g_crr_state));
+ if ((STM_FALSE == g_map_is_activated)
+ && (STM_TRUE == g_crr_state.layer.apps.is_changed)
+ && ((gStmLayoutNoM1 == g_crr_state.layer.apps.state)
+ || (gStmLayoutNoM2 == g_crr_state.layer.apps.state)
+ || (gStmLayoutNoMf == g_crr_state.layer.apps.state))) {
+ g_map_is_activated = STM_TRUE;
+ }
+
return 0;
}