Some minor fixes
Use longer timeout in WaitForRawDataTimeout() to handle CMD_WTX Fix a wrong type Apply changes to other similar part Remove unused instructions
This commit is contained in:
5 files changed
+19
-17
No files matched your search
+4
-2
@@ -721,7 +721,7 @@ static int lf_read_internal(bool realtime, bool verbose, uint64_t samples) {
|
||||
sample_bytes = (sample_bytes / 8) + (sample_bytes % 8 != 0);
|
||||
|
||||
SendCommandNG(CMD_LF_ACQ_RAW_ADC, (uint8_t *)&payload, sizeof(payload));
|
||||
sample_bytes = WaitForRawDataTimeout(realtimeBuf, sample_bytes, 1000, true);
|
||||
sample_bytes = WaitForRawDataTimeout(realtimeBuf, sample_bytes, 1000 + FPGA_LOAD_WAIT_TIME, true);
|
||||
samples = sample_bytes * 8 / bits_per_sample;
|
||||
getSamplesFromBufEx(realtimeBuf, samples, bits_per_sample, verbose);
|
||||
|
||||
@@ -751,6 +751,7 @@ int lf_read(bool verbose, uint64_t samples) {
|
||||
}
|
||||
|
||||
int CmdLFRead(const char *Cmd) {
|
||||
// In real-time mode, the first few bytes might be the response of CMD_WTX rather than the real samples
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "lf read",
|
||||
"Sniff low frequency signal.\n"
|
||||
@@ -816,7 +817,7 @@ int lf_sniff(bool realtime, bool verbose, uint64_t samples) {
|
||||
sample_bytes = (sample_bytes / 8) + (sample_bytes % 8 != 0);
|
||||
|
||||
SendCommandNG(CMD_LF_SNIFF_RAW_ADC, (uint8_t *)&payload, sizeof(payload));
|
||||
sample_bytes = WaitForRawDataTimeout(realtimeBuf, sample_bytes, 1000, true);
|
||||
sample_bytes = WaitForRawDataTimeout(realtimeBuf, sample_bytes, 1000 + FPGA_LOAD_WAIT_TIME, true);
|
||||
samples = sample_bytes * 8 / bits_per_sample;
|
||||
getSamplesFromBufEx(realtimeBuf, samples, bits_per_sample, verbose);
|
||||
|
||||
@@ -842,6 +843,7 @@ int lf_sniff(bool realtime, bool verbose, uint64_t samples) {
|
||||
}
|
||||
|
||||
int CmdLFSniff(const char *Cmd) {
|
||||
// In real-time mode, the first few bytes might be the response of CMD_WTX rather than the real samples
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "lf sniff",
|
||||
"Sniff low frequency signal. You need to configure the LF part on the Proxmark3 device manually.\n"
|
||||
|
||||
Reference in new issue
Block a user