mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
chg: lenient nexwatch demod sizes
This commit is contained in:
parent
00b67e2cdd
commit
4b68ac0a90
1 changed files with 2 additions and 2 deletions
|
@ -157,7 +157,7 @@ int demodNexWatch(void) {
|
||||||
bool invert = false;
|
bool invert = false;
|
||||||
size_t size = DemodBufferLen;
|
size_t size = DemodBufferLen;
|
||||||
int idx = detectNexWatch(DemodBuffer, &size, &invert);
|
int idx = detectNexWatch(DemodBuffer, &size, &invert);
|
||||||
if (idx <= 0) {
|
if (idx < 0) {
|
||||||
if (idx == -1)
|
if (idx == -1)
|
||||||
PrintAndLogEx(DEBUG, "DEBUG: Error - NexWatch not enough samples");
|
PrintAndLogEx(DEBUG, "DEBUG: Error - NexWatch not enough samples");
|
||||||
// else if (idx == -2)
|
// else if (idx == -2)
|
||||||
|
@ -470,7 +470,7 @@ int detectNexWatch(uint8_t *dest, size_t *size, bool *invert) {
|
||||||
|
|
||||||
uint8_t preamble[28] = {0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
uint8_t preamble[28] = {0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||||
// sanity check.
|
// sanity check.
|
||||||
if (*size < sizeof(preamble) + 100) return -1;
|
if (*size < 96) return -1;
|
||||||
|
|
||||||
size_t startIdx = 0;
|
size_t startIdx = 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue