@@ -849,6 +849,7 @@ display:
|
||||
uart_id: tf_uart
|
||||
on_setup:
|
||||
- script.execute: setup_sequence
|
||||
|
||||
on_page:
|
||||
lambda: |-
|
||||
if (current_page->state != page_names[x] or x == 9) {
|
||||
@@ -1239,7 +1240,7 @@ number:
|
||||
- lambda: |-
|
||||
disp1->send_command_printf("brightness=%i", int(x));
|
||||
disp1->send_command_printf("settings.brightslider.val=%i", int(x));
|
||||
if (current_page->state != "screensaver") {
|
||||
if (current_page->state != "screensaver" or current_brightness->state != 0) {
|
||||
disp1->set_backlight_brightness(x/100);
|
||||
current_brightness->update();
|
||||
timer_dim->execute(current_page->state.c_str(), int(timeout_dim->state));
|
||||
@@ -1264,7 +1265,7 @@ number:
|
||||
- lambda: |-
|
||||
disp1->send_command_printf("brightness_dim=%i", int(x));
|
||||
disp1->send_command_printf("settings.dimslider.val=%i", int(x));
|
||||
if (current_page->state != "screensaver" and current_brightness->state <= x) {
|
||||
if (current_page->state != "screensaver" or current_brightness->state != 0) {
|
||||
set_brightness->execute(x);
|
||||
timer_sleep->execute(current_page->state.c_str(), int(timeout_sleep->state));
|
||||
if (current_page->state == "settings") disp1->set_component_text_printf("dim_text", "%i%%", int(x));
|
||||
@@ -2288,9 +2289,8 @@ script:
|
||||
disp1->set_component_font_color("screensaver.text", id(screensaver_display_time_color));
|
||||
set_component_visibility->execute("screensaver.text", true);
|
||||
refresh_datetime->execute();
|
||||
} else {
|
||||
disp1->set_backlight_brightness(0.0f);
|
||||
}
|
||||
disp1->set_backlight_brightness(display_sleep_brightness->state / 100.0f);
|
||||
current_brightness->update();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user