Re-arrange typing_speed definitions (Fixes #5) (#6)

* Re-arrange variable definitions to avoid including quantum.h from rgblight.c

* Fix a compilation error when trying to run make test:all
This commit is contained in:
Chris Lewis
2018-08-23 22:05:12 +10:00
committed by Chris Lewis
parent b266a92cca
commit e7fd2bc991
4 changed files with 10 additions and 9 deletions
+3 -2
View File
@@ -190,14 +190,15 @@ static uint16_t scs_timer[2] = {0, 0};
*/
static bool grave_esc_was_shifted = false;
uint8_t typing_speed = 0;
bool process_record_quantum(keyrecord_t *record) {
/* This gets the keycode from the key pressed */
keypos_t key = record->event.key;
uint16_t keycode;
if (typing_speed < TYPING_SPEED_MAX_VALUE) typing_speed += 1;
#ifdef RGBLIGHT_ENABLE
if (typing_speed < TYPING_SPEED_MAX_VALUE) typing_speed += 1;
#endif
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
/* TODO: Use store_or_get_action() or a similar function. */