Browse Source
Fix ExtUI 0<brightness<12 (#17644)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
vanilla_fb_2.0.x
RudolphRiedel
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
3 deletions
-
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp
|
@ -157,9 +157,7 @@ void InterfaceSettingsScreen::onIdle() { |
|
|
CommandProcessor cmd; |
|
|
CommandProcessor cmd; |
|
|
switch (cmd.track_tag(value)) { |
|
|
switch (cmd.track_tag(value)) { |
|
|
case 2: |
|
|
case 2: |
|
|
screen_data.InterfaceSettingsScreen.brightness = float(value) * 128 / 0xFFFF; |
|
|
screen_data.InterfaceSettingsScreen.brightness = constrain((value * 128UL) / 0xFFFF, 1, 11); |
|
|
if (screen_data.InterfaceSettingsScreen.brightness > 1) |
|
|
|
|
|
screen_data.InterfaceSettingsScreen.brightness = 1; |
|
|
|
|
|
CLCD::set_brightness(screen_data.InterfaceSettingsScreen.brightness); |
|
|
CLCD::set_brightness(screen_data.InterfaceSettingsScreen.brightness); |
|
|
SaveSettingsDialogBox::settingsChanged(); |
|
|
SaveSettingsDialogBox::settingsChanged(); |
|
|
break; |
|
|
break; |
|
|