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:
Tommy Vestermark
2015-07-10 17:03:23 +02:00
parent 81d7ec9e9f
commit c1fe85b59b

View File

@@ -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);