mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
rename
This commit is contained in:
parent
02c1034caa
commit
58cbe90469
1 changed files with 5 additions and 5 deletions
|
@ -769,22 +769,22 @@ static int CmdBiphaseDecodeRaw(const char *Cmd) {
|
||||||
int ASKbiphaseDemod(int offset, int clk, int invert, int maxErr, bool verbose) {
|
int ASKbiphaseDemod(int offset, int clk, int invert, int maxErr, bool verbose) {
|
||||||
//ask raw demod GraphBuffer first
|
//ask raw demod GraphBuffer first
|
||||||
|
|
||||||
uint8_t BitStream[MAX_DEMOD_BUF_LEN];
|
uint8_t bs[MAX_DEMOD_BUF_LEN];
|
||||||
size_t size = getFromGraphBuf(BitStream);
|
size_t size = getFromGraphBuf(bs);
|
||||||
if (size == 0) {
|
if (size == 0) {
|
||||||
PrintAndLogEx(DEBUG, "DEBUG: no data in graphbuf");
|
PrintAndLogEx(DEBUG, "DEBUG: no data in graphbuf");
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
int startIdx = 0;
|
int startIdx = 0;
|
||||||
//invert here inverts the ask raw demoded bits which has no effect on the demod, but we need the pointer
|
//invert here inverts the ask raw demoded bits which has no effect on the demod, but we need the pointer
|
||||||
int errCnt = askdemod_ext(BitStream, &size, &clk, &invert, maxErr, 0, 0, &startIdx);
|
int errCnt = askdemod_ext(bs, &size, &clk, &invert, maxErr, 0, 0, &startIdx);
|
||||||
if (errCnt < 0 || errCnt > maxErr) {
|
if (errCnt < 0 || errCnt > maxErr) {
|
||||||
PrintAndLogEx(DEBUG, "DEBUG: no data or error found %d, clock: %d", errCnt, clk);
|
PrintAndLogEx(DEBUG, "DEBUG: no data or error found %d, clock: %d", errCnt, clk);
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//attempt to Biphase decode BitStream
|
//attempt to Biphase decode BitStream
|
||||||
errCnt = BiphaseRawDecode(BitStream, &size, &offset, invert);
|
errCnt = BiphaseRawDecode(bs, &size, &offset, invert);
|
||||||
if (errCnt < 0) {
|
if (errCnt < 0) {
|
||||||
if (g_debugMode || verbose) PrintAndLogEx(DEBUG, "DEBUG: Error BiphaseRawDecode: %d", errCnt);
|
if (g_debugMode || verbose) PrintAndLogEx(DEBUG, "DEBUG: Error BiphaseRawDecode: %d", errCnt);
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
|
@ -795,7 +795,7 @@ int ASKbiphaseDemod(int offset, int clk, int invert, int maxErr, bool verbose) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//success set DemodBuffer and return
|
//success set DemodBuffer and return
|
||||||
setDemodBuff(BitStream, size, 0);
|
setDemodBuff(bs, size, 0);
|
||||||
setClockGrid(clk, startIdx + clk * offset / 2);
|
setClockGrid(clk, startIdx + clk * offset / 2);
|
||||||
if (g_debugMode || verbose) {
|
if (g_debugMode || verbose) {
|
||||||
PrintAndLogEx(DEBUG, "Biphase Decoded using offset %d | clock %d | #errors %d | start index %d\ndata\n", offset, clk, errCnt, (startIdx + clk * offset / 2));
|
PrintAndLogEx(DEBUG, "Biphase Decoded using offset %d | clock %d | #errors %d | start index %d\ndata\n", offset, clk, errCnt, (startIdx + clk * offset / 2));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue