This commit is contained in:
concordia
2024-05-02 21:09:07 -05:00
parent 0f7aa64d3b
commit dc561e3c2d
2 changed files with 31 additions and 33 deletions

View File

@@ -107,17 +107,6 @@ struct Alert {
}
};
typedef enum UIStatus {
STATUS_DISENGAGED,
STATUS_OVERRIDE,
STATUS_ENGAGED,
// FrogPilot statuses
STATUS_ALWAYS_ON_LATERAL_ACTIVE,
STATUS_TRAFFIC_MODE_ACTIVE,
} UIStatus;
enum PrimeType {
UNKNOWN = -1,
NONE = 0,
@@ -127,15 +116,25 @@ enum PrimeType {
MAGENTA_NEW = 4,
PURPLE = 5,
};
// Clearpilot redefined these.
typedef enum UIStatus {
STATUS_DISENGAGED,
STATUS_OVERRIDE,
STATUS_ENGAGED,
STATUS_ALWAYS_ON_LATERAL_ACTIVE,
STATUS_TRAFFIC_MODE_ACTIVE,
STATUS_EXPERIMENTAL_ACTIVE,
} UIStatus;
// Clearpilot custom colors
const QColor bg_colors [] = {
[STATUS_DISENGAGED] = QColor(0x17, 0x33, 0x49, 0xc8),
[STATUS_OVERRIDE] = QColor(0x91, 0x7b, 0x7b, 0xf1),
[STATUS_ENGAGED] = QColor(0x91, 0x7b, 0x7b, 0xf1), // CLEARPILOT changed to redish gray
// FrogPilot colors
[STATUS_ALWAYS_ON_LATERAL_ACTIVE] = QColor(0x91, 0x7b, 0x7b, 0xf1), // CLEARPILOT changed to dark blue
[STATUS_TRAFFIC_MODE_ACTIVE] = QColor(0xc9, 0x22, 0x31, 0xf1),
[STATUS_OVERRIDE] = QColor(218, 112, 36, 0xd1), // When you nudge the steering wheel while engaged
[STATUS_ENGAGED] = QColor(218, 112, 36, 0xd1), // Orange
[STATUS_ALWAYS_ON_LATERAL_ACTIVE] = QColor(158, 126, 111, 0xd1), // Gray
[STATUS_TRAFFIC_MODE_ACTIVE] = QColor(0xc9, 0x22, 0x31, 0xd1), // ? unused?
[STATUS_EXPERIMENTAL_ACTIVE] = QColor(126, 32, 128, 0xd1), // Magenta
};
static std::map<cereal::ControlsState::AlertStatus, QColor> alert_colors = {