From 4f95cf8415ce1a018bd93cc0349b01f02050b2e6 Mon Sep 17 00:00:00 2001 From: tazlor Date: Fri, 16 Feb 2018 17:39:43 -0800 Subject: [PATCH] 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. --- src/Kaleidoscope-Model01-TestMode.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Kaleidoscope-Model01-TestMode.cpp b/src/Kaleidoscope-Model01-TestMode.cpp index be805ae2..8973a74b 100644 --- a/src/Kaleidoscope-Model01-TestMode.cpp +++ b/src/Kaleidoscope-Model01-TestMode.cpp @@ -95,6 +95,9 @@ void TestMode_::testMatrix() { for (auto temp = 0; temp < 16; temp++) { KeyboardHardware.readMatrix(); } + // Reset bad keys from previous tests. + leftBadKeys = 0; + rgihtBadKeys = 0; while (1) { KeyboardHardware.readMatrix(); if (KeyboardHardware.leftHandState.all == TEST_MODE_KEY_COMBO) {