@@ -75,10 +75,12 @@ void LinuxLEDController::SetRGB(unsigned char red, unsigned char grn, unsigned c
7575{
7676 std::string brightness_str;
7777
78- if (led_rgb_path.empty ()) {
79- /* -------------------------------------------------------------*\
80- | My phone LED that I tested this on shuts down if you set zero |
81- \*-------------------------------------------------------------*/
78+ if (led_rgb_path.empty ())
79+ {
80+ /* -------------------------------------------------*\
81+ | My phone LED that I tested this on shuts down if |
82+ | you set zero |
83+ \*-------------------------------------------------*/
8284 if (red == 0 ) red = 1 ;
8385 if (grn == 0 ) grn = 1 ;
8486 if (blu == 0 ) blu = 1 ;
@@ -98,19 +100,19 @@ void LinuxLEDController::SetRGB(unsigned char red, unsigned char grn, unsigned c
98100 led_b_brightness.write (brightness_str.c_str (), brightness_str.length ());
99101 led_b_brightness.flush ();
100102 }
101-
102- else {
103- /*
104- * For the led_classdev_mc brightness just aplies a coefficient to the
105- * multi_intensity. Set brightness to maximum and use the RGB values
106- * directly instead.
107- */
103+ else
104+ {
105+ /* -------------------------------------------------*\
106+ | For the led_classdev_mc brightness just applies a |
107+ | coefficient to the multi_intensity. Set brightness|
108+ | to maximum and use the RGB values directly |
109+ | instead. |
110+ \*-------------------------------------------------*/
108111 brightness_str = std::to_string ((unsigned int )255 );
109112 led_rgb_brightness.write (brightness_str.c_str (), brightness_str.length ());
110113 led_rgb_brightness.flush ();
111- brightness_str = std::to_string ((unsigned int )red) + " " \
112- + std::to_string ((unsigned int )grn) + " " \
113- + std::to_string ((unsigned int )blu);
114+
115+ brightness_str = std::to_string ((unsigned int )red) + " " + std::to_string ((unsigned int )grn) + " " + std::to_string ((unsigned int )blu);
114116 led_rgb_color.write (brightness_str.c_str (), brightness_str.length ());
115117 led_rgb_color.flush ();
116118 }
0 commit comments