Skip to content

Commit dbbb20a

Browse files
authored
ui: Rename mapVisible to splitPanelVisible (commaai#250)
1 parent d857c01 commit dbbb20a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

selfdrive/ui/qt/onroad.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
477477
car_state.getCruiseState().getAvailable();
478478
gacTr = s.scene.gac_tr;
479479

480-
mapVisible = s.scene.map_visible;
480+
splitPanelVisible = s.scene.map_visible;
481481

482482
// ############################## DEV UI START ##############################
483483
lead_d_rel = radar_state.getLeadOne().getDRel();
@@ -794,7 +794,7 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
794794
if (!reversing) {
795795
// ####### 1 ROW #######
796796
QRect bar_rect1(rect().left(), rect().bottom() - 60, rect().width(), 61);
797-
if (devUiEnabled && !mapVisible && devUiInfo == 1) {
797+
if (devUiEnabled && !splitPanelVisible && devUiInfo == 1) {
798798
p.setPen(Qt::NoPen);
799799
p.setBrush(QColor(0, 0, 0, 100));
800800
p.drawRect(bar_rect1);
@@ -808,15 +808,15 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
808808
}
809809

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

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

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

@@ -1849,10 +1849,10 @@ void AnnotatedCameraWidget::paintEvent(QPaintEvent *event) {
18491849
blinker_frame++;
18501850
int state = blinkerPulse(blinker_frame);
18511851
if (left_blinker) {
1852-
drawLeftTurnSignal(painter, rect().center().x() - 300, mapVisible ? 210 : 90, state);
1852+
drawLeftTurnSignal(painter, rect().center().x() - 300, splitPanelVisible ? 210 : 90, state);
18531853
}
18541854
if (right_blinker) {
1855-
drawRightTurnSignal(painter, rect().center().x() + 180, mapVisible ? 210 : 90, state);
1855+
drawRightTurnSignal(painter, rect().center().x() + 180, splitPanelVisible ? 210 : 90, state);
18561856
}
18571857
} else {
18581858
blinker_frame = 0;

selfdrive/ui/qt/onroad.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class AnnotatedCameraWidget : public CameraWidget {
175175
bool gac;
176176
int gacTr;
177177

178-
bool mapVisible;
178+
bool splitPanelVisible;
179179

180180
// ############################## DEV UI START ##############################
181181
bool lead_status;

0 commit comments

Comments
 (0)