Skip to content
This repository was archived by the owner on Feb 24, 2021. It is now read-only.

Commit 672d72d

Browse files
committed
CHG: lf visa2000 demod - adding the commandcall, allowing for demods of graphbuffer. (@marshmellow42)
CHG: `lf visa2000 read` - adapting number of samples, from 12000 -> 12500. (@marshmellow42)
1 parent 6795b3d commit 672d72d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

client/cmdlfvisa2000.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ int CmdVisa2kDemod(const char *Cmd) {
139139
return 1;
140140
}
141141

142+
// 64*96*2=12288 samples just in case we just missed the first preamble we can still catch 2 of them
142143
int CmdVisa2kRead(const char *Cmd) {
143144
CmdLFRead("s");
144-
getSamples("12000",TRUE);
145+
getSamples("12500",TRUE);
145146
return CmdVisa2kDemod(Cmd);
146147
}
147148

@@ -207,7 +208,7 @@ int CmdVisa2kSim(const char *Cmd) {
207208

208209
uint32_t blocks[3] = { BL0CK1, id, (visa_parity(id) << 4) | visa_chksum(id) };
209210

210-
for(int i=0; i<3; ++i)
211+
for(int i = 0; i < 3; ++i)
211212
num_to_bytebits(blocks[i], 32, c.d.asBytes + i*32);
212213

213214
clearCommandBuffer();
@@ -217,6 +218,7 @@ int CmdVisa2kSim(const char *Cmd) {
217218

218219
static command_t CommandTable[] = {
219220
{"help", CmdHelp, 1, "This help"},
221+
{"demod", CmdVisa2kDemod, 1, "Attempt to demod from GraphBuffer"},
220222
{"read", CmdVisa2kRead, 0, "Attempt to read and extract tag data"},
221223
{"clone", CmdVisa2kClone, 0, "clone Visa2000 tag"},
222224
{"sim", CmdVisa2kSim, 0, "simulate Visa2000 tag"},

0 commit comments

Comments
 (0)