Continuing to sketch out the test mode. This should probably be on a branch

pull/30/head
Jesse Vincent 8 years ago
parent fa28748d9e
commit 2cd59048d1

@ -1,6 +1,9 @@
#include "KeyboardioFirmware.h" #include "KeyboardioFirmware.h"
#include "TestMode.h" #include "TestMode.h"
TestMode_::TestMode_(void) {
}
void TestMode_::TestLEDs(void) { void TestMode_::TestLEDs(void) {
// make all LEDs dim red // make all LEDs dim red
LEDControl.set_all_leds_to(50,0,0); LEDControl.set_all_leds_to(50,0,0);
@ -47,3 +50,19 @@ void TestMode_::TestLEDs(void) {
// as you hit each key a second time, set it to green // as you hit each key a second time, set it to green
// as you hit each key a third time, set it to off // as you hit each key a third time, set it to off
} }
void TestMode_::TestMatrix () {
KeyboardHardware.read_matrix();
}
void TestMode_::setup() {
eventHandlers[0] = handle_key_event_test;
}
bool handle_key_event_test(byte row, byte col, uint8_t currentState, uint8_t previousState) {
Serial.write(row);
}
TestMode_ TestMode;

@ -1,11 +1,18 @@
#pragma once
#include <Arduino.h>
class TestMode_ { class TestMode_ {
public: public:
TestMode_(void);
void start(); void setup();
private:
void TestLEDs(); void TestLEDs();
void TestKeys(); void TestKeys();
void TestMatrix();
void TestOneKey(); void TestOneKey();
private:
}; };
extern TestMode_ TestMode;
bool handle_key_event_test(byte row, byte col, uint8_t currentState, uint8_t previousState);

Loading…
Cancel
Save