lf read adjustments

add parameter for # bits to read
auto get samples after lf read/snoop (don't need to do a `data samples`
anymore)
add safe function to get DemodBuffer
add some lf demod comments and apply new lf_read function instead of
read then get samples.
fixed output bug in lf t55xx config print
fixed small bug in lf t55xx detect during ST check
This commit is contained in:
marshmellow42 2017-04-07 17:28:12 -04:00
commit b9957414a5
27 changed files with 146 additions and 117 deletions

View file

@ -5,7 +5,7 @@
// the license.
//-----------------------------------------------------------------------------
// Low frequency Noralsy tag commands
// ASK/Manchester, STT, RF/32, 96 bits long
// ASK/Manchester, STT, RF/32, 96 bits long (some bits unknown)
//-----------------------------------------------------------------------------
#include "cmdlfnoralsy.h"
#include <string.h>
@ -98,13 +98,14 @@ int NoralsyDemod_AM(uint8_t *dest, size_t *size) {
/*
*
* 2520116 | BB0214FF2529900116360000 | 10111011 00000011 00010100 11111111 00100101 00101001 10010000 00000001 00010110 00110110 00000000 00000000
* aaaaaaaaiii***iiiicc---- iiiiiiii iiiiYYYY YYYY**** iiiiiiii iiiiiiii cccccccc
* aaa*aaaaiiiYY*iiiicc---- **** iiiiiiii iiiiYYYY YYYY**** iiiiiiii iiiiiiii cccccccc
*
* a = fixed value BB0314FF
* a = fixed value BB0*14FF
* i = printed id, BCD-format
* Y = year
* c = checksum
*
* * = unknown
*
**/
//see ASKDemod for what args are accepted
@ -171,8 +172,7 @@ int CmdNoralsyDemod(const char *Cmd) {
}
int CmdNoralsyRead(const char *Cmd) {
CmdLFRead("s");
getSamples("8000",true);
lf_read(true, 8000);
return CmdNoralsyDemod(Cmd);
}