rx: add monotonic sample counter for debug messages
This commit is contained in:
parent
0237ea6494
commit
ca241f266b
|
@ -260,6 +260,8 @@ result_t layer1_rx_process(layer1_rx_t *rx, const float complex *samples, size_t
|
|||
DEBUG_LOG("\nagc: %f\n", agc_crcf_get_gain(rx->agc));
|
||||
|
||||
for(unsigned int i = 0; i < sample_count; i++) {
|
||||
rx->sample_index++;
|
||||
|
||||
rx_state_t last_state = rx->state;
|
||||
|
||||
// Apply the AGC.
|
||||
|
@ -560,6 +562,8 @@ result_t layer1_rx_init(layer1_rx_t *rx, rx_callback_t callback)
|
|||
var_array_cf_init(&rx->packet_debug_info.header_symbols);
|
||||
var_array_cf_init(&rx->packet_debug_info.data_symbols);
|
||||
|
||||
rx->sample_index = 0;
|
||||
|
||||
reset_packet_debug_info(rx);
|
||||
|
||||
return OK;
|
||||
|
|
|
@ -73,6 +73,9 @@ typedef struct layer1_rx_s
|
|||
uint16_t payload_len_enc_bytes;
|
||||
modcod_t modcod;
|
||||
|
||||
// sample counter (for debug messages)
|
||||
size_t sample_index;
|
||||
|
||||
// packet debugging information
|
||||
rx_packet_dbg_t packet_debug_info;
|
||||
} layer1_rx_t;
|
||||
|
|
Loading…
Reference in a new issue