From 33618fb088ec396dc8b791cfbbaac98bcd1b42bf Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Wed, 11 Nov 2020 11:37:00 -0600 Subject: [PATCH] Update Qukeys basic testcase for issue #970 Signed-off-by: Michael Richters --- tests/plugins/Qukeys/basic/common.h | 1 + tests/plugins/Qukeys/basic/sketch.ino | 1 + tests/plugins/Qukeys/basic/test/testcase.cpp | 15 ++++++--------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/plugins/Qukeys/basic/common.h b/tests/plugins/Qukeys/basic/common.h index 71b91a3d..86c93412 100644 --- a/tests/plugins/Qukeys/basic/common.h +++ b/tests/plugins/Qukeys/basic/common.h @@ -26,6 +26,7 @@ namespace testing { constexpr uint16_t QUKEYS_HOLD_TIMEOUT = 200; constexpr uint8_t QUKEYS_OVERLAP_THRESHOLD = 90; constexpr uint8_t QUKEYS_MINIMUM_HOLD_TIME = 10; +constexpr uint8_t QUKEYS_MIN_PRIOR_INTERVAL = 20; } } diff --git a/tests/plugins/Qukeys/basic/sketch.ino b/tests/plugins/Qukeys/basic/sketch.ino index a1f3ab0a..335586a5 100644 --- a/tests/plugins/Qukeys/basic/sketch.ino +++ b/tests/plugins/Qukeys/basic/sketch.ino @@ -89,6 +89,7 @@ void setup() { Qukeys.setHoldTimeout(kaleidoscope::testing::QUKEYS_HOLD_TIMEOUT); Qukeys.setOverlapThreshold(kaleidoscope::testing::QUKEYS_OVERLAP_THRESHOLD); Qukeys.setMinimumHoldTime(kaleidoscope::testing::QUKEYS_MINIMUM_HOLD_TIME); + Qukeys.setMinimumPriorInterval(kaleidoscope::testing::QUKEYS_MIN_PRIOR_INTERVAL); Kaleidoscope.setup(); } diff --git a/tests/plugins/Qukeys/basic/test/testcase.cpp b/tests/plugins/Qukeys/basic/test/testcase.cpp index f9f1ede6..bfc1c38a 100644 --- a/tests/plugins/Qukeys/basic/test/testcase.cpp +++ b/tests/plugins/Qukeys/basic/test/testcase.cpp @@ -39,9 +39,6 @@ class QukeysBasic : public VirtualDeviceTest { }; TEST_F(QukeysBasic, TapQukeyAlone) { - // XXX Temporary workaround - sim_.RunForMillis(1000); - // Press `A` sim_.Press(key_addr_A); @@ -74,8 +71,8 @@ TEST_F(QukeysBasic, TapQukeyAlone) { } TEST_F(QukeysBasic, HoldQukeyAlone) { - // XXX Temporary workaround - sim_.RunForMillis(1000); + // Prevent rapid typing suppression from affecting the test + sim_.RunForMillis(QUKEYS_MIN_PRIOR_INTERVAL); // Press `A` sim_.Press(key_addr_A); @@ -125,8 +122,8 @@ TEST_F(QukeysBasic, HoldQukeyAlone) { } TEST_F(QukeysBasic, FullOverlap) { - // XXX Temporary workaround - sim_.RunForMillis(1000); + // Prevent rapid typing suppression from affecting the test + sim_.RunForMillis(QUKEYS_MIN_PRIOR_INTERVAL); sim_.Press(key_addr_F); sim_.RunForMillis(20); @@ -172,8 +169,8 @@ TEST_F(QukeysBasic, FullOverlap) { } TEST_F(QukeysBasic, RolloverPrimary) { - // XXX Temporary workaround - sim_.RunForMillis(1000); + // Prevent rapid typing suppression from affecting the test + sim_.RunForMillis(QUKEYS_MIN_PRIOR_INTERVAL); sim_.Press(key_addr_F); sim_.RunForMillis(20);