Тестирование фильтров с шумным сигналом на АЦП
И на рабочем компе mexw64 не блокируется...
This commit is contained in:
@@ -36,52 +36,17 @@
|
||||
|
||||
#ifdef INCLUDE_TRACKERS_LIB
|
||||
#include "trackers.h"
|
||||
#else
|
||||
#define TrackerTypeDef(num_user_vars) void *
|
||||
#define num_of_usercnts(_user_) 0
|
||||
#define assert_tracecnt(_cntstruct_, _uservarnumb_) 0
|
||||
#define if_assert_usertracker(_cntstruct_, _uservarnumb_) if(0)
|
||||
#define tern_assert_usertracker(_cntstruct_, _uservarnumb_) 0
|
||||
#define TrackerGet_Ok(_cntstruct_) dummy
|
||||
#define TrackerGet_Err(_cntstruct_) dummy
|
||||
#define TrackerGet_Warn(_cntstruct_) dummy
|
||||
#define TrackerGet_User(_cntstruct_, _uservarnumb_) dummy
|
||||
#define TrackerCnt_Ok(_cntstruct_)
|
||||
#define TrackerCnt_Err(_cntstruct_)
|
||||
#define TrackerCnt_Warn(_cntstruct_)
|
||||
#define TrackerCnt_User(_cntstruct_, _uservarnumb_)
|
||||
#define TrackerWrite_User(_cntstruct_, _uservarnumb_, _val_)
|
||||
#define TrackerClear_All(_cntstruct_)
|
||||
#define TrackerClear_Ok(_cntstruct_)
|
||||
#define TrackerClear_Err(_cntstruct_)
|
||||
#define TrackerClear_Warn(_cntstruct_)
|
||||
#define TrackerClear_User(_cntstruct_)
|
||||
#define TrackerClear_UserAll(_cntstruct_)
|
||||
#else
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_TRACE_LIB
|
||||
#include "trace.h"
|
||||
#else
|
||||
#define my_printf(...)
|
||||
#define log_printf(TAG, fmt, ...)
|
||||
#define TRACE_GPIO_SET(_gpio_,_pin_)
|
||||
#define TRACE_GPIO_RESET(_gpio_,_pin_)
|
||||
#define RTT_FlashPrepare(...)
|
||||
#define RTT_EraseFlash(...) 0
|
||||
#define RTT_SaveToFlash(...) 0
|
||||
#define RTT_ReadFromFlash(...) 0
|
||||
#define HF_CheckRecovered(...) 0
|
||||
#define HF_HandleFault(...)
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_GEN_OPTIMIZER
|
||||
#include "gen_optimizer.h"
|
||||
#else
|
||||
#define GenOptimizer_t void*
|
||||
#define GenOptimizer_Init(opt, n_params, n_cand, n_best, iq_mutation, start_params)
|
||||
#define GenOptimizer_Step(opt, params, LossFunc)
|
||||
#define PARAM_SCALE_Q16(x, min_val, max_val) (x)
|
||||
#define PARAM_UNSCALE_Q16(q16_val, min_val, max_val) (q16_val)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -89,60 +54,12 @@
|
||||
#ifdef INCLUDE_BENCH_TIME
|
||||
#include "bench_time.h"
|
||||
#else //BENCH_TIME_ENABLE
|
||||
#define BenchTime_Init()
|
||||
#define BenchTime_Start(channel, ticks, tick_period) 0
|
||||
#define BenchTime_End(channel, ticks) 0
|
||||
#define BenchTime_GetMin(channel) 0
|
||||
#define BenchTime_GetMax(channel) 0
|
||||
#define BenchTime_GetAverage(channel) 0
|
||||
#define BenchTime_GetCount(channel) 0
|
||||
#define BenchTime_GetLast(channel) 0
|
||||
#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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user