quantum.c use RGBLIGHT_MODE_xxx symbols

No change in build result.
pull/3582/head
mtei 6 years ago
parent ffd094626b
commit e6b3cf0ab5

@ -442,7 +442,7 @@ bool process_record_quantum(keyrecord_t *record) {
return false; return false;
case RGB_MODE_PLAIN: case RGB_MODE_PLAIN:
if (record->event.pressed) { if (record->event.pressed) {
rgblight_mode(1); rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
#ifdef SPLIT_KEYBOARD #ifdef SPLIT_KEYBOARD
RGB_DIRTY = true; RGB_DIRTY = true;
#endif #endif
@ -450,66 +450,72 @@ bool process_record_quantum(keyrecord_t *record) {
return false; return false;
case RGB_MODE_BREATHE: case RGB_MODE_BREATHE:
if (record->event.pressed) { if (record->event.pressed) {
if ((2 <= rgblight_get_mode()) && (rgblight_get_mode() < 5)) { if ((RGBLIGHT_MODE_BREATHING <= rgblight_get_mode()) &&
(rgblight_get_mode() < RGBLIGHT_MODE_BREATHING_end)) {
rgblight_step(); rgblight_step();
} else { } else {
rgblight_mode(2); rgblight_mode(RGBLIGHT_MODE_BREATHING);
} }
} }
return false; return false;
case RGB_MODE_RAINBOW: case RGB_MODE_RAINBOW:
if (record->event.pressed) { if (record->event.pressed) {
if ((6 <= rgblight_get_mode()) && (rgblight_get_mode() < 8)) { if ((RGBLIGHT_MODE_RAINBOW_MOOD <= rgblight_get_mode()) &&
(rgblight_get_mode() < RGBLIGHT_MODE_RAINBOW_MOOD_end)) {
rgblight_step(); rgblight_step();
} else { } else {
rgblight_mode(6); rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD);
} }
} }
return false; return false;
case RGB_MODE_SWIRL: case RGB_MODE_SWIRL:
if (record->event.pressed) { if (record->event.pressed) {
if ((9 <= rgblight_get_mode()) && (rgblight_get_mode() < 14)) { if ((RGBLIGHT_MODE_RAINBOW_SWIRL <= rgblight_get_mode()) &&
(rgblight_get_mode() < RGBLIGHT_MODE_RAINBOW_SWIRL_end)) {
rgblight_step(); rgblight_step();
} else { } else {
rgblight_mode(9); rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL);
} }
} }
return false; return false;
case RGB_MODE_SNAKE: case RGB_MODE_SNAKE:
if (record->event.pressed) { if (record->event.pressed) {
if ((15 <= rgblight_get_mode()) && (rgblight_get_mode() < 20)) { if ((RGBLIGHT_MODE_SNAKE <= rgblight_get_mode()) &&
(rgblight_get_mode() < RGBLIGHT_MODE_SNAKE_end)) {
rgblight_step(); rgblight_step();
} else { } else {
rgblight_mode(15); rgblight_mode(RGBLIGHT_MODE_SNAKE);
} }
} }
return false; return false;
case RGB_MODE_KNIGHT: case RGB_MODE_KNIGHT:
if (record->event.pressed) { if (record->event.pressed) {
if ((21 <= rgblight_get_mode()) && (rgblight_get_mode() < 23)) { if ((RGBLIGHT_MODE_KNIGHT <= rgblight_get_mode()) &&
(rgblight_get_mode() < RGBLIGHT_MODE_KNIGHT_end)) {
rgblight_step(); rgblight_step();
} else { } else {
rgblight_mode(21); rgblight_mode(RGBLIGHT_MODE_KNIGHT);
} }
} }
return false; return false;
case RGB_MODE_XMAS: case RGB_MODE_XMAS:
if (record->event.pressed) { if (record->event.pressed) {
rgblight_mode(24); rgblight_mode(RGBLIGHT_MODE_CHRISTMAS);
} }
return false; return false;
case RGB_MODE_GRADIENT: case RGB_MODE_GRADIENT:
if (record->event.pressed) { if (record->event.pressed) {
if ((25 <= rgblight_get_mode()) && (rgblight_get_mode() < 34)) { if ((RGBLIGHT_MODE_STATIC_GRADIENT <= rgblight_get_mode()) &&
(rgblight_get_mode() < RGBLIGHT_MODE_STATIC_GRADIENT_end)) {
rgblight_step(); rgblight_step();
} else { } else {
rgblight_mode(25); rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT);
} }
} }
return false; return false;
case RGB_MODE_RGBTEST: case RGB_MODE_RGBTEST:
if (record->event.pressed) { if (record->event.pressed) {
rgblight_mode(35); rgblight_mode(RGBLIGHT_MODE_RGB_TEST);
} }
return false; return false;
#endif // defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) #endif // defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)

Loading…
Cancel
Save