int invert=0;
int clk=0;
int maxErr=100;
-
+ //param_getdec(Cmd, 0, &clk);
+ //param_getdec(Cmd, 1, &invert);
+ //maxErr = param_get32ex(Cmd, 2, 0xFFFFFFFF, 10);
+ //if (maxErr == 0xFFFFFFFF) maxErr=100;
uint8_t BitStream[MAX_GRAPH_TRACE_LEN]={0};
sscanf(Cmd, "%i %i %i", &clk, &invert, &maxErr);
if (invert != 0 && invert != 1) {
int offset=0, clk=0, invert=0, maxErr=0, ans=0;
ans = sscanf(Cmd, "%i %i %i %i", &offset, &clk, &invert, &maxErr);
if (ans>0)
- ans = ASKrawDemod(Cmd+2, FALSE);
+ ans = ASKrawDemod(Cmd+1, FALSE);
else
ans = ASKrawDemod(Cmd, FALSE);
if (!ans) {
char cmdp2 = Cmd[1];
int ans = 0;
if (cmdp == 'f' && cmdp2 == 's'){
- ans = CmdFSKrawdemod(Cmd+3);
+ ans = CmdFSKrawdemod(Cmd+2);
} else if(cmdp == 'a' && cmdp2 == 'b'){
- ans = Cmdaskbiphdemod(Cmd+3);
+ ans = Cmdaskbiphdemod(Cmd+2);
} else if(cmdp == 'a' && cmdp2 == 'm'){
- ans = Cmdaskmandemod(Cmd+3);
+ ans = Cmdaskmandemod(Cmd+2);
} else if(cmdp == 'a' && cmdp2 == 'r'){
- ans = Cmdaskrawdemod(Cmd+3);
+ ans = Cmdaskrawdemod(Cmd+2);
} else if(cmdp == 'n' && cmdp2 == 'r'){
- ans = CmdNRZrawDemod(Cmd+3);
+ ans = CmdNRZrawDemod(Cmd+2);
} else if(cmdp == 'p' && cmdp2 == '1'){
- ans = CmdPSK1rawDemod(Cmd+3);
+ ans = CmdPSK1rawDemod(Cmd+2);
} else if(cmdp == 'p' && cmdp2 == '2'){
- ans = CmdPSK2rawDemod(Cmd+3);
+ ans = CmdPSK2rawDemod(Cmd+2);
} else {
PrintAndLog("unknown modulation entered - see help ('h') for parameter structure");
}
uint8_t DetectCleanAskWave(uint8_t dest[], size_t size, int high, int low);
int askmandemod(uint8_t *BinStream, size_t *size, int *clk, int *invert, int maxErr);
uint8_t Em410xDecode(uint8_t *BitStream, size_t *size, size_t *startIdx, uint32_t *hi, uint64_t *lo);
-//uint64_t Em410xDecode(uint8_t *BitStream, size_t *size, size_t *startIdx);
int ManchesterEncode(uint8_t *BitStream, size_t size);
int manrawdecode(uint8_t *BitStream, size_t *size);
int BiphaseRawDecode(uint8_t * BitStream, size_t *size, int offset, int invert);
void psk2TOpsk1(uint8_t *BitStream, size_t size);
int DetectNRZClock(uint8_t dest[], size_t size, int clock);
int indala26decode(uint8_t *bitStream, size_t *size, uint8_t *invert);
-void pskCleanWave(uint8_t *bitStream, size_t size);
int PyramiddemodFSK(uint8_t *dest, size_t *size);
int AWIDdemodFSK(uint8_t *dest, size_t *size);
size_t removeParity(uint8_t *BitStream, size_t startIdx, uint8_t pLen, uint8_t pType, size_t bLen);
int ParadoxdemodFSK(uint8_t *dest, size_t *size, uint32_t *hi2, uint32_t *hi, uint32_t *lo);
uint8_t preambleSearch(uint8_t *BitStream, uint8_t *preamble, size_t pLen, size_t *size, size_t *startIdx);
uint8_t parityTest(uint32_t bits, uint8_t bitLen, uint8_t pType);
-uint8_t justNoise(uint8_t *BitStream, size_t size);
int pskRawDemod(uint8_t dest[], size_t *size, int *clock, int *invert);
int DetectPSKClock(uint8_t dest[], size_t size, int clock);
-void askAmp(uint8_t *BitStream, size_t size);
#endif