mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 13:23:25 -07: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 CmdAskEdgeDetect(const char *Cmd)
|
||||||
{
|
{
|
||||||
int thresLen = 25;
|
int thresLen = 25;
|
||||||
|
int Last = 0;
|
||||||
sscanf(Cmd, "%i", &thresLen);
|
sscanf(Cmd, "%i", &thresLen);
|
||||||
|
|
||||||
for(int i = 1; i<GraphTraceLen; i++){
|
for(int i = 1; i<GraphTraceLen; i++){
|
||||||
if (GraphBuffer[i]-GraphBuffer[i-1]>=thresLen) //large jump up
|
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
|
else if(GraphBuffer[i]-GraphBuffer[i-1]<=-1*thresLen) //large jump down
|
||||||
GraphBuffer[i-1] = -127;
|
Last = -127;
|
||||||
|
GraphBuffer[i-1] = Last;
|
||||||
}
|
}
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue