void rgblight_task(void) { if (rgblight_timer_enabled) { // mode = 1, static light, do nothing here if (rgblight_config.mode >= 2 && rgblight_config.mode <= 5) { // mode = 2 to 5, breathing mode rgblight_effect_breathing(rgblight_config.mode - 2); } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 8) { // mode = 6 to 8, rainbow mood mod rgblight_effect_rainbow_mood(rgblight_config.mode - 6); } else if (rgblight_config.mode >= 9 && rgblight_config.mode <= 14) { // mode = 9 to 14, rainbow swirl mode rgblight_effect_rainbow_swirl(rgblight_config.mode - 9); } else if (rgblight_config.mode >= 15 && rgblight_config.mode <= 20) { // mode = 15 to 20, snake mode rgblight_effect_snake(rgblight_config.mode - 15); } else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) { // mode = 21 to 23, knight mode rgblight_effect_knight(rgblight_config.mode - 21); } else if (rgblight_config.mode == 24) { // mode = 24, christmas mode rgblight_effect_christmas(); } else if (rgblight_config.mode == 35) { // mode = 35, RGB test rgblight_effect_rgbtest(); } } }
void rgblight_task(void) { if (rgblight_timer_enabled) { // static light mode, do nothing here if ( 1 == 0 ) { //dummy } #ifdef RGBLIGHT_EFFECT_BREATHING else if (rgblight_config.mode >= RGBLIGHT_MODE_BREATHING && rgblight_config.mode <= RGBLIGHT_MODE_BREATHING_end) { // breathing mode rgblight_effect_breathing(rgblight_config.mode - RGBLIGHT_MODE_BREATHING ); } #endif #ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD else if (rgblight_config.mode >= RGBLIGHT_MODE_RAINBOW_MOOD && rgblight_config.mode <= RGBLIGHT_MODE_RAINBOW_MOOD_end) { // rainbow mood mode rgblight_effect_rainbow_mood(rgblight_config.mode - RGBLIGHT_MODE_RAINBOW_MOOD); } #endif #ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL else if (rgblight_config.mode >= RGBLIGHT_MODE_RAINBOW_SWIRL && rgblight_config.mode <= RGBLIGHT_MODE_RAINBOW_SWIRL_end) { // rainbow swirl mode rgblight_effect_rainbow_swirl(rgblight_config.mode - RGBLIGHT_MODE_RAINBOW_SWIRL); } #endif #ifdef RGBLIGHT_EFFECT_SNAKE else if (rgblight_config.mode >= RGBLIGHT_MODE_SNAKE && rgblight_config.mode <= RGBLIGHT_MODE_SNAKE_end) { // snake mode rgblight_effect_snake(rgblight_config.mode - RGBLIGHT_MODE_SNAKE); } #endif #ifdef RGBLIGHT_EFFECT_KNIGHT else if (rgblight_config.mode >= RGBLIGHT_MODE_KNIGHT && rgblight_config.mode <= RGBLIGHT_MODE_KNIGHT_end) { // knight mode rgblight_effect_knight(rgblight_config.mode - RGBLIGHT_MODE_KNIGHT); } #endif #ifdef RGBLIGHT_EFFECT_CHRISTMAS else if (rgblight_config.mode == RGBLIGHT_MODE_CHRISTMAS) { // christmas mode rgblight_effect_christmas(); } #endif #ifdef RGBLIGHT_EFFECT_RGB_TEST else if (rgblight_config.mode == RGBLIGHT_MODE_RGB_TEST) { // RGB test mode rgblight_effect_rgbtest(); } #endif #ifdef RGBLIGHT_EFFECT_ALTERNATING else if (rgblight_config.mode == RGBLIGHT_MODE_ALTERNATING){ rgblight_effect_alternating(); } #endif } }