From eabfda897f15ebc6959ab2d32eead068de1e5a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zeng=20wei=20=28=E6=9B=BE=E5=A8=81=29?= Date: Mon, 6 May 2024 19:35:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E7=83=AD=E4=B8=8D=E8=B6=B3=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9B=B2=E7=BA=BF=EF=BC=8C=E5=B0=86=E5=8A=A0?= =?UTF-8?q?=E7=83=AD=E7=B3=BB=E6=95=B0hp=E7=9A=84=E6=96=9C=E7=8E=87?= =?UTF-8?q?=E5=A2=9E=E5=A4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HARDWARE/PID.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HARDWARE/PID.c b/HARDWARE/PID.c index 9334848..4e5614c 100644 --- a/HARDWARE/PID.c +++ b/HARDWARE/PID.c @@ -226,7 +226,7 @@ void PID_Calc() // pid calc float t_out = pid.set_tem - pid.out_tem; // 7 float t_in = pid.set_tem - pid.now_tem; // 1.1 float hp_base = -0.003125 * t_out * t_out + 0.1875 * t_out; - pid.hp = (6 - hp_base) / 3 * t_in + hp_base; + pid.hp = (6 - hp_base) / 2 * t_in + hp_base; if (pid.hp < 0) { pid.hp = 0; }