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