From 2063ff2d71c8971831034587cdba232a7c590383 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 8 Dec 2021 13:58:06 -0800 Subject: [PATCH] UI: remove burn in prevention (#23173) old-commit-hash: 755ec71c051b20238185039a0d85272a7c9a66d6 --- selfdrive/ui/ui.cc | 11 ----------- selfdrive/ui/ui.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 53d73c1043..38c08eb484 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -106,7 +106,6 @@ static void update_sockets(UIState *s) { static void update_state(UIState *s) { SubMaster &sm = *(s->sm); UIScene &scene = s->scene; - s->running_time = 1e-9 * (nanos_since_boot() - sm["deviceState"].getDeviceState().getStartedMonoTime()); if (sm.updated("modelV2")) { update_model(s, sm["modelV2"].getModelV2()); @@ -290,16 +289,6 @@ void Device::updateBrightness(const UIState &s) { // Scale back to 10% to 100% clipped_brightness = std::clamp(100.0f * clipped_brightness, 10.0f, 100.0f); - - // Limit brightness if running for too long - if (Hardware::TICI()) { - const float MAX_BRIGHTNESS_HOURS = 4; - const float HOURLY_BRIGHTNESS_DECREASE = 5; - float ui_running_hours = s.running_time / (60*60); - float anti_burnin_max_percent = std::clamp(100.0f - HOURLY_BRIGHTNESS_DECREASE * (ui_running_hours - MAX_BRIGHTNESS_HOURS), - 30.0f, 100.0f); - clipped_brightness = std::min(clipped_brightness, anti_burnin_max_percent); - } } int brightness = brightness_filter.update(clipped_brightness); diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index fe9e96462f..4b4ef0bb28 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -114,8 +114,6 @@ typedef struct UIState { QTransform car_space_transform; bool wide_camera; - - float running_time; } UIState;