From 0800a15966ef20df7e9d7ea169624eeaf6c29d56 Mon Sep 17 00:00:00 2001 From: zkk <1007518571@qq.com> Date: Thu, 23 Mar 2023 10:38:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=A9=E5=BA=A6=E4=BC=A0=E6=84=9F=E5=99=A8?= =?UTF-8?q?=E6=95=85=E9=9A=9C=E6=97=B6=E7=9B=B4=E6=8E=A5=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=8A=A0=E7=83=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Main.c | 8 ++++++++ app/PWM.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/app/Main.c b/app/Main.c index 6ef013e..6c1b471 100644 --- a/app/Main.c +++ b/app/Main.c @@ -26,6 +26,10 @@ void main() Channel1_Error_Flag = System_Fault; //通道1温度传感器故障 // PWM.Heating_Flag1 = System_Fault; } + else if (ADC.Display_Temp1_Value == 500) + { + Channel1_Error_Flag = System_Fault; //通道1温度传感器故障 + } else { Channel1_Error_Flag = FALSE; @@ -44,6 +48,10 @@ void main() Channel2_Error_Flag = System_Fault; //通道2温度传感器故障 // PWM.Heating_Flag2 = System_Fault; } + else if (ADC.Display_Temp2_Value == 500) + { + Channel2_Error_Flag = System_Fault; //通道1温度传感器故障 + } else { Channel2_Error_Flag = FALSE; diff --git a/app/PWM.c b/app/PWM.c index 2a46848..5686e2f 100644 --- a/app/PWM.c +++ b/app/PWM.c @@ -92,6 +92,7 @@ static void PWM1_HeatingSetting(uint8_t Percent) else { PWM.Heating_Flag1 = System_Fault; + Temp_Value = 0; } } @@ -131,6 +132,7 @@ static void PWM2_HeatingSetting(uint8_t Percent) else { PWM.Heating_Flag2 = System_Fault; + Temp_Value = 0; } }