Retry transmitting zeros

This commit is contained in:
Thomas Kolb 2022-04-07 20:58:08 +02:00
parent 31475907d3
commit 3e74093fc7

View file

@ -214,7 +214,13 @@ result_t sdr_flush_tx_buffer(sdr_ctx_t *ctx)
for(int i = 0; i < 4; i++) {
fprintf(stderr, "z");
sdr_transmit(ctx, zeros, sizeof(zeros)/sizeof(zeros[0]), 100000);
unsigned tries = 0;
int ret;
do {
ret = sdr_transmit(ctx, zeros, sizeof(zeros)/sizeof(zeros[0]), 100000);
} while(ret <= 0 && tries++ < 3);
}
return OK;