Removed commented code, no need

This commit is contained in:
Sadek Baroudi 2021-02-25 00:13:31 -08:00
parent c18c034df5
commit 7c39c7540c
1 changed files with 0 additions and 131 deletions

View File

@ -102,134 +102,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
/*
#define LAYER_IS_ON(layer_state, layer_num) ((layer_state & (1 << layer_num)) > 0)
////// Start RGB backlight timeout
// https://gist.github.com/MaxWinterstein/c99594a5f4f8da942feb72c8233445aa/
#define BACKLIGHT_TIMEOUT 5 // in minutes
static uint16_t idle_timer = 0;
static uint8_t halfmin_counter = 0;
static bool led_on = true;
////// End RGB backlight timeout
// Begin layer lighting
// example of multicolor layer
//{0, 5, HSV_BLUE}, // left side of underglow is blue
//{5, 5, HSV_YELLOW}, // right side of underglow is yellow
//{10, 1, HSV_GREEN} // middle top side light is green
//
// uncomment to set base layer without the abiliby to override
const rgblight_segment_t PROGMEM layer_0_rgb[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 11, HSV_BLUE}
// with retro keycaps
//
//{0, 1, HSV_RED},
//{1, 2, HSV_BLUE},
//{3, 1, 16, 255, 255}, // orange
//{4, 5, 16, 255, 90}, // brown
//{9, 1, HSV_YELLOW},
//{10, 1, 10, 10, 255}
//
);
const rgblight_segment_t PROGMEM layer_1_rgb[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 11, 10, 10, 255}
);
const rgblight_segment_t PROGMEM layer_2_rgb[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 11, HSV_GREEN}
);
const rgblight_segment_t PROGMEM layer_3_rgb[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 11, HSV_PURPLE}
);
const rgblight_segment_t PROGMEM layer_4_rgb[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 11, HSV_YELLOW}
);
const rgblight_segment_t PROGMEM layer_5_rgb[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 11, HSV_MAGENTA}
);
const rgblight_segment_t PROGMEM layer_6_rgb[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 11, HSV_CYAN}
);
const rgblight_segment_t PROGMEM layer_capslock_rgb[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 11, HSV_RED}
);
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
layer_0_rgb,
layer_1_rgb,
layer_2_rgb,
layer_3_rgb,
layer_4_rgb,
layer_5_rgb,
layer_6_rgb,
layer_capslock_rgb
);
void keyboard_post_init_user(void) {
// set default color
// rgblight_sethsv_noeeprom(HSV_WHITE);
// Enable the LED layers
rgblight_layers = my_rgb_layers;
rgblight_enable_noeeprom();
}
uint32_t layer_state_set_user(uint32_t state) {
// Comment this next line to allow for RGB override through RGB keys
//rgblight_set_layer_state(0, true);
rgblight_set_layer_state(1, LAYER_IS_ON(state, 1));
rgblight_set_layer_state(2, LAYER_IS_ON(state, 2));
rgblight_set_layer_state(3, LAYER_IS_ON(state, 3));
rgblight_set_layer_state(4, LAYER_IS_ON(state, 4));
rgblight_set_layer_state(5, LAYER_IS_ON(state, 5));
rgblight_set_layer_state(6, LAYER_IS_ON(state, 6));
return state;
}
bool led_update_user(led_t led_state) {
rgblight_set_layer_state(7, led_state.caps_lock);
return true;
}
void matrix_scan_user(void) {
////// Start RGB backlight timeout
// idle_timer needs to be set one time
if (idle_timer == 0) idle_timer = timer_read();
if ( led_on && timer_elapsed(idle_timer) > 30000) {
halfmin_counter++;
idle_timer = timer_read();
}
if ( led_on && halfmin_counter >= BACKLIGHT_TIMEOUT * 2) {
rgblight_disable_noeeprom();
led_on = false;
halfmin_counter = 0;
}
////// End RGB backlight timeout
}
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
////// Start RGB backlight timeout
if (led_on == false) {
rgblight_enable_noeeprom();
led_on = true;
}
idle_timer = timer_read();
halfmin_counter = 0;
////// End RGB backlight timeout
return true;
};
*/