Ensure that buffer is full when transmission starts
This commit is contained in:
parent
628659511c
commit
c9d53ed96e
|
@ -261,13 +261,14 @@ int main(void)
|
||||||
|
|
||||||
dump_array_cf(whole_burst, burst_len, 1.0f, "/tmp/tx.cpx");
|
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) {
|
if(!on_air) {
|
||||||
RESULT_CHECK(sdr_stop_rx(&sdr));
|
RESULT_CHECK(sdr_stop_rx(&sdr));
|
||||||
RESULT_CHECK(sdr_start_tx(&sdr, burst_len * SDR_OVERSAMPLING));
|
RESULT_CHECK(sdr_start_tx(&sdr, burst_len * SDR_OVERSAMPLING));
|
||||||
}
|
}
|
||||||
|
|
||||||
RESULT_CHECK(transmit_in_chunks(&sdr, whole_burst, burst_len));
|
|
||||||
|
|
||||||
on_air = true;
|
on_air = true;
|
||||||
} else if(on_air) { // ret == 0
|
} else if(on_air) { // ret == 0
|
||||||
RESULT_CHECK(sdr_flush_tx_buffer(&sdr));
|
RESULT_CHECK(sdr_flush_tx_buffer(&sdr));
|
||||||
|
|
Loading…
Reference in a new issue