diff --git a/Hyt2/APP/Device/device_Other/device_heat.c b/Hyt2/APP/Device/device_Other/device_heat.c index 6a2b189..57d1402 100644 --- a/Hyt2/APP/Device/device_Other/device_heat.c +++ b/Hyt2/APP/Device/device_Other/device_heat.c @@ -480,47 +480,50 @@ static char ptz_heat_data_collect_task() ptz_Voltage_collect_adc1_task(); ptz_Current_collect_adc1_task(); ptz_temperature_collect_tmp75_task(); - /*未禁止加热后检测电流,查看是否过流*/ - if ( !heatFlag ) - { - ptz_heat_collect_adc1_task(); - - if ( g_ptz.electric_current > 4.0 ) //过流 - { - overCurrTime++; - } - else - { - currTime = 0; - } - //长时间过流 - if ( overCurrTime >= 20 ) //20*100ms=2s - { - heatFlag = 1; //禁止加热 - closeHeat(); - overCurrTime = 0; - } - } - else - { - if ( g_ptz.electric_current < 2.0 ) //电流恢复正常 - { - currTime++; - } - else - { - currTime = 0; - } - //长时间电流正常 - if ( currTime >= 20 ) //20*100ms=2s - { - heatFlag = 0; //允许加热 - currTime = 0; - } - } - // ptz_heat_collect_adc1_task(); + ptz_heat_collect_adc1_task(); OSTimeDlyHMSM(0u, 0u, 0u, 100u); + // /*未禁止加热后检测电流,查看是否过流*/ + // if ( !heatFlag ) + // { + // // ptz_heat_collect_adc1_task(); + + // if ( g_ptz.electric_current > 4.0 ) //过流 + // { + // overCurrTime++; + // } + // else + // { + // currTime = 0; + // } + // //长时间过流 + // if ( overCurrTime >= 20 ) //20*100ms=2s + // { + // heatFlag = 1; //禁止加热 + // closeHeat(); + // overCurrTime = 0; + // } + // } + // else + // { + // if ( g_ptz.electric_current < 2.0 ) //电流恢复正常 + // { + // currTime++; + // } + // else + // { + // currTime = 0; + // } + // //长时间电流正常 + // if ( currTime >= 20 ) //20*100ms=2s + // { + // heatFlag = 0; //允许加热 + // currTime = 0; + // } + // } + // // ptz_heat_collect_adc1_task(); + + // OSTimeDlyHMSM(0u, 0u, 0u, 100u); } } diff --git a/Hyt2/APP/Service/service_statusmonitor.h b/Hyt2/APP/Service/service_statusmonitor.h index af650af..a41e56b 100644 --- a/Hyt2/APP/Service/service_statusmonitor.h +++ b/Hyt2/APP/Service/service_statusmonitor.h @@ -107,14 +107,14 @@ #define PTZ_VOLT_DETECT_MIN 18.0//30.0 //ֵ - #define PTZ_CURRENT_DETECT 5.5//5.0 + #define PTZ_CURRENT_DETECT 10.0//5.0 //ֵ #define PTZ_HALL_DETECT 30//30 //ֵ // #define PHASE_CURRENT 5.0 - #define PHASE_CURRENT 10.0 + #define PHASE_CURRENT 20.0 #endif //L6235Dϸ̨