mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-14 01:15:38 -04:00
added dfu button to debug app
This commit is contained in:
parent
8382eaf45f
commit
bcefa774cd
10 changed files with 27 additions and 10 deletions
|
@ -42,7 +42,7 @@ using namespace hackrf::one;
|
|||
|
||||
static Thread* thread_controls_event = NULL;
|
||||
|
||||
static std::array<Debounce, 7> switch_debounce;
|
||||
static std::array<Debounce, 8> switch_debounce;
|
||||
|
||||
static Encoder encoder;
|
||||
|
||||
|
@ -193,11 +193,13 @@ void controls_init() {
|
|||
|
||||
SwitchesState get_switches_state() {
|
||||
SwitchesState result;
|
||||
for(size_t i=0; i<result.size(); i++) {
|
||||
for(size_t i=0; i<result.size()-1; i++) {
|
||||
// TODO: Ignore multiple keys at the same time?
|
||||
result[i] = switch_debounce[i].state();
|
||||
}
|
||||
|
||||
result[result.size()-1] = switch_debounce[switch_debounce.size()-1].state();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue