добавлены newline и по мелочи
This commit is contained in:
@@ -309,4 +309,4 @@ static inline void BenchTime_ResetStats(uint8_t channel) {
|
|||||||
|
|
||||||
/** BENCH_TIME
|
/** BENCH_TIME
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -165,4 +165,4 @@ typedef union
|
|||||||
|
|
||||||
/** BIT_ACCESS_DEFINES
|
/** BIT_ACCESS_DEFINES
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -85,8 +85,10 @@ int32_t process_value_int(int32_t raw_adc_quant) {
|
|||||||
#ifdef FILTERS_ENABLE
|
#ifdef FILTERS_ENABLE
|
||||||
|
|
||||||
#ifdef ARM_MATH_CM4
|
#ifdef ARM_MATH_CM4
|
||||||
#include "arm_math.h"
|
#include "arm_math.h"
|
||||||
#define DSP_FITLERS 1
|
#define DSP_FITLERS 1
|
||||||
|
#else
|
||||||
|
#include "math.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -521,4 +523,4 @@ float FilterBiquad_Process(FilterBiquad_t* filter, float input);
|
|||||||
|
|
||||||
#endif // FILTERS_ENABLE
|
#endif // FILTERS_ENABLE
|
||||||
|
|
||||||
#endif // __FILTERS_H_
|
#endif // __FILTERS_H_
|
||||||
|
|||||||
@@ -201,6 +201,12 @@ extern void Error_Handler(void);
|
|||||||
*/
|
*/
|
||||||
#define ABS(x) ( ((x) > 0)? (x) : -(x))
|
#define ABS(x) ( ((x) > 0)? (x) : -(x))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Константа Пи
|
||||||
|
*/
|
||||||
|
#ifndef PI
|
||||||
|
#define PI 3.14159265f
|
||||||
|
#endif
|
||||||
/** UTILS_DEFINES
|
/** UTILS_DEFINES
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
@@ -224,4 +230,4 @@ do{ \
|
|||||||
|
|
||||||
|
|
||||||
/** @endcond */
|
/** @endcond */
|
||||||
#endif //__MYLIBS_TOOLS_H_
|
#endif //__MYLIBS_TOOLS_H_
|
||||||
|
|||||||
@@ -587,4 +587,4 @@ __STATIC_FORCEINLINE void HF_HandleFault(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif //__TRACE_H_
|
#endif //__TRACE_H_
|
||||||
|
|||||||
@@ -159,4 +159,4 @@
|
|||||||
|
|
||||||
#endif //TRACKERS_ENABLE
|
#endif //TRACKERS_ENABLE
|
||||||
|
|
||||||
#endif //__TRACKERS_H_
|
#endif //__TRACKERS_H_
|
||||||
|
|||||||
@@ -354,14 +354,14 @@ float FilterRMS_Process(FilterRMS_t* filter, float input) {
|
|||||||
|
|
||||||
// ==================== INT32_T ВЕРСИИ ====================
|
// ==================== INT32_T ВЕРСИИ ====================
|
||||||
|
|
||||||
// Вспомогательная функция для сравнения int32_t
|
//// Вспомогательная функция для сравнения int32_t
|
||||||
static int Filter_int32_compare(const void *a, const void *b) {
|
//static int Filter_int32_compare(const void *a, const void *b) {
|
||||||
int32_t ia = *(const int32_t*)a;
|
// int32_t ia = *(const int32_t*)a;
|
||||||
int32_t ib = *(const int32_t*)b;
|
// int32_t ib = *(const int32_t*)b;
|
||||||
if (ia < ib) return -1;
|
// if (ia < ib) return -1;
|
||||||
if (ia > ib) return 1;
|
// if (ia > ib) return 1;
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Инициализация медианного фильтра (int32_t)
|
* @brief Инициализация медианного фильтра (int32_t)
|
||||||
@@ -748,7 +748,7 @@ int32_t FilterRMSInt_Process(FilterRMSInt_t* filter, int32_t input) {
|
|||||||
int64_t mean_square = filter->sum_squares / filter->count;
|
int64_t mean_square = filter->sum_squares / filter->count;
|
||||||
// Защита от отрицательных значений
|
// Защита от отрицательных значений
|
||||||
if (mean_square < 0) mean_square = 0;
|
if (mean_square < 0) mean_square = 0;
|
||||||
filter->last_rms = (int32_t)sqrt((double)mean_square);
|
filter->last_rms = (int32_t)_sqrtf((float)mean_square);
|
||||||
}
|
}
|
||||||
|
|
||||||
return filter->last_rms;
|
return filter->last_rms;
|
||||||
|
|||||||
Reference in New Issue
Block a user