diff options
Diffstat (limited to 'keyboards')
-rw-r--r-- | keyboards/voyager/voyager.c | 51 |
1 files changed, 5 insertions, 46 deletions
diff --git a/keyboards/voyager/voyager.c b/keyboards/voyager/voyager.c index b951987bc1..9fb6bb0c1f 100644 --- a/keyboards/voyager/voyager.c +++ b/keyboards/voyager/voyager.c @@ -115,55 +115,14 @@ layer_state_t layer_state_set_kb(layer_state_t state) { #ifdef ORYX_ENABLE if (rawhid_state.rgb_control) return state; #endif - bool LED_1 = false; - bool LED_2 = false; - bool LED_3 = false; -# if !defined(CAPS_LOCK_STATUS) - bool LED_4 = false; -# endif - uint8_t layer = get_highest_layer(state); - switch (layer) { - case 1: - LED_1 = true; - break; - case 2: - LED_2 = true; - break; - case 3: - LED_3 = true; - break; - case 4: -# if !defined(CAPS_LOCK_STATUS) - LED_4 = true; -# endif - break; - case 5: - LED_1 = true; - LED_2 = true; - break; - case 6: - LED_1 = true; - LED_2 = true; - LED_3 = true; - break; - case 7: - LED_1 = true; - LED_2 = true; - LED_3 = true; -# if !defined(CAPS_LOCK_STATUS) - LED_4 = true; -# endif - break; - default: - break; - } - STATUS_LED_1(LED_1); - STATUS_LED_2(LED_2); - STATUS_LED_3(LED_3); + STATUS_LED_1(layer & (1<<0)); + STATUS_LED_2(layer & (1<<1)); + STATUS_LED_3(layer & (1<<2)); + # if !defined(CAPS_LOCK_STATUS) - STATUS_LED_4(LED_4); + STATUS_LED_4(layer & (1<<3)); # endif return state; } |