Add beats dispay on fallthough on 1

This commit is contained in:
Wesley Ellis 2020-10-27 20:25:04 -04:00
parent 1675a3da79
commit 9d31c7bfb4
3 changed files with 15 additions and 3 deletions

View File

@ -178,7 +178,7 @@ const struct app subapps[]={
{
.name="beats",
.draw=beats_draw, .init=beats_init, .exit=beats_exit,
.keypress=beats_keypress
.keypress=beats_keypress, .fallthrough=beats_fallthrough_keypress
},
#endif

View File

@ -88,4 +88,13 @@ int beats_keypress(char ch) {
} else {
return 0;
}
};
};
//! A button has been pressed in fallthrough mode
int beats_fallthrough_keypress(char ch) {
if(ch == '1') {
beats_draw(1);
}
return 1;
}

View File

@ -11,4 +11,7 @@ int beats_exit();
void beats_draw();
//! A button has been pressed for the beats.
int beats_keypress(char ch);
int beats_keypress(char ch);
//! A button has been pressed in fallthrough mode
int beats_fallthrough_keypress(char ch);