Reset bad keys before each test.

Reset the bad key bitfields each time a test is started, so that each test starts from a clean slate. Without this, it was confusing to restart the test and get an ever-increasing number of keys to appear bad immediately.
pull/365/head
tazlor 7 years ago committed by GitHub
parent 043ba2072b
commit 4f95cf8415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -95,6 +95,9 @@ void TestMode_::testMatrix() {
for (auto temp = 0; temp < 16; temp++) { for (auto temp = 0; temp < 16; temp++) {
KeyboardHardware.readMatrix(); KeyboardHardware.readMatrix();
} }
// Reset bad keys from previous tests.
leftBadKeys = 0;
rgihtBadKeys = 0;
while (1) { while (1) {
KeyboardHardware.readMatrix(); KeyboardHardware.readMatrix();
if (KeyboardHardware.leftHandState.all == TEST_MODE_KEY_COMBO) { if (KeyboardHardware.leftHandState.all == TEST_MODE_KEY_COMBO) {

Loading…
Cancel
Save