Visuals - Screen Management - Screen Brightness
Customize your screen brightness when offroad.
This commit is contained in:
parent
3624eb2e7a
commit
f0763c6c31
|
@ -433,6 +433,7 @@ void ui_update_frogpilot_params(UIState *s, Params ¶ms) {
|
|||
scene.hide_alerts = hide_ui_elements && params.getBool("HideAlerts");
|
||||
scene.hide_map_icon = hide_ui_elements && params.getBool("HideMapIcon");
|
||||
scene.hide_max_speed = hide_ui_elements && params.getBool("HideMaxSpeed");
|
||||
scene.screen_brightness = screen_management ? params.getInt("ScreenBrightness") : 101;
|
||||
|
||||
scene.speed_limit_controller = scene.longitudinal_control && params.getBool("SpeedLimitController");
|
||||
scene.show_slc_offset = scene.speed_limit_controller && params.getBool("ShowSLCOffset");
|
||||
|
@ -602,6 +603,8 @@ void Device::updateBrightness(const UIState &s) {
|
|||
int brightness = brightness_filter.update(clipped_brightness);
|
||||
if (!awake) {
|
||||
brightness = 0;
|
||||
} else if (s.scene.screen_brightness != 101) {
|
||||
brightness = s.scene.screen_brightness;
|
||||
}
|
||||
|
||||
if (brightness != last_brightness) {
|
||||
|
|
|
@ -248,6 +248,7 @@ typedef struct UIScene {
|
|||
int model_length;
|
||||
int obstacle_distance;
|
||||
int obstacle_distance_stock;
|
||||
int screen_brightness;
|
||||
int started_timer;
|
||||
int steering_angle_deg;
|
||||
int stopped_equivalence;
|
||||
|
|
Loading…
Reference in New Issue