mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-20 03:48:33 +08:00
@marshmellow42 's fix the AskEdgeDetect cleaning tool. de53156e1e
This commit is contained in:
parent
9686a8d4d5
commit
180ec86ef0
1 changed files with 8 additions and 5 deletions
|
@ -877,13 +877,16 @@ 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
Reference in a new issue