diff --git a/quantum/quantum.c b/quantum/quantum.c index ff59bc0c41..9c44c07561 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -194,7 +194,7 @@ bool process_record_quantum(keyrecord_t *record) { uint16_t keycode; #ifdef RGBLIGHT_ENABLE - if (typing_speed < TYPING_SPEED_MAX_VALUE) typing_speed += 1; + if (typing_speed < TYPING_SPEED_MAX_VALUE) typing_speed += (TYPING_SPEED_MAX_VALUE / 100); #endif #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 88a21d0aff..000d91e9e7 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -573,6 +573,10 @@ void typing_speed_decay_task() { if (timer_elapsed(decay_timer) > 500 || decay_timer == 0) { if (typing_speed > 0) typing_speed -= 1; + //Decay a little faster at half of max speed + if (typing_speed > TYPING_SPEED_MAX_VALUE / 2) typing_speed -= 1; + //Decay even faster at 3/4 of max speed + if (typing_speed > TYPING_SPEED_MAX_VALUE / 4 * 3) typing_speed -= 3; decay_timer = timer_read(); } } @@ -676,7 +680,7 @@ void rgblight_effect_snake(uint8_t interval) { if (interval % 2) { increment = -1; } - if (timer_elapsed(last_timer) < typing_speed_matched_interval(5, 100)) { + if (timer_elapsed(last_timer) < typing_speed_matched_interval(1, 200)) { return; } last_timer = timer_read(); diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 5b95431299..b3264dff1f 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -91,7 +91,7 @@ extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM; //Used in rgblight.c and quantum.c to match RGB animation to typing speed extern uint8_t typing_speed; -#define TYPING_SPEED_MAX_VALUE 100 +#define TYPING_SPEED_MAX_VALUE 200 typedef union { uint32_t raw;