Skip to content

Commit

Permalink
ui: Rename mapVisible to splitPanelVisible (commaai#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyhaibin authored Sep 12, 2023
1 parent d857c01 commit dbbb20a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions selfdrive/ui/qt/onroad.cc
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
car_state.getCruiseState().getAvailable();
gacTr = s.scene.gac_tr;

mapVisible = s.scene.map_visible;
splitPanelVisible = s.scene.map_visible;

// ############################## DEV UI START ##############################
lead_d_rel = radar_state.getLeadOne().getDRel();
Expand Down Expand Up @@ -794,7 +794,7 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
if (!reversing) {
// ####### 1 ROW #######
QRect bar_rect1(rect().left(), rect().bottom() - 60, rect().width(), 61);
if (devUiEnabled && !mapVisible && devUiInfo == 1) {
if (devUiEnabled && !splitPanelVisible && devUiInfo == 1) {
p.setPen(Qt::NoPen);
p.setBrush(QColor(0, 0, 0, 100));
p.drawRect(bar_rect1);
Expand All @@ -808,15 +808,15 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
}

int rn_btn = 0;
rn_btn = devUiEnabled && !mapVisible && devUiInfo == 1 ? 30 : 0;
rn_btn = devUiEnabled && !splitPanelVisible && devUiInfo == 1 ? 30 : 0;
uiState()->scene.rn_offset = rn_btn;

if (gac) {
drawGacButton(p, uiState()->scene.gac_btn, (rect().bottom() - (UI_BORDER_SIZE + btn_size / 2) - 75) - rn_btn, 150, 150);
}

// Stand Still Timer
if (standStillTimer && standStill && !mapVisible) {
if (standStillTimer && standStill && !splitPanelVisible) {
drawStandstillTimer(p, rect().right() - 650, 30 + 160 + 250);
}

Expand Down Expand Up @@ -1849,10 +1849,10 @@ void AnnotatedCameraWidget::paintEvent(QPaintEvent *event) {
blinker_frame++;
int state = blinkerPulse(blinker_frame);
if (left_blinker) {
drawLeftTurnSignal(painter, rect().center().x() - 300, mapVisible ? 210 : 90, state);
drawLeftTurnSignal(painter, rect().center().x() - 300, splitPanelVisible ? 210 : 90, state);
}
if (right_blinker) {
drawRightTurnSignal(painter, rect().center().x() + 180, mapVisible ? 210 : 90, state);
drawRightTurnSignal(painter, rect().center().x() + 180, splitPanelVisible ? 210 : 90, state);
}
} else {
blinker_frame = 0;
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/ui/qt/onroad.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class AnnotatedCameraWidget : public CameraWidget {
bool gac;
int gacTr;

bool mapVisible;
bool splitPanelVisible;

// ############################## DEV UI START ##############################
bool lead_status;
Expand Down

0 comments on commit dbbb20a

Please sign in to comment.