Always On Lateral

Co-Authored-By: Jacob Pfeifer <jacob@pfeifer.dev>
This commit is contained in:
James
2025-12-01 12:00:00 -07:00
parent aa47ad829f
commit c8ba3e3b9e
49 changed files with 372 additions and 22 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ void ExperimentalButton::changeMode() {
void ExperimentalButton::updateState(const UIState &s, const FrogPilotUIState &fs) {
const auto cs = (*s.sm)["selfdriveState"].getSelfdriveState();
bool eng = cs.getEngageable() || cs.getEnabled();
bool eng = cs.getEngageable() || cs.getEnabled() || fs.frogpilot_scene.always_on_lateral_active;
if ((cs.getExperimentalMode() != experimental_mode) || (eng != engageable)) {
engageable = eng;
experimental_mode = cs.getExperimentalMode();
+2
View File
@@ -97,6 +97,8 @@ void UIState::updateStatus(FrogPilotUIState *fs) {
if (state == cereal::SelfdriveState::OpenpilotState::PRE_ENABLED || state == cereal::SelfdriveState::OpenpilotState::OVERRIDING) {
status = STATUS_OVERRIDE;
} else if (frogpilot_scene.always_on_lateral_active) {
status = STATUS_ALWAYS_ON_LATERAL_ACTIVE;
} else {
status = ss.getEnabled() ? STATUS_ENGAGED : STATUS_DISENGAGED;
}
+2
View File
@@ -46,6 +46,7 @@ typedef enum UIStatus {
STATUS_ENGAGED,
// FrogPilot variables
STATUS_ALWAYS_ON_LATERAL_ACTIVE,
STATUS_EXPERIMENTAL_MODE_ENABLED,
} UIStatus;
@@ -55,6 +56,7 @@ const QColor bg_colors [] = {
[STATUS_ENGAGED] = QColor(0x17, 0x86, 0x44, 0xf1),
// FrogPilot variables
[STATUS_ALWAYS_ON_LATERAL_ACTIVE] = QColor(0x0a, 0xba, 0xb5, 0xf1),
[STATUS_EXPERIMENTAL_MODE_ENABLED] = QColor(0xda, 0x6f, 0x25, 0xf1),
};