switch-controller: modify sw behaviour
This commit is contained in:
parent
59486a746a
commit
94518925f8
@ -27,14 +27,12 @@ SwitchController::listen ()
|
||||
/** Button is pressed for the first time */
|
||||
if (b->read () && !b_pressed)
|
||||
{
|
||||
h->HandleState (Event (Event::eKey, b_mode));
|
||||
b_pressed = true;
|
||||
}
|
||||
/** Button is released before 2 seconds*/
|
||||
/** Button is released */
|
||||
if (!b->read () && b_pressed)
|
||||
{
|
||||
h->HandleState (Event (Event::eKey, b_mode));
|
||||
b_pressed = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user