Fixed stack overflow in transmit()
This commit is contained in:
parent
db2700c0f7
commit
fe684f7a1d
|
@ -142,12 +142,14 @@ void cb_rx(rx_evt_t evt, const struct layer1_rx_s *rx, uint8_t *packet_data, siz
|
|||
static result_t transmit(sdr_ctx_t *sdr, const float complex *samples, size_t len)
|
||||
{
|
||||
size_t to_transmit_rf = len * SDR_OVERSAMPLING;
|
||||
float complex rf_samples[to_transmit_rf];
|
||||
float complex *rf_samples = malloc(sizeof(*rf_samples) * to_transmit_rf);
|
||||
|
||||
RESULT_CHECK(sdr_baseband_to_rf(sdr, samples, len, rf_samples, &to_transmit_rf));
|
||||
|
||||
result_t result = sdr_transmit(sdr, rf_samples, to_transmit_rf, 100000);
|
||||
|
||||
free(rf_samples);
|
||||
|
||||
fprintf(stderr, "t");
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue