90 lines
2.0 KiB
C
90 lines
2.0 KiB
C
#include "kC_Features.h"
|
|
#include "Filtering.h"
|
|
|
|
void Signal_Filtering()
|
|
{
|
|
bool AC_State = READ_AC_YX1();
|
|
bool DC_State = READ_DC_YX2();
|
|
bool CHECJ_State = READ_HV_DSG_CHECJ();
|
|
bool CHECJ_2_State = READ_HV_DSG_CHECJ_2();
|
|
|
|
DCU_SendState.AC_Relay_State_Filter = FilteringScan(&ContinuousFiltering[AC_Back_Check_Filter],&AC_State);
|
|
DCU_SendState.DC_Relay_State_Filter = FilteringScan(&ContinuousFiltering[DC_Back_Check_Filter],&DC_State);
|
|
|
|
DCU_SendState.HV_DSG_CHECJ_Signal_Filter = FilteringScan(&ContinuousFiltering[HV_DSG_CHECJ_Filter],&CHECJ_State);
|
|
DCU_SendState.HV_DSG_CHECJ_2_Signal_Filter = FilteringScan(&ContinuousFiltering[HV_DSG_CHECJ_2_Filter],&CHECJ_2_State);
|
|
}
|
|
|
|
void KCAC_ON_GPIO(void)
|
|
{
|
|
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_OFF));
|
|
KC_Set_GPIO(&GetDEVICE_Name(ELS_ON));
|
|
|
|
}
|
|
void KCAC_OFF_GPIO(void)
|
|
{
|
|
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_ON));
|
|
KC_Set_GPIO(&GetDEVICE_Name(ELS_OFF));
|
|
}
|
|
|
|
void KCAC_ReSet_GPIO(void)
|
|
{
|
|
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_ON));
|
|
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_OFF));
|
|
}
|
|
|
|
void KC_ACtEXT_Open(void)
|
|
{
|
|
|
|
KC_Set_GPIO(&GetDEVICE_Name(ELS_ON));
|
|
KC_Set_GPIO(&GetDEVICE_Name(ELS_OFF));
|
|
printf("AC 全高");
|
|
}
|
|
|
|
void KC_ACtEXT_Close(void)
|
|
{
|
|
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_ON));
|
|
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_OFF));
|
|
printf("AC 全低");
|
|
|
|
}
|
|
|
|
void CLOSE_AC_RELAY()
|
|
{
|
|
// OPEN_12VPowerRealy();
|
|
KCAC_OFF_GPIO();//交流继电器断开
|
|
Delay_MS(100);
|
|
KCAC_ReSet_GPIO();
|
|
DCU_SendState.AC_Relay_State = 1;
|
|
printf("CLOSE_ACRealy\r\n");
|
|
}
|
|
|
|
void OPEN_AC_RELAY()
|
|
{
|
|
// CLOSE_12VPowerRealy();
|
|
KCAC_ON_GPIO();//交流继电器闭合
|
|
Delay_MS(100);
|
|
KCAC_ReSet_GPIO();
|
|
DCU_SendState.AC_Relay_State = 0;
|
|
printf("OPEN_ACRealy\r\n");
|
|
}
|
|
|
|
//测试 临时驱动回路 2024-01-21
|
|
|
|
void OPEN_12VPowerRealy(void)
|
|
{
|
|
KC_Set_GPIO(&GetDEVICE_Name(ELS_ON));
|
|
Delay_MS(1);
|
|
KC_Set_GPIO(&GetDEVICE_Name(ELS_OFF));
|
|
Delay_MS(500);
|
|
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_OFF));
|
|
}
|
|
|
|
void CLOSE_12VPowerRealy(void)
|
|
{
|
|
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_ON));
|
|
Delay_MS(1);
|
|
KC_Set_GPIO(&GetDEVICE_Name(ELS_OFF));
|
|
Delay_MS(500);
|
|
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_OFF));
|
|
} |