extract out the key combo

pull/365/head
Jesse Vincent 8 years ago
parent 4ae6bff15d
commit bddcc4912b

@ -6,8 +6,6 @@ cRGB red;
cRGB blue; cRGB blue;
cRGB green; cRGB green;
#define LED_TEST_DELAY 2000
TestMode_::TestMode_(void) { TestMode_::TestMode_(void) {
} }
@ -23,7 +21,7 @@ void TestMode_::begin(void) {
void TestMode_::loopHook(bool postClear) { void TestMode_::loopHook(bool postClear) {
if (postClear) if (postClear)
return; return;
if (KeyboardHardware.leftHandState.all == (R0C0 | R0C6 | R3C6) if (KeyboardHardware.leftHandState.all == TEST_MODE_KEY_COMBO
// && KeyboardHardware.rightHandState.all == combo.rightHand // && KeyboardHardware.rightHandState.all == combo.rightHand
) { ) {
run_tests(); run_tests();
@ -81,7 +79,7 @@ void TestMode_::test_matrix() {
LEDControl.set_all_leds_to(50, 0, 0); LEDControl.set_all_leds_to(50, 0, 0);
while (1) { while (1) {
KeyboardHardware.read_matrix(); KeyboardHardware.read_matrix();
if (KeyboardHardware.leftHandState.all == (R0C0 | R0C6 | R3C6)) { if (KeyboardHardware.leftHandState.all == TEST_MODE_KEY_COMBO) {
break; break;
} }
for (byte row = 0; row < 4; row++) { for (byte row = 0; row < 4; row++) {

@ -3,6 +3,8 @@
#include <Arduino.h> #include <Arduino.h>
#include "Kaleidoscope.h" #include "Kaleidoscope.h"
#define TEST_MODE_KEY_COMBO (R0C0 | R0C6 | R3C6)
class TestMode_ : public KaleidoscopePlugin { class TestMode_ : public KaleidoscopePlugin {
public: public:
TestMode_(void); TestMode_(void);

Loading…
Cancel
Save