diff --git a/flight/AHRS/ahrs_adc.c b/flight/AHRS/ahrs_adc.c index 6834d2251..3389cd765 100644 --- a/flight/AHRS/ahrs_adc.c +++ b/flight/AHRS/ahrs_adc.c @@ -213,7 +213,7 @@ void AHRS_ADC_SetCallback(ADCCallback new_function) /** * @brief Return the address of the downsampled data buffer */ -float * AHRS_ADC_GetBuffer() +float * AHRS_ADC_GetBuffer(void) { return downsampled_buffer; } @@ -221,11 +221,19 @@ float * AHRS_ADC_GetBuffer() /** * @brief Return the address of the raw data data buffer */ -int16_t * AHRS_ADC_GetRawBuffer() +int16_t * AHRS_ADC_GetRawBuffer(void) { return (int16_t *) adc_config.valid_data_buffer; } +/** + * @brief Return the amount of over sampling + */ +uint8_t AHRS_ADC_GetOverSampling(void) +{ + return adc_config.adc_oversample; +} + /** * @brief Set the fir coefficients. Takes as many samples as the * current filter order plus one (normalization) diff --git a/flight/AHRS/inc/ahrs_adc.h b/flight/AHRS/inc/ahrs_adc.h index a0b01d878..82be4859a 100644 --- a/flight/AHRS/inc/ahrs_adc.h +++ b/flight/AHRS/inc/ahrs_adc.h @@ -47,7 +47,8 @@ uint8_t AHRS_ADC_Config(int32_t adc_oversample); void AHRS_ADC_DMA_Handler(void); void AHRS_ADC_SetCallback(ADCCallback); void AHRS_ADC_SetFIRCoefficients(float * new_filter); -float * AHRS_ADC_GetBuffer(); -int16_t * AHRS_ADC_GetRawBuffer(); +float * AHRS_ADC_GetBuffer(void); +int16_t * AHRS_ADC_GetRawBuffer(void); +uint8_t AHRS_ADC_GetOverSampling(void); #endif