Ensure that buffer is full when transmission starts

This commit is contained in:
Thomas Kolb 2024-01-03 00:33:54 +01:00
parent 628659511c
commit c9d53ed96e

View file

@ -261,13 +261,14 @@ int main(void)
dump_array_cf(whole_burst, burst_len, 1.0f, "/tmp/tx.cpx");
// ensure that the buffer is full before TX is turned on to avoid transmitting empty buffers
RESULT_CHECK(transmit_in_chunks(&sdr, whole_burst, burst_len));
if(!on_air) {
RESULT_CHECK(sdr_stop_rx(&sdr));
RESULT_CHECK(sdr_start_tx(&sdr, burst_len * SDR_OVERSAMPLING));
}
RESULT_CHECK(transmit_in_chunks(&sdr, whole_burst, burst_len));
on_air = true;
} else if(on_air) { // ret == 0
RESULT_CHECK(sdr_flush_tx_buffer(&sdr));