FIX: a minor bug fix from @marshmellow42 in "data raw" and ask/biphase.
ADD: started witha ISO11784/85 demod function.
This commit is contained in:
@@ -589,6 +589,25 @@ size_t removeParity(uint8_t *BitStream, size_t startIdx, uint8_t pLen, uint8_t p
|
||||
//return ID start index and size
|
||||
return bitCnt;
|
||||
}
|
||||
// Ask/Biphase Demod then try to locate an ISO 11784/85 ID
|
||||
int ISO11784demodBI(uint8_t *dest, size_t *size)
|
||||
{
|
||||
//make sure buffer has enough data
|
||||
if (*size < 128*50) return -1;
|
||||
|
||||
if (justNoise(dest, *size)) return -2;
|
||||
|
||||
// FSK demodulator
|
||||
*size = fskdemod(dest, *size, 50, 1, 10, 8); // fsk2a RF/50
|
||||
if (*size < 96) return -3; //did we get a good demod?
|
||||
|
||||
uint8_t preamble[] = {0,0,0,0,0,0,0,0,0,0,1};
|
||||
size_t startIdx = 0;
|
||||
uint8_t errChk = preambleSearch(dest, preamble, sizeof(preamble), size, &startIdx);
|
||||
if (errChk == 0) return -4; //preamble not found
|
||||
if (*size != 128) return -5;
|
||||
return (int)startIdx;
|
||||
}
|
||||
|
||||
// by marshmellow
|
||||
// FSK Demod then try to locate an AWID ID
|
||||
|
||||
@@ -47,5 +47,5 @@ int IOdemodFSK(uint8_t *dest, size_t size);
|
||||
int indala26decode(uint8_t *bitStream, size_t *size, uint8_t *invert);
|
||||
int PyramiddemodFSK(uint8_t *dest, size_t *size);
|
||||
int ParadoxdemodFSK(uint8_t *dest, size_t *size, uint32_t *hi2, uint32_t *hi, uint32_t *lo);
|
||||
|
||||
int ISO11784demodBI(uint8_t *dest, size_t *size);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user