mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-31 12:00:10 -07:00
make button detection more reliable in standalone mode and add exit command
This commit is contained in:
parent
7a494188f9
commit
693f7cf770
2 changed files with 31 additions and 14 deletions
|
@ -948,8 +948,13 @@ void SamyRun()
|
|||
// record
|
||||
DbpString("Starting recording");
|
||||
|
||||
// wait for button to be released
|
||||
while(BUTTON_PRESS())
|
||||
WDT_HIT();
|
||||
|
||||
/* need this delay to prevent catching some weird data */
|
||||
SpinDelay(500);
|
||||
|
||||
CmdHIDdemodFSK(1, &high[selected], &low[selected], 0);
|
||||
DbpString("Recorded");
|
||||
DbpIntegers(selected, high[selected], low[selected]);
|
||||
|
@ -979,9 +984,18 @@ void SamyRun()
|
|||
{
|
||||
LED(LED_GREEN, 0);
|
||||
DbpString("Playing");
|
||||
// wait for button to be released
|
||||
while(BUTTON_PRESS())
|
||||
WDT_HIT();
|
||||
DbpIntegers(selected, high[selected], low[selected]);
|
||||
CmdHIDsimTAG(high[selected], low[selected], 0);
|
||||
DbpString("Done playing");
|
||||
if (BUTTON_HELD(1000) > 0)
|
||||
{
|
||||
DbpString("Exiting");
|
||||
LEDsoff();
|
||||
return;
|
||||
}
|
||||
|
||||
/* We pressed a button so ignore it here with a delay */
|
||||
SpinDelay(300);
|
||||
|
@ -992,6 +1006,9 @@ void SamyRun()
|
|||
LEDsoff();
|
||||
LED(selected + 1, 0);
|
||||
}
|
||||
else
|
||||
while(BUTTON_PRESS())
|
||||
WDT_HIT();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2633,7 +2633,7 @@ static struct {
|
|||
{"norm", CmdNorm,1, " Normalize max/min to +/-500"},
|
||||
{"plot", CmdPlot,1, " Show graph window"},
|
||||
{"quit", CmdQuit,1, " Quit program"},
|
||||
{"readmem", CmdReadmem,0, " [address] Read memory at decimal address from flash"},
|
||||
{"readmem", CmdReadmem,0, " [address] -- Read memory at decimal address from flash"},
|
||||
{"reset", CmdReset,0, " Reset the Proxmark3"},
|
||||
{"save", CmdSave,1, "<filename> -- Save trace (from graph window)"},
|
||||
{"scale", CmdScale,1, "<int> -- Set cursor display scale"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue