diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index bbdd6d4f30..5eb1f9194c 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -198,10 +198,13 @@ void UIState::updateStatus() { if (scene.started && sm->updated("controlsState")) { auto controls_state = (*sm)["controlsState"].getControlsState(); auto alert_status = controls_state.getAlertStatus(); + auto state = controls_state.getState(); if (alert_status == cereal::ControlsState::AlertStatus::USER_PROMPT) { status = STATUS_WARNING; } else if (alert_status == cereal::ControlsState::AlertStatus::CRITICAL) { status = STATUS_ALERT; + } else if (state == cereal::ControlsState::OpenpilotState::PRE_ENABLED) { + status = STATUS_OVERRIDE; } else { status = controls_state.getEnabled() ? STATUS_ENGAGED : STATUS_DISENGAGED; } diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index 382a7df5ed..49ced57ea2 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -73,6 +73,7 @@ struct Alert { typedef enum UIStatus { STATUS_DISENGAGED, + STATUS_OVERRIDE, STATUS_ENGAGED, STATUS_WARNING, STATUS_ALERT, @@ -80,6 +81,7 @@ typedef enum UIStatus { const QColor bg_colors [] = { [STATUS_DISENGAGED] = QColor(0x17, 0x33, 0x49, 0xc8), + [STATUS_OVERRIDE] = QColor(0x91, 0x9b, 0x95, 0xf1), [STATUS_ENGAGED] = QColor(0x17, 0x86, 0x44, 0xf1), [STATUS_WARNING] = QColor(0xDA, 0x6F, 0x25, 0xf1), [STATUS_ALERT] = QColor(0xC9, 0x22, 0x31, 0xf1),