diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 5d6b6c5722..a9c593b558 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -326,7 +326,7 @@ void Device::resetInteractiveTimeout(int timeout) { void Device::updateBrightness(const UIState &s) { clipped_brightness = offroad_brightness; - if (s.scene.started && s.scene.light_sensor > 0) { + if (s.scene.started && s.scene.light_sensor >= 0) { clipped_brightness = s.scene.light_sensor; // CIE 1931 - https://www.photonstophotos.net/GeneralTopics/Exposure/Psychometric_Lightness_and_Gamma.htm @@ -337,7 +337,7 @@ void Device::updateBrightness(const UIState &s) { } // Scale back to 10% to 100% - clipped_brightness = std::clamp(100.0f * clipped_brightness, 10.0f, 100.0f); + clipped_brightness = std::clamp(100.0f * clipped_brightness, 5.0f, 100.0f); } RETURN_IF_SUNNYPILOT @@ -377,4 +377,4 @@ Device *device() { static Device _device; return &_device; } -#endif \ No newline at end of file +#endif