RX: added some asserts
This commit is contained in:
parent
afb25a69d8
commit
d17b7b3309
|
@ -1,6 +1,8 @@
|
|||
#include <liquid/liquid.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "correlator.h"
|
||||
#include "preamble.h"
|
||||
#include "freq_est.h"
|
||||
|
@ -101,6 +103,8 @@ static bool acquire_preamble(layer1_rx_t *rx, const float complex sample)
|
|||
freq_est_history_write_idx = 0;
|
||||
}
|
||||
|
||||
assert(freq_est_history_write_idx < FREQ_EST_L);
|
||||
|
||||
freq_est_history[freq_est_history_write_idx] = sample;
|
||||
freq_est_history_write_idx++;
|
||||
|
||||
|
@ -280,6 +284,8 @@ result_t layer1_rx_process(layer1_rx_t *rx, const float complex *samples, size_t
|
|||
}
|
||||
}
|
||||
|
||||
assert(nsamples2dump <= (sizeof(samples2dump) / sizeof(samples2dump[0])));
|
||||
|
||||
dump_array_cf(samples2dump, nsamples2dump, 1.0f/(RRC_SPS * SYMBOL_RATE), "/tmp/rx_dbg.cpx64");
|
||||
|
||||
return OK;
|
||||
|
|
Loading…
Reference in a new issue