From 82ae0041596a9ae75aaa7e34c0bf874c84480209 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 7 Feb 2017 23:35:16 -0800 Subject: [PATCH] Fixes so the code compiles. It doesn't, like, work yet or anything. --- src/Keyboardio-Model01-TestMode.cpp | 4 ++-- src/Keyboardio-Model01-TestMode.h | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Keyboardio-Model01-TestMode.cpp b/src/Keyboardio-Model01-TestMode.cpp index 99e588d2..bebfd35a 100644 --- a/src/Keyboardio-Model01-TestMode.cpp +++ b/src/Keyboardio-Model01-TestMode.cpp @@ -20,11 +20,11 @@ void TestMode_::begin(void) { } void TestMode_::loopHook (bool postClear) { - if (!dictionary || postClear) + if ( postClear) return; if (timer && timer < minInterval) timer++; - if (KeyboardHardware.leftHandState.all == R1C3 | R2C1 | R2C4 | R2C7 + if (KeyboardHardware.leftHandState.all == (R1C3 | R2C1 | R2C4 | R2C7) // && KeyboardHardware.rightHandState.all == combo.rightHand ) { if (timer == 0 || timer >= minInterval || minInterval == 0) { diff --git a/src/Keyboardio-Model01-TestMode.h b/src/Keyboardio-Model01-TestMode.h index 9115876a..71aab9e9 100644 --- a/src/Keyboardio-Model01-TestMode.h +++ b/src/Keyboardio-Model01-TestMode.h @@ -5,13 +5,17 @@ class TestMode_ { public: TestMode_(void); void setup(); - void loop(); + static void loop(); + void begin(); + static uint8_t minInterval; private: - void TestLEDs(); - void TestKeys(); - void TestMatrix(); - void TestOneKey(); + static void TestLEDs(); + static void TestKeys(); + static void TestMatrix(); + static void TestOneKey(); + static uint8_t timer; + static void loopHook(bool postClear); }; extern TestMode_ TestMode;