pull/595/head
Jesse Vincent 6 years ago
parent 35be55dc1e
commit 63e179365c

@ -85,7 +85,7 @@ void Model01::setup(void) {
TWBR = 12; // This is 400mhz, which is the fastest we can drive the ATTiny TWBR = 12; // This is 400mhz, which is the fastest we can drive the ATTiny
} }
void Model01::enableHardwareTestMode () { void Model01::enableHardwareTestMode() {
// Toggle the programming LEDS on // Toggle the programming LEDS on
PORTD |= (1 << 5); PORTD |= (1 << 5);

@ -68,7 +68,7 @@ void HardwareTestMode::testLeds(void) {
void HardwareTestMode::testMatrix() { void HardwareTestMode::testMatrix() {
// Reset bad keys from previous tests. // Reset bad keys from previous tests.
chatter_data state[KeyboardHardware.matrix_columns * KeyboardHardware.matrix_rows] = {0,0,0}; chatter_data state[KeyboardHardware.matrix_columns * KeyboardHardware.matrix_rows] = {0, 0, 0};
constexpr cRGB red = CRGB(201, 0, 0); constexpr cRGB red = CRGB(201, 0, 0);
constexpr cRGB blue = CRGB(0, 0, 201); constexpr cRGB blue = CRGB(0, 0, 201);
@ -101,10 +101,10 @@ void HardwareTestMode::testMatrix() {
else if (state[keynum].bad == 1) { else if (state[keynum].bad == 1) {
KeyboardHardware.setCrgbAt(row, col, red); KeyboardHardware.setCrgbAt(row, col, red);
} else if (state[keynum].tested == 0) { } else if (state[keynum].tested == 0) {
KeyboardHardware.setCrgbAt(row,col,yellow); KeyboardHardware.setCrgbAt(row, col, yellow);
} }
// If the key is not currently pressed and was not just released and is not marked bad // If the key is not currently pressed and was not just released and is not marked bad
else if ( ! KeyboardHardware.isKeyswitchPressed(row, col)) { else if (! KeyboardHardware.isKeyswitchPressed(row, col)) {
KeyboardHardware.setCrgbAt(row, col, blue); KeyboardHardware.setCrgbAt(row, col, blue);
} }
} }

Loading…
Cancel
Save