1
0

fantastic60: change rgb fade to only 1 level

This commit is contained in:
Kai Ryu 2016-01-05 12:20:31 +09:00
parent 712510350c
commit 763f524db8
2 changed files with 4 additions and 8 deletions

View File

@ -182,9 +182,7 @@ void rgb_set_level(uint8_t level)
rgb_refresh(&rgb_color); rgb_refresh(&rgb_color);
/* shift_register_write_word(0x0000); */ /* shift_register_write_word(0x0000); */
break; break;
case RGB_FADE_SLOW: case RGB_FADE:
case RGB_FADE_MID:
case RGB_FADE_FAST:
if (backlight_config.enable) { if (backlight_config.enable) {
if (backlight_config.level >= 1 && backlight_config.level <= 3) { if (backlight_config.level >= 1 && backlight_config.level <= 3) {
rgb_brightness = backlight_brightness; rgb_brightness = backlight_brightness;
@ -193,7 +191,7 @@ void rgb_set_level(uint8_t level)
else { else {
rgb_brightness = 16; rgb_brightness = 16;
} }
rgb_fading_enable = 3 - (level - RGB_FADE_SLOW); rgb_fading_enable = 1;
/* shift_register_write_word(0x0000); */ /* shift_register_write_word(0x0000); */
break; break;
} }

View File

@ -41,10 +41,8 @@ typedef union {
enum { enum {
RGB_OFF = 0, RGB_OFF = 0,
RGB_FIXED, RGB_FIXED,
RGB_FADE_SLOW, RGB_FADE,
RGB_FADE_MID, RGB_LEVELS = RGB_FADE
RGB_FADE_FAST,
RGB_LEVELS = RGB_FADE_FAST
}; };
enum { enum {