From 3f78f201257bbd348a36f3e1531f1bed708c9a78 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 3 Jun 2017 12:01:51 +0200 Subject: [PATCH] Make things compile again This is just a quick fix, to make things compile. No style guide conformance yet. Signed-off-by: Gergely Nagy --- src/Kaleidoscope/TapDance.cpp | 12 +++++------- src/Kaleidoscope/TapDance.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Kaleidoscope/TapDance.cpp b/src/Kaleidoscope/TapDance.cpp index 9716f9b2..0386ba72 100644 --- a/src/Kaleidoscope/TapDance.cpp +++ b/src/Kaleidoscope/TapDance.cpp @@ -18,8 +18,6 @@ #include -using KaleidoscopePlugins::Ranges; - namespace KaleidoscopePlugins { // --- state --- uint32_t TapDance::endTime; @@ -34,7 +32,7 @@ byte TapDance::lastTapDanceCol; // --- helpers --- -#define isTapDance(k) (k.raw >= TD_FIRST && k.raw <= TD_LAST) +#define isTapDance(k) (k.raw >= Ranges::TD_FIRST && k.raw <= Ranges::TD_LAST) #define isInSeq(k) (lastTapDanceKey.raw == k.raw) #define stillHeld(idx) (tapCount[idx]) #define isActive() (lastTapDanceKey.raw != Key_NoKey.raw) @@ -43,7 +41,7 @@ byte TapDance::lastTapDanceCol; void TapDance::interrupt (void) { - uint8_t idx = lastTapDanceKey.raw - TD_FIRST; + uint8_t idx = lastTapDanceKey.raw - Ranges::TD_FIRST; tapDanceAction (idx, lastTapDanceRow, lastTapDanceCol, tapCount[idx], Interrupt); bitWrite (triggeredState, idx, 1); @@ -58,7 +56,7 @@ TapDance::interrupt (void) { void TapDance::timeout (void) { - uint8_t idx = lastTapDanceKey.raw - TD_FIRST; + uint8_t idx = lastTapDanceKey.raw - Ranges::TD_FIRST; tapDanceAction (idx, lastTapDanceRow, lastTapDanceCol, tapCount[idx], Timeout); bitWrite (triggeredState, idx, 1); @@ -84,7 +82,7 @@ TapDance::release (uint8_t tapDanceIndex) { Key TapDance::tap (void) { - uint8_t idx = lastTapDanceKey.raw - TD_FIRST; + uint8_t idx = lastTapDanceKey.raw - Ranges::TD_FIRST; tapCount[idx]++; endTime = millis () + timeOut; @@ -154,7 +152,7 @@ TapDance::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) return mappedKey; } - uint8_t tapDanceIndex = mappedKey.raw - TD_FIRST; + uint8_t tapDanceIndex = mappedKey.raw - Ranges::TD_FIRST; if (key_toggled_off (keyState)) bitClear (pressedState, tapDanceIndex); diff --git a/src/Kaleidoscope/TapDance.h b/src/Kaleidoscope/TapDance.h index 60cf8925..52af9dfe 100644 --- a/src/Kaleidoscope/TapDance.h +++ b/src/Kaleidoscope/TapDance.h @@ -64,7 +64,7 @@ class TapDance : public KaleidoscopePlugin { static void interrupt (void); static void timeout (void); static Key release (uint8_t tapDanceIndex); -} +}; } // namespace KaleidoscopePlugins void tapDanceAction (uint8_t tapDanceIndex, byte row, byte col, uint8_t tapCount, KaleidoscopePlugins::TapDance::ActionType tapDanceAction);