This commit is contained in:
Your Name
2024-05-17 09:49:46 -05:00
parent 1ff14d346f
commit 22f88bb093
7 changed files with 184 additions and 232 deletions

View File

@@ -30,6 +30,7 @@ typedef enum UIStatus {
STATUS_TRAFFIC_MODE_ACTIVE,
STATUS_EXPERIMENTAL_ACTIVE,
CENTER_LANE_COLOR,
CHANGE_LANE_PATH_COLOR,
} UIStatus;
// Clearpilot new alpha constants
@@ -39,16 +40,18 @@ const float OTHER_LANE_ALPHA = 0.75;
const int CENTER_LANE_WIDTH = 70;
const int OTHER_LANE_WIDTH = 16;
const ACTIVE_COLOR = QColor(189, 199, 252, 0xd1);
// Clearpilot custom colors
const QColor bg_colors [] = {
[STATUS_DISENGAGED] = QColor(0x17, 0x33, 0x49, 0xc8),
[STATUS_OVERRIDE] = QColor(94, 112, 255, 0xd1),
[STATUS_ENGAGED] = QColor(76, 97, 255, 0xd1),
[STATUS_ALWAYS_ON_LATERAL_ACTIVE] = QColor(209, 215, 250, 0xd1),
// [STATUS_ALWAYS_ON_LATERAL_ACTIVE] = QColor(184, 193, 255, 0xd1),
[STATUS_TRAFFIC_MODE_ACTIVE] = QColor(0xc9, 0x22, 0x31, 0xd1), // ? unused?
[STATUS_EXPERIMENTAL_ACTIVE] = QColor(201, 41, 204, 0xd1), // Magenta
[CENTER_LANE_COLOR] = QColor(150, 150, 150, 0xd1), // Gray
[STATUS_OVERRIDE] = ACTIVE_COLOR,
[STATUS_ENGAGED] = ACTIVE_COLOR,
[STATUS_ALWAYS_ON_LATERAL_ACTIVE] = ACTIVE_COLOR,
[STATUS_TRAFFIC_MODE_ACTIVE] = ACTIVE_COLOR,
[STATUS_EXPERIMENTAL_ACTIVE] = QColor(201, 41, 204, 0xd1),
[CENTER_LANE_COLOR] = QColor(150, 150, 150, 0xd1),
[CHANGE_LANE_PATH_COLOR] = QColor(245, 241, 93, 0xd1),
};
static std::map<cereal::ControlsState::AlertStatus, QColor> alert_colors = {