From 37d6f70055a21528fbc9359e039e10482967d3b7 Mon Sep 17 00:00:00 2001 From: RB Date: Thu, 8 May 2025 11:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- User/component/filter.c | 1 + User/component/pid.c | 1 + User/component/user_math.c | 16 +--------------- User/component/user_math.h | 10 +--------- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/User/component/filter.c b/User/component/filter.c index 5375b8e..5905b36 100644 --- a/User/component/filter.c +++ b/User/component/filter.c @@ -3,6 +3,7 @@ */ #include "filter.h" +#include #include "user_math.h" diff --git a/User/component/pid.c b/User/component/pid.c index 704cc54..0eaa255 100644 --- a/User/component/pid.c +++ b/User/component/pid.c @@ -13,6 +13,7 @@ #include "pid.h" +#include #include "user_math.h" #define SIGMA 0.000001f diff --git a/User/component/user_math.c b/User/component/user_math.c index 993e272..a196e80 100644 --- a/User/component/user_math.c +++ b/User/component/user_math.c @@ -5,7 +5,7 @@ #include "user_math.h" #include - +#include inline float InvSqrt(float x) { //#if 0 /* Fast inverse square-root */ @@ -86,17 +86,3 @@ inline void CircleAdd(float *origin, float delta, float range) { * @param origin 被操作的值 */ inline void CircleReverse(float *origin) { *origin = -(*origin) + M_2PI; } - -/** - * @brief 断言失败处理 - * - * @param file 文件名 - * @param line 行号 - */ -void VerifyFailed(const char *file, uint32_t line) { - UNUSED(file); - UNUSED(line); - while (1) { - __NOP(); - } -} diff --git a/User/component/user_math.h b/User/component/user_math.h index 935ceb2..5b6f2d6 100644 --- a/User/component/user_math.h +++ b/User/component/user_math.h @@ -11,7 +11,7 @@ extern "C" { #include #include #include - +#include #define M_DEG2RAD_MULT (0.01745329251f) #define M_RAD2DEG_MULT (57.2957795131f) @@ -128,11 +128,3 @@ void CircleReverse(float *origin); */ #define VERIFY(expr) ((void)(expr)) #endif - -/** - * @brief 断言失败处理 - * - * @param file 文件名 - * @param line 行号 - */ -void VerifyFailed(const char *file, uint32_t line);