Browse Source

trying to fix LEDs

Stick 8 years ago
parent
commit
5a70cb30ee
1 changed files with 21 additions and 21 deletions
  1. 21 21
      keyboards/ergodox/keymaps/familiar/keymap.c

+ 21 - 21
keyboards/ergodox/keymaps/familiar/keymap.c

@@ -242,26 +242,26 @@ void matrix_init_user(void) {
 // Runs constantly in the background, in a loop.
 void matrix_scan_user(void) {
 
-    // uint8_t layer = biton32(layer_state);
-    //
-    // ergodox_board_led_off();
-    // ergodox_right_led_1_off();
-    // ergodox_right_led_2_off();
-    // ergodox_right_led_3_off();
-    // switch (layer) {
-    //     case INTL:
-    //     case INSF:
-    //         ergodox_right_led_1_on();
-    //         break;
-    //     case NUMP:
-    //         ergodox_right_led_2_on();
-    //         break;
-    //     case ARRW:
-    //         ergodox_right_led_3_on();
-    //         break;
-    //     default:
-    //         // none
-    //         break;
-    // }
+    uint8_t layer = biton32(layer_state);
+
+    ergodox_board_led_off();
+    ergodox_right_led_1_off();
+    ergodox_right_led_2_off();
+    ergodox_right_led_3_off();
+    switch (layer) {
+        case INTL:
+        case INSF:
+            ergodox_right_led_1_on();
+            break;
+        case NUMP:
+            ergodox_right_led_2_on();
+            break;
+        case ARRW:
+            ergodox_right_led_3_on();
+            break;
+        default:
+            // none
+            break;
+    }
 
 };