Tweaks to the typing speed decay rate

pull/3754/head
Chris Lewis 6 years ago
parent e7fd2bc991
commit 08ceae1d90

@ -197,7 +197,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)

@ -574,6 +574,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();
}
}
@ -679,7 +683,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();

@ -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;

Loading…
Cancel
Save