mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-09 17:56:53 +08:00
@marshmellow42 's fix askAMP 16ea2b8ca3
This commit is contained in:
parent
f3cbb7bc7b
commit
9686a8d4d5
1 changed files with 8 additions and 6 deletions
|
@ -259,13 +259,15 @@ int cleanAskRawDemod(uint8_t *BinStream, size_t *size, int clk, int invert, int
|
||||||
//by marshmellow
|
//by marshmellow
|
||||||
void askAmp(uint8_t *BitStream, size_t size)
|
void askAmp(uint8_t *BitStream, size_t size)
|
||||||
{
|
{
|
||||||
for(size_t i = 1; i<size; i++){
|
uint8_t last = 128;
|
||||||
if (BitStream[i]-BitStream[i-1]>=30) //large jump up
|
for(size_t i = 1; i < size; ++i){
|
||||||
BitStream[i]=255;
|
if (BitStream[i]-BitStream[i-1] >= 30) //large jump up
|
||||||
else if(BitStream[i]-BitStream[i-1]<=-20) //large jump down
|
last = 255;
|
||||||
BitStream[i]=0;
|
else if(BitStream[i-1] - BitStream[i] >= 20) //large jump down
|
||||||
|
last = 0;
|
||||||
|
|
||||||
|
BitStream[i] = last;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//by marshmellow
|
//by marshmellow
|
||||||
|
|
Loading…
Reference in a new issue