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