]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
[Keyboard] RGB updates on NK65 and HS60 (#6795)
authoryiancar <yiangosyiangou@cytanet.com.cy>
Tue, 8 Oct 2019 16:03:51 +0000 (17:03 +0100)
committerDrashna Jaelre <drashna@live.com>
Tue, 8 Oct 2019 16:03:51 +0000 (09:03 -0700)
* RGB update commit

* Convert caps lock indicator check to IS_LED_ON

* ISSI3733 minor change

drivers/issi/is31fl3733.c
keyboards/hs60/v2/config.h
keyboards/nk65/config.h
keyboards/wilba_tech/wt_rgb_backlight.c

index 968f072de8768f15728cd6eaa5b800b808b4a5e7..cc2d895efda85680a30a365fbc28c300ac57bc4d 100644 (file)
@@ -231,5 +231,6 @@ void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index) {
             IS31FL3733_write_register(addr, i, g_led_control_registers[index][i]);
         }
     }
-    g_led_control_registers_update_required[index] = false;
+    // This seems counter intuitive but sometimes this page can get corrupted. So update it every time.
+    // g_led_control_registers_update_required[index] = false;
 }
index 57014993f498b783af3d4de3a0d28690798ac447..02df0074cc25355393bb68012ccc98ab3579abbf 100644 (file)
@@ -106,7 +106,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define RGB_BACKLIGHT_BRIGHTNESS 255
 
 // the default effect (RGB test)
-#define RGB_BACKLIGHT_EFFECT 255
+#define RGB_BACKLIGHT_EFFECT 6
 
 // the default effect speed (0-3)
 #define RGB_BACKLIGHT_EFFECT_SPEED 0
index 4358d9cf9597da62ec4e81c28e95b7c84a0d0ae5..51e101cde5e3686797d2588d5a68375039450ad7 100755 (executable)
@@ -106,7 +106,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define RGB_BACKLIGHT_BRIGHTNESS 255
 
 // the default effect (RGB test)
-#define RGB_BACKLIGHT_EFFECT 255
+#define RGB_BACKLIGHT_EFFECT 6
 
 // the default effect speed (0-3)
 #define RGB_BACKLIGHT_EFFECT_SPEED 0
index 9116e98ba798e79cbccbca1e3fe494070fcf0914..ca8c3269f6379f3a98c855e90819ad3d67b11bfa 100644 (file)
@@ -791,7 +791,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = {
     {208,255}, {39,255}, {23,238}, {235,255}, {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255},
     {255,255},// LA61 does not exit, dummy
     //LA62..LB5
-    {221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255},
+    {221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255}
 };
 #elif defined(RGB_BACKLIGHT_M6_B)
 // M6-B is really simple:
@@ -1551,20 +1551,14 @@ void backlight_effect_indicators(void)
     }
 
 #if defined(RGB_BACKLIGHT_NK65)
-    if ( g_indicator_state & (1<<USB_LED_CAPS_LOCK) )
-    {
+    if ( IS_LED_ON(g_indicator_state, USB_LED_CAPS_LOCK) ) {
         IS31FL3733_set_color( 7+64-1, 0, 255, 0 );
     } else {
         IS31FL3733_set_color( 7+64-1, 0, 0, 0 );
     }
-    if ( g_indicator_state & (1<<USB_LED_SCROLL_LOCK) )
-    {
+    if ( IS_LAYER_ON(1) ) {
         IS31FL3733_set_color( 6+64-1, 255, 0, 255 );
-    } else {
-        IS31FL3733_set_color( 6+64-1, 0, 0, 0 );
-    }
-    if ( g_indicator_state & (1<<USB_LED_NUM_LOCK) )
-    {
+    } else if ( IS_LAYER_ON(2) ) {
         IS31FL3733_set_color( 6+64-1, 0, 255, 0 );
     } else {
         IS31FL3733_set_color( 6+64-1, 0, 0, 0 );