Case light brightness cleanup (#19856)

Co-authored-by: Chris <chris@chrisnovoa.com>
This commit is contained in:
Scott Lahteine
2020-10-22 22:31:48 -05:00
parent b1b2ecba6c
commit f9b04af650
7 changed files with 56 additions and 33 deletions

View File

@ -610,7 +610,7 @@ namespace ExtUI {
caselight.update_enabled();
}
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
#if CASELIGHT_USES_BRIGHTNESS
float getCaseLightBrightness_percent() { return ui8_to_percent(caselight.brightness); }
void setCaseLightBrightness_percent(const float value) {
caselight.brightness = map(constrain(value, 0, 100), 0, 100, 0, 255);

View File

@ -105,7 +105,7 @@
#if ENABLED(CASE_LIGHT_MENU)
#include "../../feature/caselight.h"
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
#if CASELIGHT_USES_BRIGHTNESS
void menu_case_light() {
START_MENU();
BACK_ITEM(MSG_CONFIGURATION);