Change {LED,RGB}_DISABLE_TIMEOUT
to {LED,RGB}_MATRIX_TIMEOUT
(#18415)
This commit is contained in:
parent
9509dfbe39
commit
ea2819b2c2
138 changed files with 64 additions and 181 deletions
|
@ -121,7 +121,7 @@
|
|||
// For perkey leds
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
// This is not working
|
||||
//# define RGB_DISABLE_TIMEOUT 1800000
|
||||
//# define RGB_MATRIX_TIMEOUT 1800000
|
||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED true
|
||||
// Start using this mode
|
||||
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_RAINBOW_BEACON
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
|
||||
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
|
||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||
|
||||
#undef ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
|
|
|
@ -22,7 +22,7 @@ enum states {
|
|||
#if defined(RGB_DISABLE_WITH_FADE_OUT)
|
||||
,FADE_OUT //!< before supending
|
||||
#endif
|
||||
,SUSPENDED //!< expecting to be suspended by RGB_DISABLE_TIMEOUT any time
|
||||
,SUSPENDED //!< expecting to be suspended by RGB_MATRIX_TIMEOUT any time
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -99,8 +99,8 @@ bool fade_in(const uint8_t time);
|
|||
#endif
|
||||
|
||||
#if defined(RGB_DISABLE_WITH_FADE_OUT)
|
||||
# if !defined(RGB_DISABLE_TIMEOUT)
|
||||
# warning "RGB_DISABLE_WITH_FADE_OUT expects RGB_DISABLE_TIMEOUT to be defined"
|
||||
# if !defined(RGB_MATRIX_TIMEOUT)
|
||||
# warning "RGB_DISABLE_WITH_FADE_OUT expects RGB_MATRIX_TIMEOUT to be defined"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,17 +31,17 @@ void matrix_scan_user_rgb(void) {
|
|||
#endif
|
||||
#if defined(RGB_DISABLE_WITH_FADE_OUT)
|
||||
const uint32_t fade_out_duration = scale_2_rgb_time(128);
|
||||
const uint32_t start_fade_out_after_millis = (RGB_DISABLE_TIMEOUT) > fade_out_duration
|
||||
? (RGB_DISABLE_TIMEOUT) - fade_out_duration
|
||||
const uint32_t start_fade_out_after_millis = (RGB_MATRIX_TIMEOUT) > fade_out_duration
|
||||
? (RGB_MATRIX_TIMEOUT) - fade_out_duration
|
||||
: 0;
|
||||
|
||||
if (start_fade_out_after_millis <= inactivity_millis) {
|
||||
update_value(&state, FADE_OUT, &calc_offset);
|
||||
}
|
||||
#elif defined(RGB_DISABLE_TIMEOUT)
|
||||
#elif defined(RGB_MATRIX_TIMEOUT)
|
||||
// having to set brightness "manually" to black as starting point for fade in
|
||||
// for the time when returning from suspended state
|
||||
if (RGB_DISABLE_TIMEOUT <= inactivity_millis + 15) {
|
||||
if (RGB_MATRIX_TIMEOUT <= inactivity_millis + 15) {
|
||||
rgb_matrix_config.hsv.v = 0;
|
||||
state = SUSPENDED;
|
||||
}
|
||||
|
|
|
@ -31,5 +31,5 @@
|
|||
#undef ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
|
||||
// 20m timeout (20m * 60s * 1000mil)
|
||||
#define RGB_DISABLE_TIMEOUT 1200000
|
||||
#define RGB_MATRIX_TIMEOUT 1200000
|
||||
#define OLED_SCROLL_TIMEOUT 20000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue