Тесты фильтрования
Оно добавляют задержку и сдвиг по фазе надо чет думать
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
#include "upp_config.h"
|
||||
|
||||
// user includes
|
||||
#ifndef MATLAB
|
||||
/**
|
||||
* @addtogroup TRACE_CONFIG Trace configs
|
||||
* @ingroup MYLIBS_CONFIG
|
||||
@@ -53,6 +52,26 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup FILTER_CONFIG Filter configs
|
||||
* @ingroup MYLIBS_CONFIG
|
||||
* @brief Конфигурация фильтров
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
#define FILTERS_ENABLE ///< Включить библиотеку фильтров
|
||||
//#define FILTER_MEDIAN_MAX_SIZE ///< Максимальный размер окна медианного фильтра (по умолчанию 5)
|
||||
//#define FILTER_AVERAGE_MAX_SIZE ///< Максимальный размер окна усредняющего фильтра (по умолчанию 8)
|
||||
//#define FILTER_POLY_MAX_ORDER ///< Максимальный порядок полинома (по умолчанию 4)
|
||||
|
||||
/** GEN_CONFIG
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup GEN_CONFIG Genetic configs
|
||||
* @ingroup MYLIBS_CONFIG
|
||||
@@ -93,6 +112,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef MATLAB
|
||||
#define local_time() uwTick ///< Локальное время
|
||||
|
||||
#define INCLUDE_GEN_OPTIMIZER ///< Подключить библиотеку для оптимизации параметров
|
||||
@@ -100,9 +120,22 @@
|
||||
#define INCLUDE_TRACKERS_LIB ///< Подключить библиотеку с трекерами
|
||||
#define INCLUDE_TRACE_LIB ///< Подключить библиотеку с трейсами
|
||||
#define INCLUDE_GENERAL_PERIPH_LIBS ///< Подключить библиотеку с периферией
|
||||
#define INCLUDE_BENCH_TIME ///< Подключить библиотеку с периферией
|
||||
#define INCLUDE_BENCH_TIME ///< Подключить библиотеку с бенчмарком времени
|
||||
#define INCLUDE_FILTERS ///< Подключить библиотеку с фильтрами
|
||||
//#define FREERTOS_DELAY ///< Использовать FreeRTOS задержку, вместо HAL
|
||||
|
||||
#else
|
||||
|
||||
#define local_time() uwTick ///< Локальное время
|
||||
//#define INCLUDE_GEN_OPTIMIZER ///< Подключить библиотеку для оптимизации параметров
|
||||
#define INCLUDE_BIT_ACCESS_LIB ///< Подключить библиотеку с typedef с битовыми полями
|
||||
#define INCLUDE_TRACKERS_LIB ///< Подключить библиотеку с трекерами
|
||||
//#define INCLUDE_TRACE_LIB ///< Подключить библиотеку с трейсами
|
||||
//#define INCLUDE_GENERAL_PERIPH_LIBS ///< Подключить библиотеку с периферией
|
||||
//#define INCLUDE_BENCH_TIME ///< Подключить библиотеку с бенчмарком времени
|
||||
#define INCLUDE_FILTERS ///< Подключить библиотеку с фильтрами
|
||||
|
||||
#endif //MATLAB
|
||||
/** LIBS_CONFIG
|
||||
* @}
|
||||
*/
|
||||
@@ -110,5 +143,4 @@
|
||||
/** MYLIBS_CONFIG
|
||||
* @}
|
||||
*/
|
||||
#endif //MATLAB
|
||||
#endif //__MYLIBS_CONFIG_H_
|
||||
@@ -100,6 +100,52 @@
|
||||
#define BenchTime_ResetStats(channel)
|
||||
#endif //BENCH_TIME_ENABLE
|
||||
|
||||
|
||||
#ifdef INCLUDE_FILTERS
|
||||
#include "filters.h"
|
||||
#else //INCLUDE_FILTERS
|
||||
// Заглушки для float
|
||||
#define FilterMedian_t void *
|
||||
#define FilterExp_t void *
|
||||
#define FilterAverage_t void *
|
||||
#define FilterPoly_t void *
|
||||
#define FilterLUT_t void *
|
||||
|
||||
#define FilterMedian_Init(filter, size)
|
||||
#define FilterMedian_Process(filter, input) (input)
|
||||
#define FilterExp_Init(filter, alpha)
|
||||
#define FilterExp_Process(filter, input) (input)
|
||||
#define FilterAverage_Init(filter, size)
|
||||
#define FilterAverage_Process(filter, input) (input)
|
||||
#define FilterPoly_Init(filter, coeffs, order) (0)
|
||||
#define FilterPoly_Process(filter, input) (input)
|
||||
#define FilterLUT_Init(filter, input_arr, output_arr, size, interpolation) (0)
|
||||
#define FilterLUT_Process(filter, input) (input)
|
||||
|
||||
// Заглушки для int32_t
|
||||
#define FilterMedianInt_t void *
|
||||
#define FilterExpInt_t void *
|
||||
#define FilterAverageInt_t void *
|
||||
#define FilterPolyInt_t void *
|
||||
#define FilterLUTInt_t void *
|
||||
|
||||
#define FilterMedianInt_Init(filter, size)
|
||||
#define FilterMedianInt_Process(filter, input) (input)
|
||||
#define FilterExpInt_Init(filter, alpha, scale)
|
||||
#define FilterExpInt_Process(filter, input) (input)
|
||||
#define FilterAverageInt_Init(filter, size)
|
||||
#define FilterAverageInt_Process(filter, input) (input)
|
||||
#define FilterPolyInt_Init(filter, coeffs, order, scale) (0)
|
||||
#define FilterPolyInt_Process(filter, input) (input)
|
||||
#define FilterLUTInt_Init(filter, input_arr, output_arr, size, interpolation) (0)
|
||||
#define FilterLUTInt_Process(filter, input) (input)
|
||||
|
||||
#define FILTER_GET_STATE(_fltr_) dummy
|
||||
#define FILTER_ENABLE 0
|
||||
#define FILTER_DISABLE 0
|
||||
#endif //INCLUDE_FILTERS
|
||||
|
||||
|
||||
#ifdef INCLUDE_GENERAL_PERIPH_LIBS
|
||||
|
||||
#include "__general_flash.h"
|
||||
|
||||
Reference in New Issue
Block a user