mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[hardware_test] Keyboard test: check only a subset of keys
This commit is contained in:
committed by
LeaNumworks
parent
a515160470
commit
b36f9416b4
@@ -17,10 +17,10 @@ View * KeyboardTestController::view() {
|
||||
|
||||
bool KeyboardTestController::handleEvent(Ion::Events::Event event) {
|
||||
Ion::Keyboard::State state = Ion::Keyboard::scan();
|
||||
Ion::Keyboard::State onlyKeyDown = Ion::Keyboard::State(Ion::Keyboard::ValidKeys[m_keyboardView.testedKeyIndex()]);
|
||||
Ion::Keyboard::State onlyKeyDown = Ion::Keyboard::State(KeyboardModel::TestedKeys[m_keyboardView.testedKeyIndex()]);
|
||||
if (state == onlyKeyDown) {
|
||||
m_keyboardView.setTestedKeyIndex(m_keyboardView.testedKeyIndex()+1);
|
||||
if (m_keyboardView.testedKeyIndex() == Ion::Keyboard::NumberOfValidKeys) {
|
||||
m_keyboardView.setTestedKeyIndex(m_keyboardView.testedKeyIndex() + 1);
|
||||
if (m_keyboardView.testedKeyIndex() == KeyboardModel::NumberOfTestedKeys) {
|
||||
// Returning false will go to the next step in the WizardViewController
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user