From bfb2f8e0a8f809374fdec102eb02c3bce46a14ee Mon Sep 17 00:00:00 2001 From: brickbots Date: Sun, 22 Mar 2020 06:06:16 -0700 Subject: Add Word Per Minute calculation feature (#8054) * Add Word Per Minute calculation feature * Fix copyright info * Remove header from quantum.c, setup overloadable keycode inclusion for WPM, update docs * Simplify logic for keycode filtering * Adding link from summary to wpm_feature info * Update docs/feature_wpm.md Typo in function prototype example in docs Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Add WPM transport via i2c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- quantum/quantum.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'quantum/quantum.c') diff --git a/quantum/quantum.c b/quantum/quantum.c index 749a08eea9..49767819df 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -192,6 +192,12 @@ bool process_record_quantum(keyrecord_t *record) { } #endif +#ifdef WPM_ENABLE + if (record->event.pressed) { + update_wpm(keycode); + } +#endif + #ifdef TAP_DANCE_ENABLE preprocess_tap_dance(keycode, record); #endif @@ -645,6 +651,10 @@ void matrix_scan_quantum() { encoder_read(); #endif +#ifdef WPM_ENABLE + decay_wpm(); +#endif + #ifdef HAPTIC_ENABLE haptic_task(); #endif -- cgit v1.2.3