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
committed by GitHub
parent c75e98dc84
commit 0ffee29a11
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);