mirror of
https://github.com/merbanan/rtl_433.git
synced 2026-04-23 11:07:09 -04:00
When reading file, add extra empty samples to ensure EOP detection.
Some test data files have too few "idle" samples at the end to ensure end of packet is robustly detected. Decode an extra empty buffer to ensure decoders are flushed.
This commit is contained in:
@@ -1110,6 +1110,11 @@ int main(int argc, char **argv) {
|
||||
rtlsdr_callback(test_mode_buf, 131072, demod);
|
||||
i++;
|
||||
}
|
||||
|
||||
// Call a last time with cleared samples to ensure EOP detection
|
||||
memset(test_mode_buf, 128, DEFAULT_BUF_LENGTH); // 128 is 0 in unsigned data
|
||||
rtlsdr_callback(test_mode_buf, 131072, demod); // Why the magic value 131072?
|
||||
|
||||
//Always classify a signal at the end of the file
|
||||
classify_signal();
|
||||
fprintf(stderr, "Test mode file issued %d packets\n", i);
|
||||
|
||||
Reference in New Issue
Block a user