mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
HF_AVEFUL: allow to exit mode with long press
This commit is contained in:
parent
7b599c7f67
commit
6540b4561c
1 changed files with 4 additions and 1 deletions
|
@ -147,9 +147,10 @@ void RunMod(void) {
|
||||||
int state = STATE_SEARCH;
|
int state = STATE_SEARCH;
|
||||||
|
|
||||||
DbpString("Scanning...");
|
DbpString("Scanning...");
|
||||||
|
int button_pressed = BUTTON_NO_CLICK;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
// Was our button held down or pressed?
|
// Was our button held down or pressed?
|
||||||
int button_pressed = BUTTON_HELD(1000);
|
button_pressed = BUTTON_HELD(1000);
|
||||||
|
|
||||||
if (button_pressed != BUTTON_NO_CLICK || data_available())
|
if (button_pressed != BUTTON_NO_CLICK || data_available())
|
||||||
break;
|
break;
|
||||||
|
@ -248,6 +249,8 @@ void RunMod(void) {
|
||||||
state = STATE_SEARCH;
|
state = STATE_SEARCH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (button_pressed == BUTTON_HOLD) //Holding down the button
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DbpString("exiting");
|
DbpString("exiting");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue