diff --git a/impl/src/main.c b/impl/src/main.c index 030ade1..98d6052 100644 --- a/impl/src/main.c +++ b/impl/src/main.c @@ -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));