rx-debugging: always dump symbols on packet boundaries
This commit is contained in:
parent
12e727be00
commit
38010ea672
|
@ -253,8 +253,9 @@ result_t layer1_rx_process(layer1_rx_t *rx, const float complex *samples, size_t
|
||||||
|
|
||||||
float complex samples2dump[sample_count];
|
float complex samples2dump[sample_count];
|
||||||
size_t nsamples2dump = 0;
|
size_t nsamples2dump = 0;
|
||||||
float complex samples2dump2[sample_count];
|
|
||||||
size_t nsamples2dump2 = 0;
|
static float complex samples2dump_s[8192];
|
||||||
|
static size_t nsamples2dump_s = 0;
|
||||||
|
|
||||||
// cache configuration flags
|
// cache configuration flags
|
||||||
bool is_central_node = options_is_flag_set(OPTIONS_FLAG_IS_CENTRAL_NODE);
|
bool is_central_node = options_is_flag_set(OPTIONS_FLAG_IS_CENTRAL_NODE);
|
||||||
|
@ -431,7 +432,10 @@ result_t layer1_rx_process(layer1_rx_t *rx, const float complex *samples, size_t
|
||||||
|
|
||||||
var_array_cf_append(&rx->packet_debug_info.data_symbols, mixed_sample);
|
var_array_cf_append(&rx->packet_debug_info.data_symbols, mixed_sample);
|
||||||
|
|
||||||
samples2dump2[nsamples2dump2++] = mixed_sample;
|
if(nsamples2dump_s < sizeof(samples2dump_s)/sizeof(samples2dump_s[0])) {
|
||||||
|
samples2dump_s[nsamples2dump_s++] = mixed_sample;
|
||||||
|
}
|
||||||
|
|
||||||
if(symbol_counter < rx->payload_len_symbols) {
|
if(symbol_counter < rx->payload_len_symbols) {
|
||||||
unsigned int sym_demod;
|
unsigned int sym_demod;
|
||||||
modem_demodulate(rx->payload_demod, mixed_sample, &sym_demod);
|
modem_demodulate(rx->payload_demod, mixed_sample, &sym_demod);
|
||||||
|
@ -450,6 +454,9 @@ result_t layer1_rx_process(layer1_rx_t *rx, const float complex *samples, size_t
|
||||||
unsigned char payload_enc[rx->payload_len_enc_bytes];
|
unsigned char payload_enc[rx->payload_len_enc_bytes];
|
||||||
unsigned char payload[rx->payload_len_bytes+1];
|
unsigned char payload[rx->payload_len_bytes+1];
|
||||||
|
|
||||||
|
dump_array_cf(samples2dump_s, nsamples2dump_s, 1.0f/(SYMBOL_RATE), "/tmp/rx_dbg2.cpx64");
|
||||||
|
nsamples2dump_s = 0;
|
||||||
|
|
||||||
// store debug info about the data
|
// store debug info about the data
|
||||||
rx->packet_debug_info.data_rssi = agc_crcf_get_rssi(rx->agc);
|
rx->packet_debug_info.data_rssi = agc_crcf_get_rssi(rx->agc);
|
||||||
rx->packet_debug_info.data_evm = -1e38f; // FIXME
|
rx->packet_debug_info.data_evm = -1e38f; // FIXME
|
||||||
|
@ -508,7 +515,6 @@ result_t layer1_rx_process(layer1_rx_t *rx, const float complex *samples, size_t
|
||||||
assert(nsamples2dump <= (sizeof(samples2dump) / sizeof(samples2dump[0])));
|
assert(nsamples2dump <= (sizeof(samples2dump) / sizeof(samples2dump[0])));
|
||||||
|
|
||||||
dump_array_cf(samples2dump, nsamples2dump, 1.0f/(RRC_SPS * SYMBOL_RATE), "/tmp/rx_dbg.cpx64");
|
dump_array_cf(samples2dump, nsamples2dump, 1.0f/(RRC_SPS * SYMBOL_RATE), "/tmp/rx_dbg.cpx64");
|
||||||
dump_array_cf(samples2dump2, nsamples2dump2, 1.0f/(SYMBOL_RATE), "/tmp/rx_dbg2.cpx64");
|
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue