mirror of
https://github.com/Proxmark/proxmark3.git
synced 2024-11-11 09:59:45 +08:00
Fix the AskEdgeDetect cleaning tool
somehow it got broken. (maybe i had an incomplete pull request once upon a time)
This commit is contained in:
parent
c0d32c3186
commit
de53156e1e
1 changed files with 4 additions and 2 deletions
|
@ -879,13 +879,15 @@ int CmdGraphShiftZero(const char *Cmd)
|
|||
int CmdAskEdgeDetect(const char *Cmd)
|
||||
{
|
||||
int thresLen = 25;
|
||||
int Last = 0;
|
||||
sscanf(Cmd, "%i", &thresLen);
|
||||
|
||||
for(int i = 1; i<GraphTraceLen; i++){
|
||||
if (GraphBuffer[i]-GraphBuffer[i-1]>=thresLen) //large jump up
|
||||
GraphBuffer[i-1] = 127;
|
||||
Last = 127;
|
||||
else if(GraphBuffer[i]-GraphBuffer[i-1]<=-1*thresLen) //large jump down
|
||||
GraphBuffer[i-1] = -127;
|
||||
Last = -127;
|
||||
GraphBuffer[i-1] = Last;
|
||||
}
|
||||
RepaintGraphWindow();
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue