wip
This commit is contained in:
@@ -213,6 +213,14 @@ void OnroadWindow::paintEvent(QPaintEvent *event) {
|
||||
}
|
||||
}
|
||||
|
||||
void OnroadWindow::update_screen_on_off() {
|
||||
int screenDisaplayMode = paramsMemory.getInt("ScreenDisaplayMode");
|
||||
if (screenDisaplayMode == 1) {
|
||||
// Conditionally off
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ***** onroad widgets *****
|
||||
|
||||
// OnroadAlerts
|
||||
@@ -374,7 +382,19 @@ if (edgeColor != bgColor) {
|
||||
}
|
||||
|
||||
void AnnotatedCameraWidget::drawHud(QPainter &p) {
|
||||
// Blank when screenDisplayMode=1
|
||||
p.save();
|
||||
|
||||
int screenDisaplayMode = paramsMemory.getInt("ScreenDisaplayMode");
|
||||
if (screenDisaplayMode == 1 && !alert->isVisible()) {
|
||||
// Draw black, filled, full-size rectangle to blank the screen
|
||||
// p.fillRect(0, 0, width(), height(), Qt::black);
|
||||
// p.restore();
|
||||
Hardware::set_display_power(false);
|
||||
return;
|
||||
} else {
|
||||
Hardware::set_display_power(true);
|
||||
}
|
||||
|
||||
// Header gradient
|
||||
QLinearGradient bg(0, UI_HEADER_HEIGHT - (UI_HEADER_HEIGHT / 2.5), 0, UI_HEADER_HEIGHT);
|
||||
|
||||
Reference in New Issue
Block a user