sm6250-common: light: WHITE_LED -> NOTIFICATION_LED

This commit is contained in:
Demon000 2020-07-17 21:07:17 +03:00
parent 7e0d232409
commit 7964f5f6dc

View File

@ -23,7 +23,7 @@
#include <fstream>
#define LCD_LED "/sys/class/backlight/panel0-backlight/"
#define WHITE_LED "/sys/class/leds/white/"
#define NOTIFICATION_LED "/sys/class/leds/white/"
#define BREATH "breath"
#define BRIGHTNESS "brightness"
@ -92,8 +92,8 @@ static void handleNotification(const LightState& state) {
uint32_t whiteBrightness = getScaledBrightness(state, MAX_LED_BRIGHTNESS);
/* Disable breathing or blinking */
set(WHITE_LED BREATH, 0);
set(WHITE_LED BRIGHTNESS, 0);
set(NOTIFICATION_LED BREATH, 0);
set(NOTIFICATION_LED BRIGHTNESS, 0);
if (!whiteBrightness) {
return;
@ -103,11 +103,11 @@ static void handleNotification(const LightState& state) {
case Flash::HARDWARE:
case Flash::TIMED:
/* Breathing */
set(WHITE_LED BREATH, 1);
set(NOTIFICATION_LED BREATH, 1);
break;
case Flash::NONE:
default:
set(WHITE_LED BRIGHTNESS, whiteBrightness);
set(NOTIFICATION_LED BRIGHTNESS, whiteBrightness);
}
}