добавлены newline и по мелочи

This commit is contained in:
2025-12-25 10:33:15 +03:00
parent a6b27da4ce
commit dfbae9be39
7 changed files with 25 additions and 17 deletions

View File

@@ -309,4 +309,4 @@ static inline void BenchTime_ResetStats(uint8_t channel) {
/** BENCH_TIME
* @}
*/
*/

View File

@@ -165,4 +165,4 @@ typedef union
/** BIT_ACCESS_DEFINES
* @}
*/
*/

View File

@@ -85,8 +85,10 @@ int32_t process_value_int(int32_t raw_adc_quant) {
#ifdef FILTERS_ENABLE
#ifdef ARM_MATH_CM4
#include "arm_math.h"
#define DSP_FITLERS 1
#include "arm_math.h"
#define DSP_FITLERS 1
#else
#include "math.h"
#endif
@@ -521,4 +523,4 @@ float FilterBiquad_Process(FilterBiquad_t* filter, float input);
#endif // FILTERS_ENABLE
#endif // __FILTERS_H_
#endif // __FILTERS_H_

View File

@@ -201,6 +201,12 @@ extern void Error_Handler(void);
*/
#define ABS(x) ( ((x) > 0)? (x) : -(x))
/**
* @brief Константа Пи
*/
#ifndef PI
#define PI 3.14159265f
#endif
/** UTILS_DEFINES
* @}
*/
@@ -224,4 +230,4 @@ do{ \
/** @endcond */
#endif //__MYLIBS_TOOLS_H_
#endif //__MYLIBS_TOOLS_H_

View File

@@ -587,4 +587,4 @@ __STATIC_FORCEINLINE void HF_HandleFault(void)
#endif //__TRACE_H_
#endif //__TRACE_H_

View File

@@ -159,4 +159,4 @@
#endif //TRACKERS_ENABLE
#endif //__TRACKERS_H_
#endif //__TRACKERS_H_

View File

@@ -354,14 +354,14 @@ float FilterRMS_Process(FilterRMS_t* filter, float input) {
// ==================== INT32_T ВЕРСИИ ====================
// Вспомогательная функция для сравнения int32_t
static int Filter_int32_compare(const void *a, const void *b) {
int32_t ia = *(const int32_t*)a;
int32_t ib = *(const int32_t*)b;
if (ia < ib) return -1;
if (ia > ib) return 1;
return 0;
}
//// Вспомогательная функция для сравнения int32_t
//static int Filter_int32_compare(const void *a, const void *b) {
// int32_t ia = *(const int32_t*)a;
// int32_t ib = *(const int32_t*)b;
// if (ia < ib) return -1;
// if (ia > ib) return 1;
// return 0;
//}
/**
* @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;
// Защита от отрицательных значений
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;