Rename CurrentKeyStates to KeyStates and move it to the newly created key_states.[ch]

This commit is contained in:
László Monda
2017-11-03 02:46:34 +01:00
parent a7e70d0cb2
commit e0868ac866
6 changed files with 24 additions and 8 deletions
+3 -2
View File
@@ -9,6 +9,7 @@
#include "slave_drivers/uhk_module_driver.h"
#include "led_pwm.h"
#include "macros.h"
#include "key_states.h"
static uint8_t mouseWheelDivisorCounter = 0;
static uint8_t mouseSpeedAccelDivisorCounter = 0;
@@ -77,7 +78,7 @@ uint8_t getActiveLayer(void)
uint8_t activeLayer = LayerId_Base;
for (uint8_t slotId=0; slotId<SLOT_COUNT; slotId++) {
for (uint8_t keyId=0; keyId<MAX_KEY_COUNT_PER_MODULE; keyId++) {
if (CurrentKeyStates[slotId][keyId]) {
if (KeyStates[slotId][keyId]) {
key_action_t action = CurrentKeymap[LayerId_Base][slotId][keyId];
if (action.type == KeyActionType_SwitchLayer) {
activeLayer = action.switchLayer.layer;
@@ -110,7 +111,7 @@ void UpdateActiveUsbReports(void)
for (uint8_t slotId=0; slotId<SLOT_COUNT; slotId++) {
for (uint8_t keyId=0; keyId<MAX_KEY_COUNT_PER_MODULE; keyId++) {
if (!CurrentKeyStates[slotId][keyId]) {
if (!KeyStates[slotId][keyId]) {
continue;
}