iso15: fix 2SC (FSK) slow decoding

Previous decoding "count" constants have too large scale that may bug
with some answer. With those new constants, this bug can't happend anymore.
This commit is contained in:
Yann GASCUEL 2022-03-16 17:36:37 +01:00
parent abb840558f
commit d1e186dbe9

View file

@ -661,10 +661,9 @@ static void DecodeTagInit(DecodeTag_t *tag, uint8_t *data, uint16_t max_len) {
#define FREQ_IS_484(f) ((f & 1) == 1) //(f >= 26 && f <= 30)
#define FREQ_IS_424(f) ((f & 2) == 2) //(f >= 30 && f <= 34)
#define FREQ_IS_0(f) ((f & 3) == 0) // (f <= 24 || f >= 36)
#define SEOF_COUNT(c, s) ((s) ? (c >= 11 && c <= 13) : (c >= 44 && c <= 52))
#define LOGIC_COUNT(c, s) ((s) ? (c >= 3 && c <= 6) : (c >= 13 && c <= 21))
#define SEOF_COUNT(c, s) ((s) ? (c >= 11 && c <= 13) : (c >= 45 && c <= 51))
#define LOGIC_COUNT(c, s) ((s) ? (c >= 3 && c <= 6) : (c >= 14 && c <= 20))
#define MAX_COUNT(c, s) ((s) ? (c >= 13) : (c >= 52))
#define MIN_COUNT(c, s) ((s) ? (c <= 2) : (c <= 4))
typedef struct DecodeTagFSK {
enum {