CHG: 'lf search' - hitag/cotag wrong return values

CHG: is_justnoise - safety checks
CHG: 'hitag reader' - debug printing
This commit is contained in:
iceman1001 2017-10-30 22:20:08 +01:00
commit 3b1c01cd13
6 changed files with 83 additions and 65 deletions

View file

@ -269,6 +269,10 @@ uint8_t fskClocks(uint8_t *fc1, uint8_t *fc2, uint8_t *rf1, bool verbose, int *f
// By measuring mean and look at amplitude of signal from HIGH / LOW,
// we can detect noise
bool is_justnoise(int *bits, uint32_t size) {
if ( bits == NULL ) return true;
if ( size < 100 ) return true;
//might not be high enough for noisy environments
#define NOICE_AMPLITUDE_THRESHOLD 10;