Make things compile again

This is just a quick fix, to make things compile. No style guide conformance yet.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent 1d8c3040f1
commit 3f78f20125

@ -18,8 +18,6 @@
#include <Kaleidoscope-TapDance.h>
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);

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

Loading…
Cancel
Save