heat80Gear,增加加热探头故障判断
This commit is contained in:
parent
b2e9aeede6
commit
e135ec76e1
|
@ -25,6 +25,7 @@
|
|||
"type_traits": "c",
|
||||
"typeinfo": "c",
|
||||
"xtr1common": "c",
|
||||
"xxexception": "c"
|
||||
"xxexception": "c",
|
||||
"service_statusmonitor.h": "c"
|
||||
}
|
||||
}
|
|
@ -197,7 +197,7 @@ static void task_start (void *p_arg)
|
|||
// term_printf("\n angle init \r\n\r\n");
|
||||
|
||||
|
||||
task_printf_init();
|
||||
// task_printf_init();
|
||||
|
||||
|
||||
//自检模块初始化
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "pdebug.h"
|
||||
#include "cpu.h"
|
||||
#include "tmp75.h"
|
||||
#include "service_statusmonitor.h"
|
||||
/*
|
||||
* 温度采集使用的ADC1
|
||||
*/
|
||||
|
@ -369,15 +370,54 @@ static void ptz_heat_collect_adc1_task()
|
|||
m_heatData.ext_ntc2 = (short int)(Ntc_temp(adc_data, 3950.0f) - 273.15 + 0.5);
|
||||
adc_data = 0;
|
||||
|
||||
|
||||
//判定温度是否异常
|
||||
if (m_heatData.ext_ntc1 < -90 || m_heatData.ext_ntc2 < -90) {
|
||||
g_ptz.fault_detect.temperature_fault = FAULT;
|
||||
// closeHeat();
|
||||
// ntc1温度异常
|
||||
if (m_heatData.ext_ntc1 < -90 && m_heatData.ext_ntc2 >= -90) {
|
||||
//判定是否需要加热
|
||||
if (g_ptz.H_boad_temp < -25 || g_ptz.V_boad_temp < -25
|
||||
|| m_heatData.ext_ntc1 < -25 || m_heatData.ext_ntc2 < -25) {
|
||||
if (m_heatData.ext_ntc2 < -25) {
|
||||
startHeat();
|
||||
}
|
||||
else if (g_ptz.H_boad_temp > -15 && g_ptz.V_boad_temp > -15
|
||||
&& m_heatData.ext_ntc1 > -15 && m_heatData.ext_ntc2 > -15) {
|
||||
else if (m_heatData.ext_ntc2 > -15) {
|
||||
closeHeat();
|
||||
}
|
||||
}
|
||||
|
||||
// ntc2温度异常
|
||||
else if (m_heatData.ext_ntc2 < -90 && m_heatData.ext_ntc1 >= -90) {
|
||||
//判定是否需要加热
|
||||
if (m_heatData.ext_ntc1 < -25) {
|
||||
startHeat();
|
||||
}
|
||||
else if (m_heatData.ext_ntc1 > -15) {
|
||||
closeHeat();
|
||||
}
|
||||
}
|
||||
|
||||
// ntc1、2都温度异常
|
||||
else {
|
||||
//判定是否需要加热
|
||||
if (g_ptz.temperature < -25 || g_ptz.temperature < -25) {
|
||||
startHeat();
|
||||
}
|
||||
else if (g_ptz.temperature > -15 && g_ptz.temperature > -15) {
|
||||
closeHeat();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
//判定是否需要加热
|
||||
if (m_heatData.ext_ntc1 < -25 || m_heatData.ext_ntc2 < -25) {
|
||||
startHeat();
|
||||
}
|
||||
else if (m_heatData.ext_ntc1 > -15 && m_heatData.ext_ntc2 > -15) {
|
||||
closeHeat();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ static char ptz_temp_volt_current_fault_detect_task()
|
|||
g_ptz.fault_detect.temperature_fault = NO_FAULT;
|
||||
}
|
||||
//极限温度故障,用于限制云台功能控制,超过温度阈值10℃有效,此时云台不能正常工作
|
||||
if(g_ptz.temperature > (PTZ_TEMP_DETECT_MAX + 10.0) || g_ptz.temperature < (PTZ_TEMP_DETECT_MIN - 10.0) )
|
||||
if(g_ptz.temperature > (PTZ_TEMP_DETECT_MAX + 10.0) || g_ptz.temperature < (PTZ_TEMP_DETECT_MIN - 5.0) )
|
||||
{
|
||||
max_temperature_fault = FAULT;
|
||||
ptz_hori_stop(PTZ_HORI_STOP_TIME);
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
#ifdef PTZ_MEDIUM_WORM_L6235D_AS5047D
|
||||
//¹¤×÷ζÈãÐÖµ
|
||||
#define PTZ_TEMP_DETECT_MAX 65.0 //70.0
|
||||
#define PTZ_TEMP_DETECT_MIN -25.0//70.0
|
||||
#define PTZ_TEMP_DETECT_MIN -30.0//70.0
|
||||
|
||||
//¹¤×÷µçѹãÐÖµ
|
||||
#define PTZ_VOLT_DETECT_MAX 30.0//30.0
|
||||
|
|
|
@ -825,7 +825,7 @@
|
|||
</option>
|
||||
<option>
|
||||
<name>IlinkIcfFile</name>
|
||||
<state>D:\CompanyCode\NeedChange_AddFunction\4_MedBldc\MedBldc_RxCode\Hyt2\BSP\IAR\GD32F450xE.icf</state>
|
||||
<state>D:\CompanyCode\NeedChange_AddFunction\4_MedBldc\MedBldc_RxCode\Hyt2\BSP\IAR\GD32F450xE_APP.icf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIcfFileSlave</name>
|
||||
|
|
Loading…
Reference in New Issue