Fix the key holding case

For some delays, the holding was not long enough, or it never triggered. Do that
independently of the other cases, in a separate branch, instead of chaining it
into an else branch.

This makes the example work as desired.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent 7f94af85b7
commit febf4a95bd

@ -61,7 +61,9 @@ namespace Akela {
byte col = pgm_read_byte (&(ghostKeys[currentPos].col)); byte col = pgm_read_byte (&(ghostKeys[currentPos].col));
handle_key_event (Key_NoKey, row, col, WAS_PRESSED); handle_key_event (Key_NoKey, row, col, WAS_PRESSED);
} else if (timer < timeOut / 3) { }
if (timer < timeOut / 3) {
byte row = pgm_read_byte (&(ghostKeys[currentPos].row)); byte row = pgm_read_byte (&(ghostKeys[currentPos].row));
byte col = pgm_read_byte (&(ghostKeys[currentPos].col)); byte col = pgm_read_byte (&(ghostKeys[currentPos].col));

Loading…
Cancel
Save