This commit is contained in:
nzasch
2022-01-01 02:10:06 +01:00
parent 8fe05fdf5e
commit 9a2f5c0069
11 changed files with 344 additions and 28 deletions

View File

@@ -60,7 +60,7 @@ char uart_tx_buf[UART_TX_BUFFER_SIZE];
uint16_t uart_tx_buf_in_idx;
// bufffah
uint16_t adc_buffer[ADC_BUFFER_SIZE];
uint16_t adc_buffer[RX_ADC_BUFFER_SIZE];
q31_t if_I[LF_BUFFER_SIZE];
q31_t if_Q[LF_BUFFER_SIZE];
@@ -81,7 +81,7 @@ int32_t set_nco1_freq(int32_t freq){
int64_t tmp_increment;
if(modulation == MOD_USB) freq += (NCO2_FREQUENCY);
else if(modulation == MOD_LSB) freq -= (NCO2_FREQUENCY);
tmp_increment = ((int64_t)freq * 0x100000000LL)/ADC_SAMPLE_RATE;
tmp_increment = ((int64_t)freq * 0x100000000LL)/RX_ADC_SAMPLE_RATE;
return (int32_t)tmp_increment;
}
@@ -180,8 +180,8 @@ void state_set_default(void){
// diag
void diag(void){
uart_tx_buf_in_idx += sprintf(uart_tx_buf,"ADC sample rate: %d\nADC oversampling: %d\n", ADC_SAMPLE_RATE, OVERSAMPLING);
uart_tx_buf_in_idx += sprintf(uart_tx_buf,"ADC buffer size: %d\n1st decimation factor: %d\n", ADC_BUFFER_SIZE, MS_DECIMATION_FACTOR * 2);
uart_tx_buf_in_idx += sprintf(uart_tx_buf,"ADC sample rate: %d\nADC oversampling: %d\n", RX_ADC_SAMPLE_RATE, RX_ADC_OVERSAMPLING);
uart_tx_buf_in_idx += sprintf(uart_tx_buf,"ADC buffer size: %d\n1st decimation factor: %d\n", RX_ADC_BUFFER_SIZE, MS_DECIMATION_FACTOR * 2);
uart_tx_buf_in_idx += sprintf(uart_tx_buf,"1st out sample rate: %d\n", ST1_OUT_SAMPLE_RATE);
uart_tx_buf_in_idx += sprintf(uart_tx_buf,"2st buffer size: %d\n2st decimation factor: %d\n", ST2_BUFFER_SIZE, ST2_DECIMATION_FACTOR * 2);
uart_tx_buf_in_idx += sprintf(uart_tx_buf,"2st out sample rate: %d\n", ST2_OUT_SAMPLE_RATE);