Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
DC360_1drap3_xiaoju_V1
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
丁雨邯
DC360_1drap3_xiaoju_V1
Commits
e360e1d9
提交
e360e1d9
authored
5月 18, 2020
作者:
wysheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
删除直流输出接触器反馈检测
上级
22d26c45
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
1370 行增加
和
1248 行删除
+1370
-1248
Drv_BoardIo.c
DcPillar/Src/Drivers/Drv_BoardIo.c
+1110
-1075
Drv_BoardIo.h
DcPillar/Src/Drivers/Drv_BoardIo.h
+23
-23
Drv_TCUComm.c
DcPillar/Src/Drivers/Drv_TCUComm.c
+2
-2
Drv_TCUComm.h
DcPillar/Src/Drivers/Drv_TCUComm.h
+101
-22
ChgPro_WaitVoltChgRun.c
DcPillar/Src/Thread/Charge/ChgPro_WaitVoltChgRun.c
+35
-35
ChgPro_B_WaitVoltChgRun.c
DcPillar/Src/Thread/Charge_B/ChgPro_B_WaitVoltChgRun.c
+35
-35
LcdPro_B_FactoryTest.c
DcPillar/Src/Thread/Lcd/LcdPro_B_FactoryTest.c
+6
-6
LcdPro_B_FactoryTestTwo.c
DcPillar/Src/Thread/Lcd/LcdPro_B_FactoryTestTwo.c
+26
-26
LcdPro_FactoryTest.c
DcPillar/Src/Thread/Lcd/LcdPro_FactoryTest.c
+6
-6
LcdPro_FactoryTestTwo.c
DcPillar/Src/Thread/Lcd/LcdPro_FactoryTestTwo.c
+10
-10
Thd_Mult.c
DcPillar/Src/Thread/Thd_Mult.c
+16
-8
没有找到文件。
DcPillar/Src/Drivers/Drv_BoardIo.c
浏览文件 @
e360e1d9
#include "Drv_BoardIo.h"
#include "Drv_BoardIo.h"
#include "Drv_ImdJyc.h"
#include "Drv_ImdJyc.h"
#include "memory.h"
#include "memory.h"
osTimerId
FanDelayTimer
;
osTimerId
FanDelayTimer
;
osTimerId
FanDelayTimer_Top
;
osTimerId
FanDelayTimer_Top
;
osTimerId
DCOutDelayTimer
;
osTimerId
DCOutDelayTimer
;
osTimerId
DCOutDelayTimer_B
;
osTimerId
DCOutDelayTimer_B
;
osTimerId
DCOutDelayTimer_Uni
;
osTimerId
DCOutDelayTimer_Uni
;
static
EnumSwitchStatus
FanStatus
=
eSwSta_Off
;
static
EnumSwitchStatus
FanStatus
=
eSwSta_Off
;
static
EnumSwitchStatus
FanStatus_Top
=
eSwSta_Off
;
static
EnumSwitchStatus
FanStatus_Top
=
eSwSta_Off
;
static
EnumSwitchStatus
FanStatus_A
=
eSwSta_Off
;
static
EnumSwitchStatus
FanStatus_A
=
eSwSta_Off
;
static
EnumSwitchStatus
FanStatus_B
=
eSwSta_Off
;
static
EnumSwitchStatus
FanStatus_B
=
eSwSta_Off
;
EnumSwitchStatus
ACContactorSta
=
eSwSta_Off
;
EnumSwitchStatus
ACContactorSta
=
eSwSta_Off
;
EnumSwitchStatus
EleLockSta
=
eSwSta_Off
;
EnumSwitchStatus
EleLockSta
=
eSwSta_Off
;
EnumSwitchStatus
EleLockSta_B
=
eSwSta_Off
;
EnumSwitchStatus
EleLockSta_B
=
eSwSta_Off
;
EnumSwitchStatus
DcOutPosSta
=
eSwSta_Off
;
EnumSwitchStatus
DcOutPosSta
=
eSwSta_Off
;
EnumSwitchStatus
DcOutNegSta
=
eSwSta_Off
;
//EnumSwitchStatus DcOutNegSta = eSwSta_Off;
EnumSwitchStatus
DcOutPosSta_B
=
eSwSta_Off
;
EnumSwitchStatus
DcOutPosSta_B
=
eSwSta_Off
;
EnumSwitchStatus
DcOutNegSta_B
=
eSwSta_Off
;
//EnumSwitchStatus DcOutNegSta_B = eSwSta_Off;
EnumSwitchStatus
DcOutPosSta_Uni
=
eSwSta_Off
;
//EnumSwitchStatus DcOutPosSta_Uni = eSwSta_Off;
EnumSwitchStatus
DcOutNegSta_Uni
=
eSwSta_Off
;
//EnumSwitchStatus DcOutNegSta_Uni = eSwSta_Off;
void
BmsPowerInit
(
void
)
void
BmsPowerInit
(
void
)
{
{
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_Pin
=
BmsPower_Pin
;
GPIO_InitStructure
.
GPIO_Pin
=
BmsPower_Pin
;
RCC_AHB1PeriphClockCmd
(
BmsPower_RCC
,
ENABLE
);
RCC_AHB1PeriphClockCmd
(
BmsPower_RCC
,
ENABLE
);
GPIO_Init
(
BmsPower_Port
,
&
GPIO_InitStructure
);
GPIO_Init
(
BmsPower_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
BmsPower_Port
,
BmsPower_Pin
);
GPIO_ResetBits
(
BmsPower_Port
,
BmsPower_Pin
);
}
}
void
BmsPowerSet
(
EnumSwitchStatus
Set
)
void
BmsPowerSet
(
EnumSwitchStatus
Set
)
{
{
if
(
eSwSta_Off
==
Set
)
if
(
eSwSta_Off
==
Set
)
BmsPower_Port
->
BSRRH
=
BmsPower_Pin
;
BmsPower_Port
->
BSRRH
=
BmsPower_Pin
;
else
else
BmsPower_Port
->
BSRRL
=
BmsPower_Pin
;
BmsPower_Port
->
BSRRL
=
BmsPower_Pin
;
}
}
static
void
DCOutDelayHandle
(
void
const
*
Param
)
static
void
DCOutDelayHandle
(
void
const
*
Param
)
{
{
DcOutPos_Port
->
BSRRL
=
DcOutPos_Pin
;
DcOutPos_Port
->
BSRRL
=
DcOutPos_Pin
;
DcOutPosSta
=
eSwSta_On
;
DcOutPosSta
=
eSwSta_On
;
}
}
void
DcOutInit
(
void
)
void
DcOutInit
(
void
)
{
{
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_Pin
=
DcOutPos_Pin
;
GPIO_InitStructure
.
GPIO_Pin
=
DcOutPos_Pin
;
RCC_AHB1PeriphClockCmd
(
DcOutPos_RCC
,
ENABLE
);
RCC_AHB1PeriphClockCmd
(
DcOutPos_RCC
,
ENABLE
);
GPIO_Init
(
DcOutPos_Port
,
&
GPIO_InitStructure
);
GPIO_Init
(
DcOutPos_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
DcOutPos_Port
,
DcOutPos_Pin
);
GPIO_ResetBits
(
DcOutPos_Port
,
DcOutPos_Pin
);
#if 0
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_InitStructure
.
GPIO_Pin
=
DcOutChkPos_Pin
;
GPIO_InitStructure.GPIO_Pin = DcOutNeg_Pin;
RCC_AHB1PeriphClockCmd
(
DcOutChkPos_RCC
,
ENABLE
);
RCC_AHB1PeriphClockCmd(DcOutNeg_RCC, ENABLE);
GPIO_Init
(
DcOutChkPos_Port
,
&
GPIO_InitStructure
);
GPIO_Init(DcOutNeg_Port, &GPIO_InitStructure);
GPIO_ResetBits
(
DcOutChkPos_Port
,
DcOutChkPos_Pin
);
GPIO_ResetBits(DcOutNeg_Port, DcOutNeg_Pin);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure
.
GPIO_Pin
=
DcOutNeg_Pin
;
GPIO_InitStructure.GPIO_Pin = DcOutChkNeg_Pin;
RCC_AHB1PeriphClockCmd
(
DcOutNeg_RCC
,
ENABLE
);
RCC_AHB1PeriphClockCmd(DcOutChkNeg_RCC, ENABLE);
GPIO_Init
(
DcOutNeg_Port
,
&
GPIO_InitStructure
);
GPIO_Init(DcOutChkNeg_Port, &GPIO_InitStructure);
GPIO_ResetBits
(
DcOutNeg_Port
,
DcOutNeg_Pin
);
GPIO_ResetBits(DcOutChkNeg_Port, DcOutChkNeg_Pin);
#endif
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
/* Create a Timer */
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
osTimerDef
(
DCOutDelayTimer
,
DCOutDelayHandle
);
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
DCOutDelayTimer
=
osTimerCreate
(
osTimer
(
DCOutDelayTimer
),
osTimerOnce
,
(
void
*
)
0
);
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
}
GPIO_InitStructure
.
GPIO_Pin
=
DcOutChkNeg_Pin
;
RCC_AHB1PeriphClockCmd
(
DcOutChkNeg_RCC
,
ENABLE
);
void
DcOutPosSet
(
EnumSwitchStatus
Set
)
GPIO_Init
(
DcOutChkNeg_Port
,
&
GPIO_InitStructure
);
{
GPIO_ResetBits
(
DcOutChkNeg_Port
,
DcOutChkNeg_Pin
);
if
(
eSwSta_Off
==
Set
)
DcOutPos_Port
->
BSRRH
=
DcOutPos_Pin
;
/* Create a Timer */
else
osTimerDef
(
DCOutDelayTimer
,
DCOutDelayHandle
);
DcOutPos_Port
->
BSRRL
=
DcOutPos_Pin
;
DCOutDelayTimer
=
osTimerCreate
(
osTimer
(
DCOutDelayTimer
),
osTimerOnce
,
(
void
*
)
0
);
DcOutPosSta
=
Set
;
}
}
/*
void
DcOutPosSet
(
EnumSwitchStatus
Set
)
void DcOutNegSet(EnumSwitchStatus Set)
{
{
if
(
eSwSta_Off
==
Set
)
if(eSwSta_Off == Set)
DcOutPos_Port
->
BSRRH
=
DcOutPos_Pin
;
DcOutNeg_Port->BSRRH = DcOutNeg_Pin;
else
else
DcOutPos_Port
->
BSRRL
=
DcOutPos_Pin
;
DcOutNeg_Port->BSRRL = DcOutNeg_Pin;
DcOutPosSta
=
Set
;
DcOutNegSta = Set;
}
}*/
void
DcOutNegSet
(
EnumSwitchStatus
Set
)
#if 1
{
void
DcOutSet
(
EnumSwitchStatus
Set
)
if
(
eSwSta_Off
==
Set
)
{
DcOutNeg_Port
->
BSRRH
=
DcOutNeg_Pin
;
if
(
eSwSta_Off
==
Set
)
else
{
DcOutNeg_Port
->
BSRRL
=
DcOutNeg_Pin
;
DcOutPosSet
(
Set
);
DcOutNegSta
=
Set
;
//DcOutNegSet(Set);
}
osTimerStop
(
DCOutDelayTimer
);
#if 1
}
void
DcOutSet
(
EnumSwitchStatus
Set
)
else
{
{
if
(
eSwSta_Off
==
Set
)
//DcOutPosSet(Set);
{
//DcOutNegSet(Set);
DcOutPosSet
(
Set
);
osTimerStart
(
DCOutDelayTimer
,
200
);
DcOutNegSet
(
Set
);
}
osTimerStop
(
DCOutDelayTimer
);
}
}
#else
else
void
DcOutSet
(
EnumSwitchStatus
Set
)
{
{
//DcOutPosSet(Set);
DcOutPosSet
(
Set
);
DcOutNegSet
(
Set
);
DcOutNegSet
(
Set
);
osTimerStart
(
DCOutDelayTimer
,
200
);
}
}
#endif
}
/*EnumSwitchStatus DcOutPosGet(void)
#else
{
void
DcOutSet
(
EnumSwitchStatus
Set
)
if(Bit_RESET == GPIO_ReadInputDataBit(DcOutChkPos_Port, DcOutChkPos_Pin))
{
return eSwSta_On;
DcOutPosSet
(
Set
);
return eSwSta_Off;
DcOutNegSet
(
Set
);
}
}
EnumSwitchStatus DcOutNegGet(void)
#endif
{
EnumSwitchStatus
DcOutPosGet
(
void
)
if(Bit_RESET == GPIO_ReadInputDataBit(DcOutChkNeg_Port, DcOutChkNeg_Pin))
{
return eSwSta_On;
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkPos_Port
,
DcOutChkPos_Pin
))
return eSwSta_Off;
return
eSwSta_On
;
}*/
return
eSwSta_Off
;
EnumSwitchStatus
DcOutPosGetSet
(
void
)
}
{
EnumSwitchStatus
DcOutNegGet
(
void
)
return
DcOutPosSta
;
{
}
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkNeg_Port
,
DcOutChkNeg_Pin
))
/*EnumSwitchStatus DcOutNegGetSet(void)
return
eSwSta_On
;
{
return
eSwSta_Off
;
return DcOutNegSta;
}
}
EnumSwitchStatus
DcOutPosGetSet
(
void
)
EnumSwitchStatus DcOutGet(void)
{
{
return
DcOutPosSta
;
if(eSwSta_On == DcOutPosGet())// && eSwSta_On == DcOutNegGet()
}
return eSwSta_On;
EnumSwitchStatus
DcOutNegGetSet
(
void
)
return eSwSta_Off;
{
}*/
return
DcOutNegSta
;
}
void
DrainResistInit
(
void
)
EnumSwitchStatus
DcOutGet
(
void
)
{
{
GPIO_InitTypeDef
GPIO_InitStructure
;
if
(
eSwSta_On
==
DcOutPosGet
())
// && eSwSta_On == DcOutNegGet()
return
eSwSta_On
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
return
eSwSta_Off
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
}
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
void
DrainResistInit
(
void
)
GPIO_InitStructure
.
GPIO_Pin
=
DrainResist_Pin
;
{
RCC_AHB1PeriphClockCmd
(
DrainResist_RCC
,
ENABLE
);
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_Init
(
DrainResist_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
DrainResist_Port
,
DrainResist_Pin
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
void
DrainResistSet
(
EnumSwitchStatus
Set
)
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
{
GPIO_InitStructure
.
GPIO_Pin
=
DrainResist_Pin
;
//if(eSwSta_Off == Set)
RCC_AHB1PeriphClockCmd
(
DrainResist_RCC
,
ENABLE
);
// DrainResist_Port->BSRRH = DrainResist_Pin;
GPIO_Init
(
DrainResist_Port
,
&
GPIO_InitStructure
);
// else
GPIO_ResetBits
(
DrainResist_Port
,
DrainResist_Pin
);
// DrainResist_Port->BSRRL = DrainResist_Pin;
}
}
void
ACContactorSet
(
EnumSwitchStatus
Set
)
void
DrainResistSet
(
EnumSwitchStatus
Set
)
{
{
if
(
eSwSta_Off
==
Set
)
//if(eSwSta_Off == Set)
ACContactor_Port
->
BSRRH
=
ACContactor_Pin
;
// DrainResist_Port->BSRRH = DrainResist_Pin;
else
// else
ACContactor_Port
->
BSRRL
=
ACContactor_Pin
;
// DrainResist_Port->BSRRL = DrainResist_Pin;
}
}
void
ACContactorSet
(
EnumSwitchStatus
Set
)
void
ImdWorkSet
(
EnumSwitchStatus
Set
)
{
{
if
(
eSwSta_Off
==
Set
)
static
EnumSwitchStatus
laststa
=
eSwSta_Off
;
ACContactor_Port
->
BSRRH
=
ACContactor_Pin
;
//if(laststa != Set)
else
{
ACContactor_Port
->
BSRRL
=
ACContactor_Pin
;
if
(
eSwSta_On
==
Set
)
// Ե
}
{
ImdWrite
(
0x0017
,
0x0002
);
void
ImdWorkSet
(
EnumSwitchStatus
Set
)
ImdWrite
(
0x01FE
,
0x0001
);
{
}
static
EnumSwitchStatus
laststa
=
eSwSta_Off
;
else
// رվԵ
//if(laststa != Set)
{
{
ImdWrite
(
0x0017
,
0x0003
);
if
(
eSwSta_On
==
Set
)
// 역폘없鍍쇱꿎
ImdWrite
(
0x01FE
,
0x0001
);
{
}
ImdWrite
(
0x0017
,
0x0002
);
laststa
=
Set
;
ImdWrite
(
0x01FE
,
0x0001
);
}
}
}
else
// 밑균없鍍쇱꿎
{
void
LockInit
(
void
)
ImdWrite
(
0x0017
,
0x0003
);
{
ImdWrite
(
0x01FE
,
0x0001
);
GPIO_InitTypeDef
GPIO_InitStructure
;
}
laststa
=
Set
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
}
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
void
LockInit
(
void
)
GPIO_InitStructure
.
GPIO_Pin
=
Lock_Pin
;
{
RCC_AHB1PeriphClockCmd
(
Lock_RCC
,
ENABLE
);
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_Init
(
Lock_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
Lock_Port
,
Lock_Pin
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_Pin
=
Lock_Pin
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
RCC_AHB1PeriphClockCmd
(
Lock_RCC
,
ENABLE
);
GPIO_InitStructure
.
GPIO_Pin
=
LockChk_Pin
;
GPIO_Init
(
Lock_Port
,
&
GPIO_InitStructure
);
RCC_AHB1PeriphClockCmd
(
LockChk_RCC
,
ENABLE
);
GPIO_ResetBits
(
Lock_Port
,
Lock_Pin
);
GPIO_Init
(
LockChk_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
LockChk_Port
,
LockChk_Pin
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
void
LockSet
(
EnumSwitchStatus
Set
)
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
{
GPIO_InitStructure
.
GPIO_Pin
=
LockChk_Pin
;
if
(
eSwSta_Off
==
Set
)
RCC_AHB1PeriphClockCmd
(
LockChk_RCC
,
ENABLE
);
Lock_Port
->
BSRRH
=
Lock_Pin
;
GPIO_Init
(
LockChk_Port
,
&
GPIO_InitStructure
);
else
GPIO_ResetBits
(
LockChk_Port
,
LockChk_Pin
);
Lock_Port
->
BSRRL
=
Lock_Pin
;
}
EleLockSta
=
Set
;
}
void
LockSet
(
EnumSwitchStatus
Set
)
{
EnumSwitchStatus
LockGet
(
void
)
if
(
eSwSta_Off
==
Set
)
{
Lock_Port
->
BSRRH
=
Lock_Pin
;
if
(
Bit_SET
==
GPIO_ReadInputDataBit
(
LockChk_Port
,
LockChk_Pin
))
else
return
eSwSta_On
;
Lock_Port
->
BSRRL
=
Lock_Pin
;
return
eSwSta_Off
;
EleLockSta
=
Set
;
}
}
EnumSwitchStatus
LockGet
(
void
)
void
ChgLedInit
(
void
)
{
{
if
(
Bit_SET
==
GPIO_ReadInputDataBit
(
LockChk_Port
,
LockChk_Pin
))
GPIO_InitTypeDef
GPIO_InitStructure
;
return
eSwSta_On
;
return
eSwSta_Off
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
void
ChgLedInit
(
void
)
GPIO_InitStructure
.
GPIO_Pin
=
ChgLed_Pin
;
{
RCC_AHB1PeriphClockCmd
(
ChgLed_RCC
,
ENABLE
);
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_Init
(
ChgLed_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
ChgLed_Port
,
ChgLed_Pin
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
void
ChgLedSet
(
EnumSwitchStatus
Set
)
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
{
GPIO_InitStructure
.
GPIO_Pin
=
ChgLed_Pin
;
if
(
eSwSta_Off
==
Set
)
RCC_AHB1PeriphClockCmd
(
ChgLed_RCC
,
ENABLE
);
ChgLed_Port
->
BSRRH
=
ChgLed_Pin
;
GPIO_Init
(
ChgLed_Port
,
&
GPIO_InitStructure
);
else
GPIO_ResetBits
(
ChgLed_Port
,
ChgLed_Pin
);
ChgLed_Port
->
BSRRL
=
ChgLed_Pin
;
}
}
void
ChgLedSet
(
EnumSwitchStatus
Set
)
void
FaultLedInit
(
void
)
{
{
if
(
eSwSta_Off
==
Set
)
GPIO_InitTypeDef
GPIO_InitStructure
;
ChgLed_Port
->
BSRRH
=
ChgLed_Pin
;
else
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
ChgLed_Port
->
BSRRL
=
ChgLed_Pin
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
}
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
void
FaultLedInit
(
void
)
GPIO_InitStructure
.
GPIO_Pin
=
FaultLed_Pin
;
{
RCC_AHB1PeriphClockCmd
(
FaultLed_RCC
,
ENABLE
);
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_Init
(
FaultLed_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
FaultLed_Port
,
FaultLed_Pin
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
void
FaultLedSet
(
EnumSwitchStatus
Set
)
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
{
GPIO_InitStructure
.
GPIO_Pin
=
FaultLed_Pin
;
if
(
eSwSta_Off
==
Set
)
RCC_AHB1PeriphClockCmd
(
FaultLed_RCC
,
ENABLE
);
FaultLed_Port
->
BSRRH
=
FaultLed_Pin
;
GPIO_Init
(
FaultLed_Port
,
&
GPIO_InitStructure
);
else
GPIO_ResetBits
(
FaultLed_Port
,
FaultLed_Pin
);
FaultLed_Port
->
BSRRL
=
FaultLed_Pin
;
}
}
void
FaultLedSet
(
EnumSwitchStatus
Set
)
void
IdleLedInit
(
void
)
{
{
if
(
eSwSta_Off
==
Set
)
GPIO_InitTypeDef
GPIO_InitStructure
;
FaultLed_Port
->
BSRRH
=
FaultLed_Pin
;
else
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
FaultLed_Port
->
BSRRL
=
FaultLed_Pin
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
}
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
void
IdleLedInit
(
void
)
GPIO_InitStructure
.
GPIO_Pin
=
IdleLed_Pin
;
{
RCC_AHB1PeriphClockCmd
(
IdleLed_RCC
,
ENABLE
);
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_Init
(
IdleLed_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
IdleLed_Port
,
IdleLed_Pin
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
void
IdleLedSet
(
EnumSwitchStatus
Set
)
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
{
GPIO_InitStructure
.
GPIO_Pin
=
IdleLed_Pin
;
if
(
eSwSta_Off
==
Set
)
RCC_AHB1PeriphClockCmd
(
IdleLed_RCC
,
ENABLE
);
IdleLed_Port
->
BSRRH
=
IdleLed_Pin
;
GPIO_Init
(
IdleLed_Port
,
&
GPIO_InitStructure
);
else
GPIO_ResetBits
(
IdleLed_Port
,
IdleLed_Pin
);
IdleLed_Port
->
BSRRL
=
IdleLed_Pin
;
}
}
void
IdleLedSet
(
EnumSwitchStatus
Set
)
/*osTimerId RunLedDelayTimer;
{
static void RunLedDelayHandle(void const *Param)
if
(
eSwSta_Off
==
Set
)
{
IdleLed_Port
->
BSRRH
=
IdleLed_Pin
;
RunLed_Port->BSRRH = RunLed_Pin;
else
}*/
IdleLed_Port
->
BSRRL
=
IdleLed_Pin
;
}
void
BmsPowerInit_B
(
void
)
{
/*osTimerId RunLedDelayTimer;
GPIO_InitTypeDef
GPIO_InitStructure
;
static void RunLedDelayHandle(void const *Param)
{
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
RunLed_Port->BSRRH = RunLed_Pin;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
}*/
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
void
BmsPowerInit_B
(
void
)
GPIO_InitStructure
.
GPIO_Pin
=
BmsPower_B_Pin
;
{
RCC_AHB1PeriphClockCmd
(
BmsPower_B_RCC
,
ENABLE
);
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_Init
(
BmsPower_B_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
BmsPower_B_Port
,
BmsPower_B_Pin
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
void
BmsPowerSet_B
(
EnumSwitchStatus
Set
)
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
{
GPIO_InitStructure
.
GPIO_Pin
=
BmsPower_B_Pin
;
if
(
eSwSta_Off
==
Set
)
RCC_AHB1PeriphClockCmd
(
BmsPower_B_RCC
,
ENABLE
);
BmsPower_B_Port
->
BSRRH
=
BmsPower_B_Pin
;
GPIO_Init
(
BmsPower_B_Port
,
&
GPIO_InitStructure
);
else
GPIO_ResetBits
(
BmsPower_B_Port
,
BmsPower_B_Pin
);
BmsPower_B_Port
->
BSRRL
=
BmsPower_B_Pin
;
}
}
void
BmsPowerSet_B
(
EnumSwitchStatus
Set
)
void
ShortCirCheck
(
void
)
{
{
if
(
eSwSta_Off
==
Set
)
GPIO_InitTypeDef
GPIO_InitStructure
;
BmsPower_B_Port
->
BSRRH
=
BmsPower_B_Pin
;
else
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
BmsPower_B_Port
->
BSRRL
=
BmsPower_B_Pin
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
}
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
void
ShortCirCheck
(
void
)
GPIO_InitStructure
.
GPIO_Pin
=
ShortCirCheck_Pin
;
{
RCC_AHB1PeriphClockCmd
(
ShortCirCheck_RCC
,
ENABLE
);
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_Init
(
ShortCirCheck_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
ShortCirCheck_Port
,
ShortCirCheck_Pin
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
void
ShortCirCheckSet
(
EnumSwitchStatus
Set
)
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
{
GPIO_InitStructure
.
GPIO_Pin
=
ShortCirCheck_Pin
;
if
(
eSwSta_Off
==
Set
)
RCC_AHB1PeriphClockCmd
(
ShortCirCheck_RCC
,
ENABLE
);
ShortCirCheck_Port
->
BSRRH
=
ShortCirCheck_Pin
;
GPIO_Init
(
ShortCirCheck_Port
,
&
GPIO_InitStructure
);
else
GPIO_ResetBits
(
ShortCirCheck_Port
,
ShortCirCheck_Pin
);
BmsPower_B_Port
->
BSRRL
=
ShortCirCheck_Pin
;
}
}
void
ShortCirCheckSet
(
EnumSwitchStatus
Set
)
static
void
DCOutDelayHandle_B
(
void
const
*
Param
)
{
{
if
(
eSwSta_Off
==
Set
)
DcOutPos_B_Port
->
BSRRL
=
DcOutPos_B_Pin
;
ShortCirCheck_Port
->
BSRRH
=
ShortCirCheck_Pin
;
DcOutPosSta_B
=
eSwSta_On
;
else
}
BmsPower_B_Port
->
BSRRL
=
ShortCirCheck_Pin
;
}
void
DcOutInit_B
(
void
)
{
static
void
DCOutDelayHandle_B
(
void
const
*
Param
)
GPIO_InitTypeDef
GPIO_InitStructure
;
{
DcOutPos_B_Port
->
BSRRL
=
DcOutPos_B_Pin
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
DcOutPosSta_B
=
eSwSta_On
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
}
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
void
DcOutInit_B
(
void
)
GPIO_InitStructure
.
GPIO_Pin
=
DcOutPos_B_Pin
;
{
RCC_AHB1PeriphClockCmd
(
DcOutPos_B_RCC
,
ENABLE
);
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_Init
(
DcOutPos_B_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
DcOutPos_B_Port
,
DcOutPos_B_Pin
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
/*GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure
.
GPIO_Pin
=
DcOutPos_B_Pin
;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
RCC_AHB1PeriphClockCmd
(
DcOutPos_B_RCC
,
ENABLE
);
GPIO_InitStructure.GPIO_Pin = DcOutNeg_B_Pin;
GPIO_Init
(
DcOutPos_B_Port
,
&
GPIO_InitStructure
);
RCC_AHB1PeriphClockCmd(DcOutNeg_B_RCC, ENABLE);
GPIO_ResetBits
(
DcOutPos_B_Port
,
DcOutPos_B_Pin
);
GPIO_Init(DcOutNeg_B_Port, &GPIO_InitStructure);
GPIO_ResetBits(DcOutNeg_B_Port, DcOutNeg_B_Pin);*/
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
/* Create a Timer */
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
osTimerDef
(
DCOutDelayTimer_B
,
DCOutDelayHandle_B
);
GPIO_InitStructure
.
GPIO_Pin
=
DcOutChkPos_B_Pin
;
DCOutDelayTimer_B
=
osTimerCreate
(
osTimer
(
DCOutDelayTimer_B
),
osTimerOnce
,
(
void
*
)
0
);
RCC_AHB1PeriphClockCmd
(
DcOutChkPos_B_RCC
,
ENABLE
);
}
GPIO_Init
(
DcOutChkPos_B_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
DcOutChkPos_B_Port
,
DcOutChkPos_B_Pin
);
void
DcOutPosSet_B
(
EnumSwitchStatus
Set
)
{
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
if
(
eSwSta_Off
==
Set
)
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
DcOutPos_B_Port
->
BSRRH
=
DcOutPos_B_Pin
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
else
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
DcOutPos_B_Port
->
BSRRL
=
DcOutPos_B_Pin
;
GPIO_InitStructure
.
GPIO_Pin
=
DcOutNeg_B_Pin
;
DcOutPosSta_B
=
Set
;
RCC_AHB1PeriphClockCmd
(
DcOutNeg_B_RCC
,
ENABLE
);
}
GPIO_Init
(
DcOutNeg_B_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
DcOutNeg_B_Port
,
DcOutNeg_B_Pin
);
/*void DcOutNegSet_B(EnumSwitchStatus Set)
{
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
if(eSwSta_Off == Set)
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
DcOutNeg_B_Port->BSRRH = DcOutNeg_B_Pin;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
else
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
DcOutNeg_B_Port->BSRRL = DcOutNeg_B_Pin;
GPIO_InitStructure
.
GPIO_Pin
=
DcOutChkNeg_B_Pin
;
DcOutNegSta_B = Set;
RCC_AHB1PeriphClockCmd
(
DcOutChkNeg_B_RCC
,
ENABLE
);
}
GPIO_Init
(
DcOutChkNeg_B_Port
,
&
GPIO_InitStructure
);
*/
GPIO_ResetBits
(
DcOutChkNeg_B_Port
,
DcOutChkNeg_B_Pin
);
#if 1
/* Create a Timer */
void
DcOutSet_B
(
EnumSwitchStatus
Set
)
osTimerDef
(
DCOutDelayTimer_B
,
DCOutDelayHandle_B
);
{
DCOutDelayTimer_B
=
osTimerCreate
(
osTimer
(
DCOutDelayTimer_B
),
osTimerOnce
,
(
void
*
)
0
);
if
(
eSwSta_Off
==
Set
)
}
{
DcOutPosSet_B
(
Set
);
void
DcOutPosSet_B
(
EnumSwitchStatus
Set
)
//DcOutNegSet_B(Set);
{
osTimerStop
(
DCOutDelayTimer_B
);
if
(
eSwSta_Off
==
Set
)
}
DcOutPos_B_Port
->
BSRRH
=
DcOutPos_B_Pin
;
else
else
{
DcOutPos_B_Port
->
BSRRL
=
DcOutPos_B_Pin
;
//DcOutPosSet_B(Set);
DcOutPosSta_B
=
Set
;
// DcOutNegSet_B(Set);
}
osTimerStart
(
DCOutDelayTimer_B
,
200
);
void
DcOutNegSet_B
(
EnumSwitchStatus
Set
)
}
{
}
if
(
eSwSta_Off
==
Set
)
#else
DcOutNeg_B_Port
->
BSRRH
=
DcOutNeg_B_Pin
;
void
DcOutSet_B
(
EnumSwitchStatus
Set
)
else
{
DcOutNeg_B_Port
->
BSRRL
=
DcOutNeg_B_Pin
;
DcOutPosSet_B
(
Set
);
DcOutNegSta_B
=
Set
;
DcOutNegSet_B
(
Set
);
}
}
#if 1
#endif
void
DcOutSet_B
(
EnumSwitchStatus
Set
)
{
#if 0
if
(
eSwSta_Off
==
Set
)
{
EnumSwitchStatus DcOutPosGet_B(void)
DcOutPosSet_B
(
Set
);
{
DcOutNegSet_B
(
Set
);
if(Bit_RESET == GPIO_ReadInputDataBit(DcOutChkPos_B_Port, DcOutChkPos_B_Pin))
osTimerStop
(
DCOutDelayTimer_B
);
return eSwSta_On;
}
return eSwSta_Off;
else
}
{
EnumSwitchStatus DcOutNegGet_B(void)
//DcOutPosSet_B(Set);
{
DcOutNegSet_B
(
Set
);
if(Bit_RESET == GPIO_ReadInputDataBit(DcOutChkNeg_B_Port, DcOutChkNeg_B_Pin))
osTimerStart
(
DCOutDelayTimer_B
,
200
);
return eSwSta_On;
}
return eSwSta_Off;
}
}
#else
#endif
void
DcOutSet_B
(
EnumSwitchStatus
Set
)
EnumSwitchStatus
DcOutPosGetSet_B
(
void
)
{
{
DcOutPosSet_B
(
Set
);
return
DcOutPosSta_B
;
DcOutNegSet_B
(
Set
);
}
}
/*EnumSwitchStatus DcOutNegGetSet_B(void)
#endif
{
return DcOutNegSta_B;
EnumSwitchStatus
ACContactorGet
(
void
)
}
{
EnumSwitchStatus DcOutGet_B(void)
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkNeg_B_Port
,
DcOutChkNeg_B_Pin
))
{
return
eSwSta_On
;
if(eSwSta_On == DcOutPosGet_B())// && eSwSta_On == DcOutNegGet()
return
eSwSta_Off
;
return eSwSta_On;
}
return eSwSta_Off;
}
EnumSwitchStatus
DcOutPosGet_B
(
void
)
*/
{
void
DrainResistInit_B
(
void
)
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkPos_B_Port
,
DcOutChkPos_B_Pin
))
{
return
eSwSta_On
;
GPIO_InitTypeDef
GPIO_InitStructure
;
return
eSwSta_Off
;
}
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
EnumSwitchStatus
DcOutNegGet_B
(
void
)
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
{
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkNeg_B_Port
,
DcOutChkNeg_B_Pin
))
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
return
eSwSta_On
;
GPIO_InitStructure
.
GPIO_Pin
=
DrainResist_B_Pin
;
return
eSwSta_Off
;
RCC_AHB1PeriphClockCmd
(
DrainResist_B_RCC
,
ENABLE
);
}
GPIO_Init
(
DrainResist_B_Port
,
&
GPIO_InitStructure
);
EnumSwitchStatus
DcOutPosGetSet_B
(
void
)
GPIO_ResetBits
(
DrainResist_B_Port
,
DrainResist_B_Pin
);
{
}
return
DcOutPosSta_B
;
}
void
DrainResistSet_B
(
EnumSwitchStatus
Set
)
EnumSwitchStatus
DcOutNegGetSet_B
(
void
)
{
{
if
(
eSwSta_Off
==
Set
)
return
DcOutNegSta_B
;
DrainResist_B_Port
->
BSRRH
=
DrainResist_B_Pin
;
}
else
EnumSwitchStatus
DcOutGet_B
(
void
)
DrainResist_B_Port
->
BSRRL
=
DrainResist_B_Pin
;
{
}
if
(
eSwSta_On
==
DcOutPosGet_B
())
// && eSwSta_On == DcOutNegGet()
return
eSwSta_On
;
void
ImdWorkSet_B
(
EnumSwitchStatus
Set
)
return
eSwSta_Off
;
{
}
static
EnumSwitchStatus
laststa
=
eSwSta_Off
;
//if(laststa != Set)
void
DrainResistInit_B
(
void
)
{
{
if
(
eSwSta_On
==
Set
)
// Ե
GPIO_InitTypeDef
GPIO_InitStructure
;
{
ImdWrite_B
(
0x0017
,
0x0002
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
ImdWrite_B
(
0x01FE
,
0x0001
);
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
}
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
else
// رվԵ
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
{
GPIO_InitStructure
.
GPIO_Pin
=
DrainResist_B_Pin
;
ImdWrite_B
(
0x0017
,
0x0003
);
RCC_AHB1PeriphClockCmd
(
DrainResist_B_RCC
,
ENABLE
);
ImdWrite_B
(
0x01FE
,
0x0001
);
GPIO_Init
(
DrainResist_B_Port
,
&
GPIO_InitStructure
);
}
GPIO_ResetBits
(
DrainResist_B_Port
,
DrainResist_B_Pin
);
laststa
=
Set
;
}
}
}
void
DrainResistSet_B
(
EnumSwitchStatus
Set
)
{
void
LockInit_B
(
void
)
if
(
eSwSta_Off
==
Set
)
{
DrainResist_B_Port
->
BSRRH
=
DrainResist_B_Pin
;
GPIO_InitTypeDef
GPIO_InitStructure
;
else
DrainResist_B_Port
->
BSRRL
=
DrainResist_B_Pin
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
void
ImdWorkSet_B
(
EnumSwitchStatus
Set
)
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
{
GPIO_InitStructure
.
GPIO_Pin
=
Lock_B_Pin
;
static
EnumSwitchStatus
laststa
=
eSwSta_Off
;
RCC_AHB1PeriphClockCmd
(
Lock_B_RCC
,
ENABLE
);
//if(laststa != Set)
GPIO_Init
(
Lock_B_Port
,
&
GPIO_InitStructure
);
{
GPIO_ResetBits
(
Lock_B_Port
,
Lock_B_Pin
);
if
(
eSwSta_On
==
Set
)
// 역폘없鍍쇱꿎
{
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
ImdWrite_B
(
0x0017
,
0x0002
);
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
ImdWrite_B
(
0x01FE
,
0x0001
);
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
}
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
else
// 밑균없鍍쇱꿎
GPIO_InitStructure
.
GPIO_Pin
=
LockChk_B_Pin
;
{
RCC_AHB1PeriphClockCmd
(
LockChk_B_RCC
,
ENABLE
);
ImdWrite_B
(
0x0017
,
0x0003
);
GPIO_Init
(
LockChk_B_Port
,
&
GPIO_InitStructure
);
ImdWrite_B
(
0x01FE
,
0x0001
);
GPIO_ResetBits
(
LockChk_B_Port
,
LockChk_B_Pin
);
}
}
laststa
=
Set
;
}
void
LockSet_B
(
EnumSwitchStatus
Set
)
}
{
if
(
eSwSta_Off
==
Set
)
void
LockInit_B
(
void
)
Lock_B_Port
->
BSRRH
=
Lock_B_Pin
;
{
else
GPIO_InitTypeDef
GPIO_InitStructure
;
Lock_B_Port
->
BSRRL
=
Lock_B_Pin
;
EleLockSta_B
=
Set
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
EnumSwitchStatus
LockGet_B
(
void
)
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
{
GPIO_InitStructure
.
GPIO_Pin
=
Lock_B_Pin
;
if
(
Bit_SET
==
GPIO_ReadInputDataBit
(
LockChk_B_Port
,
LockChk_B_Pin
))
RCC_AHB1PeriphClockCmd
(
Lock_B_RCC
,
ENABLE
);
return
eSwSta_On
;
GPIO_Init
(
Lock_B_Port
,
&
GPIO_InitStructure
);
return
eSwSta_Off
;
GPIO_ResetBits
(
Lock_B_Port
,
Lock_B_Pin
);
}
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
void
ChgLedInit_B
(
void
)
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
{
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
GPIO_InitStructure
.
GPIO_Pin
=
LockChk_B_Pin
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
RCC_AHB1PeriphClockCmd
(
LockChk_B_RCC
,
ENABLE
);
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_Init
(
LockChk_B_Port
,
&
GPIO_InitStructure
);
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_ResetBits
(
LockChk_B_Port
,
LockChk_B_Pin
);
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
}
GPIO_InitStructure
.
GPIO_Pin
=
ChgLed_B_Pin
;
RCC_AHB1PeriphClockCmd
(
ChgLed_B_RCC
,
ENABLE
);
void
LockSet_B
(
EnumSwitchStatus
Set
)
GPIO_Init
(
ChgLed_B_Port
,
&
GPIO_InitStructure
);
{
GPIO_ResetBits
(
ChgLed_B_Port
,
ChgLed_B_Pin
);
if
(
eSwSta_Off
==
Set
)
}
Lock_B_Port
->
BSRRH
=
Lock_B_Pin
;
else
void
ChgLedSet_B
(
EnumSwitchStatus
Set
)
Lock_B_Port
->
BSRRL
=
Lock_B_Pin
;
{
EleLockSta_B
=
Set
;
if
(
eSwSta_Off
==
Set
)
}
ChgLed_B_Port
->
BSRRH
=
ChgLed_B_Pin
;
else
EnumSwitchStatus
LockGet_B
(
void
)
ChgLed_B_Port
->
BSRRL
=
ChgLed_B_Pin
;
{
}
if
(
Bit_SET
==
GPIO_ReadInputDataBit
(
LockChk_B_Port
,
LockChk_B_Pin
))
return
eSwSta_On
;
void
FaultLedInit_B
(
void
)
return
eSwSta_Off
;
{
}
GPIO_InitTypeDef
GPIO_InitStructure
;
void
ChgLedInit_B
(
void
)
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
{
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Pin
=
FaultLed_B_Pin
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
RCC_AHB1PeriphClockCmd
(
FaultLed_B_RCC
,
ENABLE
);
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_Init
(
FaultLed_B_Port
,
&
GPIO_InitStructure
);
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_ResetBits
(
FaultLed_B_Port
,
FaultLed_B_Pin
);
GPIO_InitStructure
.
GPIO_Pin
=
ChgLed_B_Pin
;
}
RCC_AHB1PeriphClockCmd
(
ChgLed_B_RCC
,
ENABLE
);
GPIO_Init
(
ChgLed_B_Port
,
&
GPIO_InitStructure
);
void
FaultLedSet_B
(
EnumSwitchStatus
Set
)
GPIO_ResetBits
(
ChgLed_B_Port
,
ChgLed_B_Pin
);
{
}
if
(
eSwSta_Off
==
Set
)
FaultLed_B_Port
->
BSRRH
=
FaultLed_B_Pin
;
void
ChgLedSet_B
(
EnumSwitchStatus
Set
)
else
{
FaultLed_B_Port
->
BSRRL
=
FaultLed_B_Pin
;
if
(
eSwSta_Off
==
Set
)
}
ChgLed_B_Port
->
BSRRH
=
ChgLed_B_Pin
;
else
void
IdleLedInit_B
(
void
)
ChgLed_B_Port
->
BSRRL
=
ChgLed_B_Pin
;
{
}
GPIO_InitTypeDef
GPIO_InitStructure
;
void
FaultLedInit_B
(
void
)
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
{
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Pin
=
IdleLed_B_Pin
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
RCC_AHB1PeriphClockCmd
(
IdleLed_B_RCC
,
ENABLE
);
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_Init
(
IdleLed_B_Port
,
&
GPIO_InitStructure
);
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_ResetBits
(
IdleLed_B_Port
,
IdleLed_B_Pin
);
GPIO_InitStructure
.
GPIO_Pin
=
FaultLed_B_Pin
;
}
RCC_AHB1PeriphClockCmd
(
FaultLed_B_RCC
,
ENABLE
);
GPIO_Init
(
FaultLed_B_Port
,
&
GPIO_InitStructure
);
void
IdleLedSet_B
(
EnumSwitchStatus
Set
)
GPIO_ResetBits
(
FaultLed_B_Port
,
FaultLed_B_Pin
);
{
}
if
(
eSwSta_Off
==
Set
)
IdleLed_B_Port
->
BSRRH
=
IdleLed_B_Pin
;
void
FaultLedSet_B
(
EnumSwitchStatus
Set
)
else
{
IdleLed_B_Port
->
BSRRL
=
IdleLed_B_Pin
;
if
(
eSwSta_Off
==
Set
)
}
FaultLed_B_Port
->
BSRRH
=
FaultLed_B_Pin
;
else
/**************************************************************/
FaultLed_B_Port
->
BSRRL
=
FaultLed_B_Pin
;
#if 0
}
static void DCOutDelayHandle_Uni(void const *Param)
{
void
IdleLedInit_B
(
void
)
DcOutPos_Uni_Port->BSRRL = DcOutPos_Uni_Pin;
{
DcOutPosSta_Uni = eSwSta_On;
GPIO_InitTypeDef
GPIO_InitStructure
;
}
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
void DcOutInit_Uni(void)
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
{
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_Pin
=
IdleLed_B_Pin
;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
RCC_AHB1PeriphClockCmd
(
IdleLed_B_RCC
,
ENABLE
);
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_Init
(
IdleLed_B_Port
,
&
GPIO_InitStructure
);
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_ResetBits
(
IdleLed_B_Port
,
IdleLed_B_Pin
);
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
}
GPIO_InitStructure.GPIO_Pin = DcOutPos_Uni_Pin;
RCC_AHB1PeriphClockCmd(DcOutPos_Uni_RCC, ENABLE);
void
IdleLedSet_B
(
EnumSwitchStatus
Set
)
GPIO_Init(DcOutPos_Uni_Port, &GPIO_InitStructure);
{
GPIO_ResetBits(DcOutPos_Uni_Port, DcOutPos_Uni_Pin);
if
(
eSwSta_Off
==
Set
)
IdleLed_B_Port
->
BSRRH
=
IdleLed_B_Pin
;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
else
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
IdleLed_B_Port
->
BSRRL
=
IdleLed_B_Pin
;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
}
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_Pin = DcOutChkPos_Uni_Pin;
/**************************************************************/
RCC_AHB1PeriphClockCmd(DcOutChkPos_Uni_RCC, ENABLE);
GPIO_Init(DcOutChkPos_Uni_Port, &GPIO_InitStructure);
static
void
DCOutDelayHandle_Uni
(
void
const
*
Param
)
GPIO_ResetBits(DcOutChkPos_Uni_Port, DcOutChkPos_Uni_Pin);
{
DcOutPos_Uni_Port
->
BSRRL
=
DcOutPos_Uni_Pin
;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
DcOutPosSta_Uni
=
eSwSta_On
;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
}
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
void
DcOutInit_Uni
(
void
)
GPIO_InitStructure.GPIO_Pin = DcOutNeg_Uni_Pin;
{
RCC_AHB1PeriphClockCmd(DcOutNeg_Uni_RCC, ENABLE);
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_Init(DcOutNeg_Uni_Port, &GPIO_InitStructure);
GPIO_ResetBits(DcOutNeg_Uni_Port, DcOutNeg_Uni_Pin);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure
.
GPIO_Pin
=
DcOutPos_Uni_Pin
;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
RCC_AHB1PeriphClockCmd
(
DcOutPos_Uni_RCC
,
ENABLE
);
GPIO_InitStructure.GPIO_Pin = DcOutChkNeg_Uni_Pin;
GPIO_Init
(
DcOutPos_Uni_Port
,
&
GPIO_InitStructure
);
RCC_AHB1PeriphClockCmd(DcOutChkNeg_Uni_RCC, ENABLE);
GPIO_ResetBits
(
DcOutPos_Uni_Port
,
DcOutPos_Uni_Pin
);
GPIO_Init(DcOutChkNeg_Uni_Port, &GPIO_InitStructure);
GPIO_ResetBits(DcOutChkNeg_Uni_Port, DcOutChkNeg_Uni_Pin);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
/* Create a Timer */
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
osTimerDef(DCOutDelayTimer_Uni, DCOutDelayHandle_Uni);
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
DCOutDelayTimer_Uni = osTimerCreate(osTimer(DCOutDelayTimer_Uni), osTimerOnce, (void *)0);
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
}
GPIO_InitStructure
.
GPIO_Pin
=
DcOutChkPos_Uni_Pin
;
RCC_AHB1PeriphClockCmd
(
DcOutChkPos_Uni_RCC
,
ENABLE
);
void DcOutPosSet_Uni(EnumSwitchStatus Set)
GPIO_Init
(
DcOutChkPos_Uni_Port
,
&
GPIO_InitStructure
);
{
GPIO_ResetBits
(
DcOutChkPos_Uni_Port
,
DcOutChkPos_Uni_Pin
);
/*if(eSwSta_Off == Set)
DcOutPos_Uni_Port->BSRRH = DcOutPos_Uni_Pin;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
else
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
DcOutPos_Uni_Port->BSRRL = DcOutPos_Uni_Pin;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
DcOutPosSta_Uni = Set;*/
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
}
GPIO_InitStructure
.
GPIO_Pin
=
DcOutNeg_Uni_Pin
;
void DcOutNegSet_Uni(EnumSwitchStatus Set)
RCC_AHB1PeriphClockCmd
(
DcOutNeg_Uni_RCC
,
ENABLE
);
{
GPIO_Init
(
DcOutNeg_Uni_Port
,
&
GPIO_InitStructure
);
/*if(eSwSta_Off == Set)
GPIO_ResetBits
(
DcOutNeg_Uni_Port
,
DcOutNeg_Uni_Pin
);
DcOutNeg_Uni_Port->BSRRH = DcOutNeg_Uni_Pin;
else
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
DcOutNeg_Uni_Port->BSRRL = DcOutNeg_Uni_Pin;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
DcOutNegSta_Uni = Set;*/
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
}
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
#if 1
GPIO_InitStructure
.
GPIO_Pin
=
DcOutChkNeg_Uni_Pin
;
void DcOutSet_Uni(EnumSwitchStatus Set)
RCC_AHB1PeriphClockCmd
(
DcOutChkNeg_Uni_RCC
,
ENABLE
);
{
GPIO_Init
(
DcOutChkNeg_Uni_Port
,
&
GPIO_InitStructure
);
if(eSwSta_Off == Set)
GPIO_ResetBits
(
DcOutChkNeg_Uni_Port
,
DcOutChkNeg_Uni_Pin
);
{
/* Create a Timer */
//DcOutPosSet_Uni(Set);
osTimerDef
(
DCOutDelayTimer_Uni
,
DCOutDelayHandle_Uni
);
//DcOutNegSet_Uni(Set);
DCOutDelayTimer_Uni
=
osTimerCreate
(
osTimer
(
DCOutDelayTimer_Uni
),
osTimerOnce
,
(
void
*
)
0
);
//osTimerStop(DCOutDelayTimer_Uni);
}
}
else if(((eSwSta_Off == DcOutGet()) || (eSwSta_Off == DcOutGet_B()))
void
DcOutPosSet_Uni
(
EnumSwitchStatus
Set
)
&& ((eSwSta_Off == DcOutPosGetSet()) || (eSwSta_Off == DcOutPosGetSet_B()))
{
)
/*if(eSwSta_Off == Set)
{
DcOutPos_Uni_Port->BSRRH = DcOutPos_Uni_Pin;
//DcOutPosSet_Uni(Set);
else
//DcOutNegSet_Uni(Set);
DcOutPos_Uni_Port->BSRRL = DcOutPos_Uni_Pin;
//osTimerStart(DCOutDelayTimer_Uni, 200);
DcOutPosSta_Uni = Set;*/
}
}
}
void
DcOutNegSet_Uni
(
EnumSwitchStatus
Set
)
#else
{
void DcOutSet_Uni(EnumSwitchStatus Set)
/*if(eSwSta_Off == Set)
{
DcOutNeg_Uni_Port->BSRRH = DcOutNeg_Uni_Pin;
DcOutPosSet_Uni(Set);
else
DcOutNegSet_Uni(Set);
DcOutNeg_Uni_Port->BSRRL = DcOutNeg_Uni_Pin;
}
DcOutNegSta_Uni = Set;*/
#endif
}
EnumSwitchStatus
DcOutPosGet_Uni
(
void
)
#if 1
{
void
DcOutSet_Uni
(
EnumSwitchStatus
Set
)
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkPos_Uni_Port
,
DcOutChkPos_Uni_Pin
))
{
return
eSwSta_On
;
if
(
eSwSta_Off
==
Set
)
return
eSwSta_Off
;
{
}
//DcOutPosSet_Uni(Set);
EnumSwitchStatus
DcOutNegGet_Uni
(
void
)
//DcOutNegSet_Uni(Set);
{
//osTimerStop(DCOutDelayTimer_Uni);
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkNeg_Uni_Port
,
DcOutChkNeg_Uni_Pin
))
}
return
eSwSta_On
;
else
if
(((
eSwSta_Off
==
DcOutGet
())
||
(
eSwSta_Off
==
DcOutGet_B
()))
return
eSwSta_Off
;
&&
((
eSwSta_Off
==
DcOutPosGetSet
())
||
(
eSwSta_Off
==
DcOutPosGetSet_B
()))
}
)
EnumSwitchStatus
DcOutPosGetSet_Uni
(
void
)
{
{
//DcOutPosSet_Uni(Set);
return
DcOutPosSta_Uni
;
//DcOutNegSet_Uni(Set);
}
//osTimerStart(DCOutDelayTimer_Uni, 200);
EnumSwitchStatus
DcOutNegGetSet_Uni
(
void
)
}
{
}
return
DcOutNegSta_Uni
;
#else
}
void
DcOutSet_Uni
(
EnumSwitchStatus
Set
)
EnumSwitchStatus
DcOutGet_Uni
(
void
)
{
{
DcOutPosSet_Uni
(
Set
);
if
(
eSwSta_On
==
DcOutPosGet_Uni
()
&&
eSwSta_On
==
DcOutNegGet_Uni
())
//
DcOutNegSet_Uni
(
Set
);
return
eSwSta_On
;
}
return
eSwSta_Off
;
#endif
}
EnumSwitchStatus
DcOutPosGet_Uni
(
void
)
#endif
{
void
DehumidifierInit
(
void
)
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkPos_Uni_Port
,
DcOutChkPos_Uni_Pin
))
{
return
eSwSta_On
;
GPIO_InitTypeDef
GPIO_InitStructure
;
return
eSwSta_Off
;
}
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
EnumSwitchStatus
DcOutNegGet_Uni
(
void
)
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
{
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkNeg_Uni_Port
,
DcOutChkNeg_Uni_Pin
))
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
return
eSwSta_On
;
GPIO_InitStructure
.
GPIO_Pin
=
Dehumidifier_Pin
;
return
eSwSta_Off
;
RCC_AHB1PeriphClockCmd
(
Dehumidifier_RCC
,
ENABLE
);
}
GPIO_Init
(
Dehumidifier_Port
,
&
GPIO_InitStructure
);
EnumSwitchStatus
DcOutPosGetSet_Uni
(
void
)
GPIO_ResetBits
(
Dehumidifier_Port
,
Dehumidifier_Pin
);
{
}
return
DcOutPosSta_Uni
;
void
DehumidifierSet
(
EnumSwitchStatus
Set
)
}
{
EnumSwitchStatus
DcOutNegGetSet_Uni
(
void
)
if
(
eSwSta_Off
==
Set
)
{
Dehumidifier_Port
->
BSRRH
=
Dehumidifier_Pin
;
return
DcOutNegSta_Uni
;
else
}
Dehumidifier_Port
->
BSRRL
=
Dehumidifier_Pin
;
EnumSwitchStatus
DcOutGet_Uni
(
void
)
}
{
if
(
eSwSta_On
==
DcOutPosGet_Uni
()
&&
eSwSta_On
==
DcOutNegGet_Uni
())
//
void
RunLedInit
(
void
)
return
eSwSta_On
;
{
return
eSwSta_Off
;
GPIO_InitTypeDef
GPIO_InitStructure
;
}
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
void
DehumidifierInit
(
void
)
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
{
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_Pin
=
RunLed_Pin
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
RCC_AHB1PeriphClockCmd
(
RunLed_RCC
,
ENABLE
);
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_Init
(
RunLed_Port
,
&
GPIO_InitStructure
);
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_ResetBits
(
RunLed_Port
,
RunLed_Pin
);
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_Pin
=
Dehumidifier_Pin
;
/* Create a Timer */
RCC_AHB1PeriphClockCmd
(
Dehumidifier_RCC
,
ENABLE
);
//osTimerDef(RunLedDelayTimer, RunLedDelayHandle);
GPIO_Init
(
Dehumidifier_Port
,
&
GPIO_InitStructure
);
//RunLedDelayTimer = osTimerCreate(osTimer(RunLedDelayTimer), osTimerOnce, (void *)0);
GPIO_ResetBits
(
Dehumidifier_Port
,
Dehumidifier_Pin
);
}
}
void
DehumidifierSet
(
EnumSwitchStatus
Set
)
void
RunLedSet
(
EnumSwitchStatus
Set
)
{
{
if
(
eSwSta_Off
==
Set
)
if
(
eSwSta_On
==
Set
)
Dehumidifier_Port
->
BSRRH
=
Dehumidifier_Pin
;
{
else
//osTimerStart(RunLedDelayTimer, 990);
Dehumidifier_Port
->
BSRRL
=
Dehumidifier_Pin
;
RunLed_Port
->
BSRRH
=
RunLed_Pin
;
}
}
else
void
RunLedInit
(
void
)
{
{
//osTimerStop(RunLedDelayTimer);
GPIO_InitTypeDef
GPIO_InitStructure
;
RunLed_Port
->
BSRRL
=
RunLed_Pin
;
}
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
void
EmergenceInit
(
void
)
GPIO_InitStructure
.
GPIO_Pin
=
RunLed_Pin
;
{
RCC_AHB1PeriphClockCmd
(
RunLed_RCC
,
ENABLE
);
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_Init
(
RunLed_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
RunLed_Port
,
RunLed_Pin
);
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
/* Create a Timer */
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
//osTimerDef(RunLedDelayTimer, RunLedDelayHandle);
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
//RunLedDelayTimer = osTimerCreate(osTimer(RunLedDelayTimer), osTimerOnce, (void *)0);
GPIO_InitStructure
.
GPIO_Pin
=
Emergence_Pin
;
}
RCC_AHB1PeriphClockCmd
(
Emergence_RCC
,
ENABLE
);
GPIO_Init
(
Emergence_Port
,
&
GPIO_InitStructure
);
void
RunLedSet
(
EnumSwitchStatus
Set
)
GPIO_ResetBits
(
Emergence_Port
,
Emergence_Pin
);
{
}
if
(
eSwSta_On
==
Set
)
{
EnumSwitchStatus
EmergenceGet
(
void
)
//osTimerStart(RunLedDelayTimer, 990);
{
RunLed_Port
->
BSRRH
=
RunLed_Pin
;
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
Emergence_Port
,
Emergence_Pin
))
}
return
eSwSta_On
;
else
return
eSwSta_Off
;
{
}
//osTimerStop(RunLedDelayTimer);
RunLed_Port
->
BSRRL
=
RunLed_Pin
;
void
DoorChkInit
(
void
)
}
{
}
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
void
EmergenceInit
(
void
)
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
{
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_Pin
=
DoorChk_Pin
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
RCC_AHB1PeriphClockCmd
(
DoorChk_RCC
,
ENABLE
);
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_Init
(
DoorChk_Port
,
&
GPIO_InitStructure
);
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_ResetBits
(
DoorChk_Port
,
DoorChk_Pin
);
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
}
GPIO_InitStructure
.
GPIO_Pin
=
Emergence_Pin
;
RCC_AHB1PeriphClockCmd
(
Emergence_RCC
,
ENABLE
);
EnumSwitchStatus
DoorChkGet
(
void
)
GPIO_Init
(
Emergence_Port
,
&
GPIO_InitStructure
);
{
GPIO_ResetBits
(
Emergence_Port
,
Emergence_Pin
);
if
(
Bit_SET
==
GPIO_ReadInputDataBit
(
DoorChk_Port
,
DoorChk_Pin
))
}
return
eSwSta_On
;
return
eSwSta_Off
;
EnumSwitchStatus
EmergenceGet
(
void
)
}
{
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
Emergence_Port
,
Emergence_Pin
))
void
SPDInit
(
void
)
return
eSwSta_On
;
{
return
eSwSta_Off
;
GPIO_InitTypeDef
GPIO_InitStructure
;
}
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
void
DoorChkInit
(
void
)
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
{
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_Pin
=
SPD_Pin
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
RCC_AHB1PeriphClockCmd
(
SPD_RCC
,
ENABLE
);
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_Init
(
SPD_Port
,
&
GPIO_InitStructure
);
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_ResetBits
(
SPD_Port
,
SPD_Pin
);
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
}
GPIO_InitStructure
.
GPIO_Pin
=
DoorChk_Pin
;
RCC_AHB1PeriphClockCmd
(
DoorChk_RCC
,
ENABLE
);
EnumSwitchStatus
SPDGet
(
void
)
GPIO_Init
(
DoorChk_Port
,
&
GPIO_InitStructure
);
{
GPIO_ResetBits
(
DoorChk_Port
,
DoorChk_Pin
);
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
SPD_Port
,
SPD_Pin
))
}
return
eSwSta_On
;
return
eSwSta_Off
;
EnumSwitchStatus
DoorChkGet
(
void
)
}
{
if
(
Bit_SET
==
GPIO_ReadInputDataBit
(
DoorChk_Port
,
DoorChk_Pin
))
static
void
FanDelayHandle
(
void
const
*
Param
)
return
eSwSta_On
;
{
return
eSwSta_Off
;
Fan_Port
->
BSRRH
=
Fan_Pin
;
}
ACContactorSet
(
eSwSta_Off
);
}
void
SPDInit
(
void
)
void
FanInit
(
void
)
{
{
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitTypeDef
GPIO_InitStructure
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
GPIO_InitStructure
.
GPIO_Pin
=
SPD_Pin
;
GPIO_InitStructure
.
GPIO_Pin
=
Fan_Pin
;
RCC_AHB1PeriphClockCmd
(
SPD_RCC
,
ENABLE
);
RCC_AHB1PeriphClockCmd
(
Fan_RCC
,
ENABLE
);
GPIO_Init
(
SPD_Port
,
&
GPIO_InitStructure
);
GPIO_Init
(
Fan_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
SPD_Port
,
SPD_Pin
);
GPIO_ResetBits
(
Fan_Port
,
Fan_Pin
);
}
/* Create a Timer */
EnumSwitchStatus
SPDGet
(
void
)
osTimerDef
(
FanDelayTimer
,
FanDelayHandle
);
{
FanDelayTimer
=
osTimerCreate
(
osTimer
(
FanDelayTimer
),
osTimerOnce
,
(
void
*
)
0
);
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
SPD_Port
,
SPD_Pin
))
}
return
eSwSta_On
;
void
FanSet_Side
(
EnumSwitchStatus
Set
)
return
eSwSta_Off
;
{
}
if
(
FanStatus
==
Set
)
return
;
static
void
FanDelayHandle
(
void
const
*
Param
)
{
if
(
eSwSta_Off
==
Set
)
Fan_Port
->
BSRRH
=
Fan_Pin
;
osTimerStart
(
FanDelayTimer
,
120000
);
ACContactorSet
(
eSwSta_Off
);
else
}
{
void
FanInit
(
void
)
osTimerStop
(
FanDelayTimer
);
{
Fan_Port
->
BSRRL
=
Fan_Pin
;
GPIO_InitTypeDef
GPIO_InitStructure
;
ACContactorSet
(
eSwSta_On
);
}
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
FanStatus
=
Set
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
}
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
void
FanSetExt
(
EnumSwitchStatus
Set
)
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
{
GPIO_InitStructure
.
GPIO_Pin
=
Fan_Pin
;
osTimerStop
(
FanDelayTimer
);
RCC_AHB1PeriphClockCmd
(
Fan_RCC
,
ENABLE
);
if
(
eSwSta_Off
==
Set
)
GPIO_Init
(
Fan_Port
,
&
GPIO_InitStructure
);
Fan_Port
->
BSRRH
=
Fan_Pin
;
GPIO_ResetBits
(
Fan_Port
,
Fan_Pin
);
else
Fan_Port
->
BSRRL
=
Fan_Pin
;
/* Create a Timer */
FanStatus
=
Set
;
osTimerDef
(
FanDelayTimer
,
FanDelayHandle
);
}
FanDelayTimer
=
osTimerCreate
(
osTimer
(
FanDelayTimer
),
osTimerOnce
,
(
void
*
)
0
);
}
static
void
FanDelayHandle_Top
(
void
const
*
Param
)
void
FanSet_Side
(
EnumSwitchStatus
Set
)
{
{
Fan_Top_Port
->
BSRRH
=
Fan_Top_Pin
;
if
(
FanStatus
==
Set
)
}
return
;
void
FanInit_Top
(
void
)
{
if
(
eSwSta_Off
==
Set
)
GPIO_InitTypeDef
GPIO_InitStructure
;
osTimerStart
(
FanDelayTimer
,
120000
);
else
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
{
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
osTimerStop
(
FanDelayTimer
);
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
Fan_Port
->
BSRRL
=
Fan_Pin
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
ACContactorSet
(
eSwSta_On
);
GPIO_InitStructure
.
GPIO_Pin
=
Fan_Top_Pin
;
}
RCC_AHB1PeriphClockCmd
(
Fan_Top_RCC
,
ENABLE
);
FanStatus
=
Set
;
GPIO_Init
(
Fan_Top_Port
,
&
GPIO_InitStructure
);
}
GPIO_ResetBits
(
Fan_Top_Port
,
Fan_Top_Pin
);
void
FanSetExt
(
EnumSwitchStatus
Set
)
{
/* Create a Timer */
osTimerStop
(
FanDelayTimer
);
osTimerDef
(
FanDelayTimer_Top
,
FanDelayHandle_Top
);
if
(
eSwSta_Off
==
Set
)
FanDelayTimer_Top
=
osTimerCreate
(
osTimer
(
FanDelayTimer_Top
),
osTimerOnce
,
(
void
*
)
0
);
Fan_Port
->
BSRRH
=
Fan_Pin
;
}
else
void
FanSet_Top
(
EnumSwitchStatus
Set
)
Fan_Port
->
BSRRL
=
Fan_Pin
;
{
FanStatus
=
Set
;
if
(
FanStatus_Top
==
Set
)
}
return
;
static
void
FanDelayHandle_Top
(
void
const
*
Param
)
if
(
eSwSta_Off
==
Set
)
{
osTimerStart
(
FanDelayTimer_Top
,
120000
);
Fan_Top_Port
->
BSRRH
=
Fan_Top_Pin
;
else
}
{
void
FanInit_Top
(
void
)
osTimerStop
(
FanDelayTimer_Top
);
{
Fan_Top_Port
->
BSRRL
=
Fan_Top_Pin
;
GPIO_InitTypeDef
GPIO_InitStructure
;
}
FanStatus_Top
=
Set
;
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
}
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
void
FanSetExt_Top
(
EnumSwitchStatus
Set
)
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
{
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
osTimerStop
(
FanDelayTimer_Top
);
GPIO_InitStructure
.
GPIO_Pin
=
Fan_Top_Pin
;
if
(
eSwSta_Off
==
Set
)
RCC_AHB1PeriphClockCmd
(
Fan_Top_RCC
,
ENABLE
);
Fan_Top_Port
->
BSRRH
=
Fan_Top_Pin
;
GPIO_Init
(
Fan_Top_Port
,
&
GPIO_InitStructure
);
else
GPIO_ResetBits
(
Fan_Top_Port
,
Fan_Top_Pin
);
Fan_Top_Port
->
BSRRL
=
Fan_Top_Pin
;
FanStatus_Top
=
Set
;
/* Create a Timer */
}
osTimerDef
(
FanDelayTimer_Top
,
FanDelayHandle_Top
);
FanDelayTimer_Top
=
osTimerCreate
(
osTimer
(
FanDelayTimer_Top
),
osTimerOnce
,
(
void
*
)
0
);
void
FanControl
(
EnumSwitchStatus
Set
)
}
{
void
FanSet_Top
(
EnumSwitchStatus
Set
)
FanSet_Side
(
Set
);
{
if
(
0
!=
UserParam
.
ChgFun
.
Value
.
TopFan
)
if
(
FanStatus_Top
==
Set
)
{
return
;
//FanSet_Top(eSwSta_Off);
//FanSet_Top(Set);
if
(
eSwSta_Off
==
Set
)
}
osTimerStart
(
FanDelayTimer_Top
,
120000
);
else
else
{
{
// FanSet_Top(eSwSta_Off);
osTimerStop
(
FanDelayTimer_Top
);
}
Fan_Top_Port
->
BSRRL
=
Fan_Top_Pin
;
}
}
FanStatus_Top
=
Set
;
void
FanSet
(
EnumSwitchStatus
Set
)
}
{
void
FanSetExt_Top
(
EnumSwitchStatus
Set
)
if
(
eSwSta_Off
==
Set
)
{
{
osTimerStop
(
FanDelayTimer_Top
);
if
(
eSwSta_Off
==
FanStatus_B
)
if
(
eSwSta_Off
==
Set
)
FanControl
(
Set
);
Fan_Top_Port
->
BSRRH
=
Fan_Top_Pin
;
}
else
else
Fan_Top_Port
->
BSRRL
=
Fan_Top_Pin
;
FanControl
(
Set
);
FanStatus_Top
=
Set
;
FanStatus_A
=
Set
;
}
}
void
FanControl
(
EnumSwitchStatus
Set
)
void
FanSet_B
(
EnumSwitchStatus
Set
)
{
{
FanSet_Side
(
Set
);
if
(
eSwSta_Off
==
Set
)
if
(
0
!=
UserParam
.
ChgFun
.
Value
.
TopFan
)
{
{
if
(
eSwSta_Off
==
FanStatus_A
)
//FanSet_Top(eSwSta_Off);
FanControl
(
Set
);
//FanSet_Top(Set);
}
}
else
else
FanControl
(
Set
);
{
FanStatus_B
=
Set
;
// FanSet_Top(eSwSta_Off);
}
}
}
void
BmsPowerSet_AB
(
EnumSwitchStatus
Set
)
{
void
FanSet
(
EnumSwitchStatus
Set
)
BmsPowerSet
(
Set
);
{
//BmsPowerSet_B(Set);
if
(
eSwSta_Off
==
Set
)
}
{
void
DcOutSet_AB
(
EnumSwitchStatus
Set
)
if
(
eSwSta_Off
==
FanStatus_B
)
{
FanControl
(
Set
);
DcOutSet
(
Set
);
}
DcOutSet_B
(
Set
);
else
}
FanControl
(
Set
);
void
DrainResistSet_AB
(
EnumSwitchStatus
Set
)
FanStatus_A
=
Set
;
{
}
DrainResistSet
(
Set
);
DrainResistSet_B
(
Set
);
void
FanSet_B
(
EnumSwitchStatus
Set
)
}
{
if
(
eSwSta_Off
==
Set
)
void
FanSet_AB
(
EnumSwitchStatus
Set
)
{
{
if
(
eSwSta_Off
==
FanStatus_A
)
FanSet
(
Set
);
FanControl
(
Set
);
FanSet_B
(
Set
);
}
}
else
void
ImdWorkSet_AB
(
EnumSwitchStatus
Set
)
FanControl
(
Set
);
{
FanStatus_B
=
Set
;
ImdWorkSet
(
Set
);
}
//ImdWorkSet_B(Set);
}
void
BmsPowerSet_AB
(
EnumSwitchStatus
Set
)
void
LockSet_AB
(
EnumSwitchStatus
Set
)
{
{
BmsPowerSet
(
Set
);
//BmsPowerSet_B(Set);
LockSet
(
Set
);
}
LockSet_B
(
Set
);
void
DcOutSet_AB
(
EnumSwitchStatus
Set
)
}
{
EnumSwitchStatus
LockGet_AB
(
void
)
DcOutSet
(
Set
);
{
DcOutSet_B
(
Set
);
}
if
((
eSwSta_Off
==
LockGet
())
||
(
eSwSta_Off
==
LockGet_B
()))
void
DrainResistSet_AB
(
EnumSwitchStatus
Set
)
return
eSwSta_Off
;
{
else
DrainResistSet
(
Set
);
return
eSwSta_On
;
DrainResistSet_B
(
Set
);
}
}
void
FanSet_AB
(
EnumSwitchStatus
Set
)
{
/**********************************************************/
FanSet
(
Set
);
FanSet_B
(
Set
);
void
SystemReboot
(
void
)
}
{
void
ImdWorkSet_AB
(
EnumSwitchStatus
Set
)
NVIC_SystemReset
();
{
}
ImdWorkSet
(
Set
);
//ImdWorkSet_B(Set);
//交流接触器
}
void
ACContactorInit
(
void
)
void
LockSet_AB
(
EnumSwitchStatus
Set
)
{
{
GPIO_InitTypeDef
GPIO_InitStructure
;
LockSet
(
Set
);
LockSet_B
(
Set
);
//控制脚
}
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
EnumSwitchStatus
LockGet_AB
(
void
)
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
{
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
if
((
eSwSta_Off
==
LockGet
())
||
(
eSwSta_Off
==
LockGet_B
()))
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
return
eSwSta_Off
;
GPIO_InitStructure
.
GPIO_Pin
=
ACContactor_Pin
;
else
RCC_AHB1PeriphClockCmd
(
ACContactor_RCC
,
ENABLE
);
return
eSwSta_On
;
GPIO_Init
(
ACContactor_Port
,
&
GPIO_InitStructure
);
}
GPIO_ResetBits
(
ACContactor_Port
,
ACContactor_Pin
);
//反馈脚
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
/**********************************************************/
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
void
SystemReboot
(
void
)
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
{
GPIO_InitStructure
.
GPIO_Pin
=
DcOutChkNeg_B_Pin
;
NVIC_SystemReset
();
RCC_AHB1PeriphClockCmd
(
DcOutChkNeg_B_RCC
,
ENABLE
);
}
GPIO_Init
(
DcOutChkNeg_B_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
DcOutChkNeg_B_Port
,
DcOutChkNeg_B_Pin
);
void
ACContactorInit
(
void
)
}
{
GPIO_InitTypeDef
GPIO_InitStructure
;
EnumSwitchStatus
ACContactorGet
(
void
)
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_OUT
;
{
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkNeg_B_Port
,
DcOutChkNeg_B_Pin
))
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
return
eSwSta_On
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_UP
;
return
eSwSta_Off
;
GPIO_InitStructure
.
GPIO_Pin
=
ACContactor_Pin
;
}
RCC_AHB1PeriphClockCmd
(
ACContactor_RCC
,
ENABLE
);
GPIO_Init
(
ACContactor_Port
,
&
GPIO_InitStructure
);
//枪归位检测
GPIO_ResetBits
(
ACContactor_Port
,
ACContactor_Pin
);
void
GunStatusChkInit
(
void
)
}
{
GPIO_InitTypeDef
GPIO_InitStructure
;
//A
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
GPIO_InitStructure
.
GPIO_Pin
=
DcOutChkPos_B_Pin
;
RCC_AHB1PeriphClockCmd
(
DcOutChkPos_B_RCC
,
ENABLE
);
GPIO_Init
(
DcOutChkPos_B_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
DcOutChkPos_B_Port
,
DcOutChkPos_B_Pin
);
//B
GPIO_InitStructure
.
GPIO_Mode
=
GPIO_Mode_IN
;
GPIO_InitStructure
.
GPIO_Speed
=
GPIO_Speed_100MHz
;
GPIO_InitStructure
.
GPIO_OType
=
GPIO_OType_PP
;
GPIO_InitStructure
.
GPIO_PuPd
=
GPIO_PuPd_NOPULL
;
GPIO_InitStructure
.
GPIO_Pin
=
DcOutChkPos_Pin
;
RCC_AHB1PeriphClockCmd
(
DcOutChkPos_RCC
,
ENABLE
);
GPIO_Init
(
DcOutChkPos_Port
,
&
GPIO_InitStructure
);
GPIO_ResetBits
(
DcOutChkPos_Port
,
DcOutChkPos_Pin
);
}
EnumSwitchStatus
GunStatusGet
(
void
)
{
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkPos_B_Port
,
DcOutChkPos_B_Pin
))
return
eSwSta_On
;
return
eSwSta_Off
;
}
EnumSwitchStatus
GunStatusGet_B
(
void
)
{
if
(
Bit_RESET
==
GPIO_ReadInputDataBit
(
DcOutChkPos_Port
,
DcOutChkPos_Pin
))
return
eSwSta_On
;
return
eSwSta_Off
;
}
DcPillar/Src/Drivers/Drv_BoardIo.h
浏览文件 @
e360e1d9
...
@@ -222,24 +222,24 @@ extern EnumSwitchStatus EleLockSta;
...
@@ -222,24 +222,24 @@ extern EnumSwitchStatus EleLockSta;
extern
EnumSwitchStatus
EleLockSta_B
;
extern
EnumSwitchStatus
EleLockSta_B
;
extern
EnumSwitchStatus
DcOutPosSta
;
extern
EnumSwitchStatus
DcOutPosSta
;
extern
EnumSwitchStatus
DcOutNegSta
;
//
extern EnumSwitchStatus DcOutNegSta;
extern
EnumSwitchStatus
DcOutPosSta_B
;
extern
EnumSwitchStatus
DcOutPosSta_B
;
extern
EnumSwitchStatus
DcOutNegSta_B
;
//
extern EnumSwitchStatus DcOutNegSta_B;
extern
EnumSwitchStatus
DcOutPosSta_Uni
;
//
extern EnumSwitchStatus DcOutPosSta_Uni;
extern
EnumSwitchStatus
DcOutNegSta_Uni
;
//
extern EnumSwitchStatus DcOutNegSta_Uni;
extern
void
BmsPowerInit
(
void
);
extern
void
BmsPowerInit
(
void
);
extern
void
BmsPowerSet
(
EnumSwitchStatus
Set
);
extern
void
BmsPowerSet
(
EnumSwitchStatus
Set
);
extern
void
DcOutInit
(
void
);
extern
void
DcOutInit
(
void
);
extern
void
DcOutPosSet
(
EnumSwitchStatus
Set
);
extern
void
DcOutPosSet
(
EnumSwitchStatus
Set
);
extern
void
DcOutNegSet
(
EnumSwitchStatus
Set
);
//
extern void DcOutNegSet(EnumSwitchStatus Set);
extern
void
DcOutSet
(
EnumSwitchStatus
Set
);
extern
void
DcOutSet
(
EnumSwitchStatus
Set
);
extern
EnumSwitchStatus
DcOutNegGet
(
void
);
//
extern EnumSwitchStatus DcOutNegGet(void);
extern
EnumSwitchStatus
DcOutPosGet
(
void
);
//
extern EnumSwitchStatus DcOutPosGet(void);
extern
EnumSwitchStatus
DcOutNegGetSet
(
void
);
//
extern EnumSwitchStatus DcOutNegGetSet(void);
extern
EnumSwitchStatus
DcOutPosGetSet
(
void
);
extern
EnumSwitchStatus
DcOutPosGetSet
(
void
);
extern
EnumSwitchStatus
DcOutGet
(
void
);
//
extern EnumSwitchStatus DcOutGet(void);
extern
void
DrainResistInit
(
void
);
extern
void
DrainResistInit
(
void
);
extern
void
DrainResistSet
(
EnumSwitchStatus
Set
);
extern
void
DrainResistSet
(
EnumSwitchStatus
Set
);
...
@@ -265,13 +265,13 @@ extern void BmsPowerSet_B(EnumSwitchStatus Set);
...
@@ -265,13 +265,13 @@ extern void BmsPowerSet_B(EnumSwitchStatus Set);
extern
void
DcOutInit_B
(
void
);
extern
void
DcOutInit_B
(
void
);
extern
void
DcOutPosSet_B
(
EnumSwitchStatus
Set
);
extern
void
DcOutPosSet_B
(
EnumSwitchStatus
Set
);
extern
void
DcOutNegSet_B
(
EnumSwitchStatus
Set
);
//
extern void DcOutNegSet_B(EnumSwitchStatus Set);
extern
void
DcOutSet_B
(
EnumSwitchStatus
Set
);
extern
void
DcOutSet_B
(
EnumSwitchStatus
Set
);
extern
EnumSwitchStatus
DcOutNegGet_B
(
void
);
//
extern EnumSwitchStatus DcOutNegGet_B(void);
extern
EnumSwitchStatus
DcOutPosGet_B
(
void
);
//
extern EnumSwitchStatus DcOutPosGet_B(void);
extern
EnumSwitchStatus
DcOutNegGetSet_B
(
void
);
//
extern EnumSwitchStatus DcOutNegGetSet_B(void);
extern
EnumSwitchStatus
DcOutPosGetSet_B
(
void
);
extern
EnumSwitchStatus
DcOutPosGetSet_B
(
void
);
extern
EnumSwitchStatus
DcOutGet_B
(
void
);
//
extern EnumSwitchStatus DcOutGet_B(void);
extern
void
DrainResistInit_B
(
void
);
extern
void
DrainResistInit_B
(
void
);
extern
void
DrainResistSet_B
(
EnumSwitchStatus
Set
);
extern
void
DrainResistSet_B
(
EnumSwitchStatus
Set
);
...
@@ -299,15 +299,15 @@ extern void FanSetExt(EnumSwitchStatus Set);
...
@@ -299,15 +299,15 @@ extern void FanSetExt(EnumSwitchStatus Set);
extern
void
FanSetExt_Top
(
EnumSwitchStatus
Set
);
extern
void
FanSetExt_Top
(
EnumSwitchStatus
Set
);
extern
void
DcOutInit_Uni
(
void
);
//
extern void DcOutInit_Uni(void);
extern
void
DcOutPosSet_Uni
(
EnumSwitchStatus
Set
);
//
extern void DcOutPosSet_Uni(EnumSwitchStatus Set);
extern
void
DcOutNegSet_Uni
(
EnumSwitchStatus
Set
);
//
extern void DcOutNegSet_Uni(EnumSwitchStatus Set);
extern
void
DcOutSet_Uni
(
EnumSwitchStatus
Set
);
//
extern void DcOutSet_Uni(EnumSwitchStatus Set);
extern
EnumSwitchStatus
DcOutNegGet_Uni
(
void
);
//
extern EnumSwitchStatus DcOutNegGet_Uni(void);
extern
EnumSwitchStatus
DcOutPosGet_Uni
(
void
);
//
extern EnumSwitchStatus DcOutPosGet_Uni(void);
extern
EnumSwitchStatus
DcOutNegGetSet_Uni
(
void
);
//
extern EnumSwitchStatus DcOutNegGetSet_Uni(void);
extern
EnumSwitchStatus
DcOutPosGetSet_Uni
(
void
);
//
extern EnumSwitchStatus DcOutPosGetSet_Uni(void);
extern
EnumSwitchStatus
DcOutGet_Uni
(
void
);
//
extern EnumSwitchStatus DcOutGet_Uni(void);
extern
void
DehumidifierInit
(
void
);
extern
void
DehumidifierInit
(
void
);
extern
void
DehumidifierSet
(
EnumSwitchStatus
Set
);
extern
void
DehumidifierSet
(
EnumSwitchStatus
Set
);
...
...
DcPillar/Src/Drivers/Drv_TCUComm.c
浏览文件 @
e360e1d9
...
@@ -2280,7 +2280,7 @@ void InformationReporting_22_A(void)
...
@@ -2280,7 +2280,7 @@ void InformationReporting_22_A(void)
InformainReport_A
.
InfRe
.
DCModFan
=
0
;
InformainReport_A
.
InfRe
.
DCModFan
=
0
;
InformainReport_A
.
InfRe
.
CCConnect
=
!
CcStatusRead
();
InformainReport_A
.
InfRe
.
CCConnect
=
!
CcStatusRead
();
InformainReport_A
.
InfRe
.
InsertGunSta
=
InsertGunStatu_A
();
InformainReport_A
.
InfRe
.
InsertGunSta
=
InsertGunStatu_A
();
InformainReport_A
.
InfRe
.
DcOutContSta
=
DcOutPosGet
();
InformainReport_A
.
InfRe
.
DcOutContSta
=
DcOutPosGet
Set
();
InformainReport_A
.
InfRe
.
ElectLock
=
LockGet
();
InformainReport_A
.
InfRe
.
ElectLock
=
LockGet
();
if
(((
InformainReport_A
.
data
[
0
]
&
0xf0
)
!=
0
)
||
((
InformainReport_A
.
data
[
1
]
&
0xff
)
!=
0
)
||
if
(((
InformainReport_A
.
data
[
0
]
&
0xf0
)
!=
0
)
||
((
InformainReport_A
.
data
[
1
]
&
0xff
)
!=
0
)
||
...
@@ -2408,7 +2408,7 @@ void InformationReporting_22_B(void)
...
@@ -2408,7 +2408,7 @@ void InformationReporting_22_B(void)
InformainReport_B
.
InfRe
.
DCModFan
=
0
;
InformainReport_B
.
InfRe
.
DCModFan
=
0
;
InformainReport_B
.
InfRe
.
CCConnect
=
!
CcStatusRead_B
();
InformainReport_B
.
InfRe
.
CCConnect
=
!
CcStatusRead_B
();
InformainReport_B
.
InfRe
.
InsertGunSta
=
InsertGunStatu_B
();
InformainReport_B
.
InfRe
.
InsertGunSta
=
InsertGunStatu_B
();
InformainReport_B
.
InfRe
.
DcOutContSta
=
DcOutPosGet_B
();
InformainReport_B
.
InfRe
.
DcOutContSta
=
DcOutPosGet
Set
_B
();
InformainReport_B
.
InfRe
.
ElectLock
=
LockGet_B
();
InformainReport_B
.
InfRe
.
ElectLock
=
LockGet_B
();
if
(((
InformainReport_B
.
data
[
0
]
&
0xf0
)
!=
0
)
||
((
InformainReport_B
.
data
[
1
]
&
0xff
)
!=
0
)
||
if
(((
InformainReport_B
.
data
[
0
]
&
0xf0
)
!=
0
)
||
((
InformainReport_B
.
data
[
1
]
&
0xff
)
!=
0
)
||
...
...
DcPillar/Src/Drivers/Drv_TCUComm.h
浏览文件 @
e360e1d9
...
@@ -108,29 +108,46 @@ typedef struct
...
@@ -108,29 +108,46 @@ typedef struct
}
StructTCUCControl
;
}
StructTCUCControl
;
/*
其它类型故障
*/
typedef
union
typedef
union
{
{
u8
data
[
5
];
u8
data
[
5
];
struct
struct
{
{
u8
workStau
:
2
;
u8
workStau
:
2
;
//工作状态
u8
sumFalt
:
1
;
u8
sumFalt
:
1
;
//总故障
u8
sumWarm
:
1
;
u8
sumWarm
:
1
;
//总告警
u8
Emergency
:
1
;
u8
Emergency
:
1
;
//急停按钮动作 故障
u8
smoke
:
1
;
u8
smoke
:
1
;
//烟感故障
u8
AccContac
:
1
;
u8
AccContac
:
1
;
//交流输入断路器故障
u8
DCOutConOff
:
1
;
//母线接触器据动/误动故障
u8
DCOutConOff
:
1
;
//直流母线输出接触器拒动/误动故障
u8
DCFuse
:
1
;
//熔断器
u8
EleLock
:
1
;
u8
Fan
:
1
;
u8
SPD
:
1
;
u8
ImdDev
:
1
;
u8
BattPola
:
1
;
u8
ContGuid
:
1
;
u8
tempOver
:
1
;
u8
DCFuse
:
1
;
//熔断器故障
u8
EleLock
:
1
;
//充电接口电子锁故障
u8
Fan
:
1
;
//充电桩风扇故障
u8
SPD
:
1
;
//避雷器故障
u8
ImdDev
:
1
;
//绝缘监测故障
u8
BattPola
:
1
;
//电池极性反接故障
u8
ContGuid
:
1
;
//充电中控制导引故障
u8
tempOver
:
1
;
//充电桩过温故障
/*
充电接口过温故障
充电枪未归位告警
BMS 通信故障
交流输入电压过压故障
交流输入电压欠压故障
直流母线输出 过压故障
直流母线输出 欠压故障
直流母线输出过流故障
*/
u8
ConnTemp
:
1
;
u8
ConnTemp
:
1
;
u8
PutBack
:
1
;
u8
PutBack
:
1
;
u8
BMSComm
:
1
;
u8
BMSComm
:
1
;
...
@@ -139,7 +156,17 @@ typedef union
...
@@ -139,7 +156,17 @@ typedef union
u8
DcVolHi
:
1
;
u8
DcVolHi
:
1
;
u8
DcVolLo
:
1
;
u8
DcVolLo
:
1
;
u8
DCCurrHi
:
1
;
u8
DCCurrHi
:
1
;
/*
充电模块故障
充电模块交流输入故障
充电模块交流输入过压故障
充电模块交流输入欠压故障
充电模块交流输入缺相故障
充电模块直流输出短路故障
充电模块直流输出过流故障
充电模块直流输出过压故障
*/
u8
DcModErr
:
1
;
u8
DcModErr
:
1
;
u8
DCModIn
:
1
;
u8
DCModIn
:
1
;
u8
DCModInHi
:
1
;
u8
DCModInHi
:
1
;
...
@@ -148,15 +175,25 @@ typedef union
...
@@ -148,15 +175,25 @@ typedef union
u8
DcOutShor
:
1
;
u8
DcOutShor
:
1
;
u8
DCModOutCuHi
:
1
;
u8
DCModOutCuHi
:
1
;
u8
DCModOutVoHi
:
1
;
u8
DCModOutVoHi
:
1
;
/*
充电模块直流输出欠压故障
充电模块过温故障
充电模块通信故障
充电模块风扇故障
车辆连接状态
充电桩充电枪座状态
充电接口电子锁状态
直流输出接触器状态
*/
u8
DCModOutVoLo
:
1
;
u8
DCModOutVoLo
:
1
;
u8
DCModTempHi
:
1
;
u8
DCModTempHi
:
1
;
u8
DCModComm
:
1
;
u8
DCModComm
:
1
;
u8
DCModFan
:
1
;
u8
DCModFan
:
1
;
u8
CCConnect
:
1
;
u8
CCConnect
:
1
;
u8
InsertGunSta
:
1
;
u8
InsertGunSta
:
1
;
u8
ElectLock
:
1
;
u8
DcOutContSta
:
1
;
u8
DcOutContSta
:
1
;
u8
ElectLock
:
1
;
}
InfRe
;
}
InfRe
;
}
UnionInformainReport1
;
}
UnionInformainReport1
;
...
@@ -165,18 +202,60 @@ typedef union
...
@@ -165,18 +202,60 @@ typedef union
u16
data
;
u16
data
;
struct
struct
{
{
u16
Door
:
1
;
//熔断器
/*
充电桩门禁故障
直流输出接触器粘连故障
绝缘监测告警
泄放回路故障
充电桩过温告警
充电枪过温告警
交流输入接触器拒动/误动故障
交流输入接触器粘连故障
*/
u16
Door
:
1
;
//
u16
DCOutConOn
:
1
;
//母线接触器粘连故障
u16
DCOutConOn
:
1
;
//母线接触器粘连故障
u16
ImdWarm
:
1
;
u16
ImdWarm
:
1
;
u16
DrainResist
:
1
;
u16
DrainResist
:
1
;
u16
tempOver
:
1
;
u16
tempOver
:
1
;
u16
gunTemp
:
1
;
u16
gunTemp
:
1
;
u16
AccContacON
:
1
;
//交流数日接触器据动/误动故障
u16
AccContacON
:
1
;
//交流数日接触器据动/误动故障
u16
AccContacOff
:
1
;
//粘连故障
u16
AccContacOff
:
1
;
//粘连故障
/*
辅助电源故障
并联接触器拒动/误动故障
并联接触器粘连故障
并联接触器状态
模块紧急停机状态
充电桩水浸故障
充电机柜门禁故障
充电机柜水浸故障
*/
u16
Power
:
1
;
//辅助电源
u16
Power
:
1
;
//辅助电源
u16
UniContactorOff
:
1
;
//母线接触器据动/误动故障
u16
UniContactorOff
:
1
;
//母线接触器据动/误动故障
u16
UniContactorOn
:
1
;
//母线接触器据动/误动故障
u16
UniContactorOn
:
1
;
//并联接触器粘连故障
/*
充电机柜烟感故障
功率控制模块通信故障
功率控制模块通信告警
功率控制模块故障
功率控制模块告警
开关模块通信故障
开关模块通信告警
开关模块故障
*/
/*
开关模块告警
直流充电主控模块判断BMS故障
BMS发送故障信息
充电模块泄放故障
绝缘监测仪通信故障
环境监控板通信故障
灯板通信故障
电能表通信故障
*/
}
InfRe
;
}
InfRe
;
}
UnionInformainReport2
;
}
UnionInformainReport2
;
...
...
DcPillar/Src/Thread/Charge/ChgPro_WaitVoltChgRun.c
浏览文件 @
e360e1d9
...
@@ -122,7 +122,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -122,7 +122,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
&&
(
NeedCurrt
>
(
u16
)((
u32
)
GetDcModuleCurrt
()
*
11
/
10
))
&&
(
NeedCurrt
>
(
u16
)((
u32
)
GetDcModuleCurrt
()
*
11
/
10
))
&&
(
eChgPro_B_ChgIdle
==
ChargeCtrl_B
.
CurProcess
)
//B枪空闲
&&
(
eChgPro_B_ChgIdle
==
ChargeCtrl_B
.
CurProcess
)
//B枪空闲
&&
(
eSwSta_Off
==
DcOutPosGetSet_B
())
//B枪继电器闭合
&&
(
eSwSta_Off
==
DcOutPosGetSet_B
())
//B枪继电器闭合
&&
(
eSwSta_Off
==
DcOutGet_B
())
//B枪继电器没闭合
//
&& (eSwSta_Off == DcOutGet_B()) //B枪继电器没闭合
&&
(
0
==
(
PillarError_B
.
Mult
&~
0x20200
))
//B无错误
&&
(
0
==
(
PillarError_B
.
Mult
&~
0x20200
))
//B无错误
)
)
{
{
...
@@ -244,7 +244,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -244,7 +244,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
ChargeError
.
Value
.
VoltOutError
=
1
;
ChargeError
.
Value
.
VoltOutError
=
1
;
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
ChargeStopType
=
eChgStop_Run_VoltOutHighErr
;
ChargeStopType
=
eChgStop_Run_VoltOutHighErr
;
pChargeCtrl
->
CurProcess
=
eChgPro_ChgStop
;
pChargeCtrl
->
CurProcess
=
eChgPro_ChgStop
;
//pChargeCtrl->CurProcess = eChgPro_ChgBreak;
//pChargeCtrl->CurProcess = eChgPro_ChgBreak;
...
@@ -277,7 +277,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -277,7 +277,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
ChargeError
.
Value
.
CurrtOutError
=
1
;
ChargeError
.
Value
.
CurrtOutError
=
1
;
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
ChargeStopType
=
eChgStop_Run_CurrtOutHighErr
;
ChargeStopType
=
eChgStop_Run_CurrtOutHighErr
;
pChargeCtrl
->
CurProcess
=
eChgPro_ChgStop
;
pChargeCtrl
->
CurProcess
=
eChgPro_ChgStop
;
pChargeCtrl
->
Param
=
0
;
pChargeCtrl
->
Param
=
0
;
...
@@ -305,7 +305,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -305,7 +305,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
if
((
0
==
UserParam
.
ChgFun
.
Value
.
SigUniChg
)
if
((
0
==
UserParam
.
ChgFun
.
Value
.
SigUniChg
)
||
(
eChgPro_B_ChgIdle
!=
ChargeCtrl_B
.
CurProcess
)
//非空闲
||
(
eChgPro_B_ChgIdle
!=
ChargeCtrl_B
.
CurProcess
)
//非空闲
||
(
eSwSta_Off
!=
DcOutPosGetSet_B
())
//B枪继电器闭合
||
(
eSwSta_Off
!=
DcOutPosGetSet_B
())
//B枪继电器闭合
||
(
eSwSta_Off
!=
DcOutGet_B
())
//B枪继电器闭合
//
|| (eSwSta_Off != DcOutGet_B()) //B枪继电器闭合
||
(
0
!=
PillarError_B
.
Mult
)
//有错误
||
(
0
!=
PillarError_B
.
Mult
)
//有错误
)
)
{
/*立即断开*/
{
/*立即断开*/
...
@@ -313,7 +313,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -313,7 +313,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
UniChgTick
=
0
;
UniChgTick
=
0
;
CcsChgEnable
=
0
;
CcsChgEnable
=
0
;
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
}
}
else
if
(
NeedCurrt
<
(
u16
)((
u32
)
DcModuleAbility
.
MaxCurrt
*
DcModuleManage
.
ValidNum
))
//小于单桩能力
else
if
(
NeedCurrt
<
(
u16
)((
u32
)
DcModuleAbility
.
MaxCurrt
*
DcModuleManage
.
ValidNum
))
//小于单桩能力
...
@@ -326,7 +326,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -326,7 +326,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
UniChgTick
=
0
;
UniChgTick
=
0
;
CcsChgEnable
=
0
;
CcsChgEnable
=
0
;
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
}
}
else
if
((
GetSystemTick
()
-
UniChgTick
)
>
(
25
*
1000
))
//近半分钟后关闭模块输出 进入挂起模式
else
if
((
GetSystemTick
()
-
UniChgTick
)
>
(
25
*
1000
))
//近半分钟后关闭模块输出 进入挂起模式
...
@@ -344,13 +344,13 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -344,13 +344,13 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
{
{
VoltReadyTick
=
0
;
VoltReadyTick
=
0
;
DcOutSet
(
eSwSta_On
);
DcOutSet
(
eSwSta_On
);
DcOutSet_Uni
(
eSwSta_On
);
//
DcOutSet_Uni(eSwSta_On);
}
}
else
if
(
abs
(
GetDcModuleVolt_AB
()
-
GetBatVoltWaitPillarReady
())
<=
100
)
else
if
(
abs
(
GetDcModuleVolt_AB
()
-
GetBatVoltWaitPillarReady
())
<=
100
)
{
{
VoltReadyTick
=
0
;
VoltReadyTick
=
0
;
DcOutSet
(
eSwSta_On
);
DcOutSet
(
eSwSta_On
);
DcOutSet_Uni
(
eSwSta_On
);
//
DcOutSet_Uni(eSwSta_On);
}
}
else
else
{
{
...
@@ -389,13 +389,13 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -389,13 +389,13 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
{
{
VoltReadyTick
=
0
;
VoltReadyTick
=
0
;
DcOutSet
(
eSwSta_On
);
DcOutSet
(
eSwSta_On
);
DcOutSet_Uni
(
eSwSta_On
);
//
DcOutSet_Uni(eSwSta_On);
}
}
else
if
(
abs
(
GetDcModuleVolt_AB
()
-
GetBatVoltWaitPillarReady
())
<=
100
)
else
if
(
abs
(
GetDcModuleVolt_AB
()
-
GetBatVoltWaitPillarReady
())
<=
100
)
{
{
VoltReadyTick
=
0
;
VoltReadyTick
=
0
;
DcOutSet
(
eSwSta_On
);
DcOutSet
(
eSwSta_On
);
DcOutSet_Uni
(
eSwSta_On
);
//
DcOutSet_Uni(eSwSta_On);
}
}
else
else
{
{
...
@@ -439,7 +439,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -439,7 +439,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
ChargeError
.
Value
.
VoltOutError
=
1
;
ChargeError
.
Value
.
VoltOutError
=
1
;
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeStopType
=
eChgStop_Run_VoltOutHighErr
;
ChargeStopType
=
eChgStop_Run_VoltOutHighErr
;
pChargeCtrl
->
CurProcess
=
eChgPro_ChgStop
;
pChargeCtrl
->
CurProcess
=
eChgPro_ChgStop
;
...
@@ -473,7 +473,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -473,7 +473,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
ChargeError
.
Value
.
CurrtOutError
=
1
;
ChargeError
.
Value
.
CurrtOutError
=
1
;
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeStopType
=
eChgStop_Run_CurrtOutHighErr
;
ChargeStopType
=
eChgStop_Run_CurrtOutHighErr
;
pChargeCtrl
->
CurProcess
=
eChgPro_ChgStop
;
pChargeCtrl
->
CurProcess
=
eChgPro_ChgStop
;
...
@@ -493,7 +493,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -493,7 +493,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_SinglBatVolt
;
ChargeStopType
=
eChgStop_Run_SinglBatVolt
;
...
@@ -509,7 +509,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -509,7 +509,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_SocOver
;
ChargeStopType
=
eChgStop_Run_SocOver
;
...
@@ -525,7 +525,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -525,7 +525,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_CurrtOver
;
ChargeStopType
=
eChgStop_Run_CurrtOver
;
...
@@ -541,7 +541,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -541,7 +541,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_BatTempOver
;
ChargeStopType
=
eChgStop_Run_BatTempOver
;
...
@@ -557,7 +557,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -557,7 +557,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_BatIsolate
;
ChargeStopType
=
eChgStop_Run_BatIsolate
;
...
@@ -573,7 +573,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -573,7 +573,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_Cc2Error
;
ChargeStopType
=
eChgStop_Run_Cc2Error
;
...
@@ -586,7 +586,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -586,7 +586,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
if
(
0
==
BmsPauseTick
)
if
(
0
==
BmsPauseTick
)
...
@@ -600,7 +600,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -600,7 +600,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_BmsPause
;
ChargeStopType
=
eChgStop_Run_BmsPause
;
...
@@ -619,7 +619,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -619,7 +619,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
pChargeCtrl
->
CurProcess
=
eChgPro_CommBreak
;
pChargeCtrl
->
CurProcess
=
eChgPro_CommBreak
;
...
@@ -635,7 +635,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -635,7 +635,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
pChargeCtrl
->
CurProcess
=
eChgPro_CommBreak
;
pChargeCtrl
->
CurProcess
=
eChgPro_CommBreak
;
...
@@ -650,7 +650,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -650,7 +650,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
pChargeCtrl
->
CurProcess
=
eChgPro_CommBreak
;
pChargeCtrl
->
CurProcess
=
eChgPro_CommBreak
;
...
@@ -664,7 +664,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -664,7 +664,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_BmsStop
;
ChargeStopType
=
eChgStop_Run_BmsStop
;
...
@@ -680,7 +680,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -680,7 +680,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_UserCancel
;
ChargeStopType
=
eChgStop_Run_UserCancel
;
...
@@ -703,7 +703,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -703,7 +703,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_Soc98
;
ChargeStopType
=
eChgStop_Run_Soc98
;
...
@@ -720,7 +720,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -720,7 +720,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet
(
eSwSta_Off
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_SinglBatVoltOverPermitMax
;
ChargeStopType
=
eChgStop_Run_SinglBatVoltOverPermitMax
;
...
@@ -745,7 +745,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -745,7 +745,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
CcStatusChkTick
=
0
;
CcStatusChkTick
=
0
;
...
@@ -762,7 +762,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -762,7 +762,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeStopType
=
eChgStop_Run_EmerClose
;
ChargeStopType
=
eChgStop_Run_EmerClose
;
...
@@ -778,7 +778,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -778,7 +778,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeStopType
=
eChgStop_Run_DoorOpen
;
ChargeStopType
=
eChgStop_Run_DoorOpen
;
...
@@ -794,7 +794,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -794,7 +794,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeStopType
=
eChgStop_Run_Contactor
;
ChargeStopType
=
eChgStop_Run_Contactor
;
...
@@ -810,7 +810,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -810,7 +810,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeStopType
=
eChgStop_Run_Contactor
;
ChargeStopType
=
eChgStop_Run_Contactor
;
...
@@ -826,7 +826,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -826,7 +826,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeStopType
=
eChgStop_Run_InVolt
;
ChargeStopType
=
eChgStop_Run_InVolt
;
...
@@ -842,7 +842,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -842,7 +842,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeStopType
=
eChgStop_Run_NoDcmod
;
ChargeStopType
=
eChgStop_Run_NoDcmod
;
...
@@ -858,7 +858,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
...
@@ -858,7 +858,7 @@ void ChgProWaitVoltChgRun(StructChargeCtrl *pChargeCtrl)
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
DcOutSet
(
eSwSta_Off
);
DcOutSet
(
eSwSta_Off
);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeStopType
=
eChgStop_Run_Meter
;
ChargeStopType
=
eChgStop_Run_Meter
;
...
...
DcPillar/Src/Thread/Charge_B/ChgPro_B_WaitVoltChgRun.c
浏览文件 @
e360e1d9
...
@@ -121,7 +121,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -121,7 +121,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
&&
(
NeedCurrt
>
(
u16
)((
u32
)
GetDcModuleCurrt_B
()
*
11
/
10
))
&&
(
NeedCurrt
>
(
u16
)((
u32
)
GetDcModuleCurrt_B
()
*
11
/
10
))
&&
(
eChgPro_ChgIdle
==
ChargeCtrl
.
CurProcess
)
//A枪空闲
&&
(
eChgPro_ChgIdle
==
ChargeCtrl
.
CurProcess
)
//A枪空闲
&&
(
eSwSta_Off
==
DcOutPosGetSet
())
//a枪继电器闭合
&&
(
eSwSta_Off
==
DcOutPosGetSet
())
//a枪继电器闭合
&&
(
eSwSta_Off
==
DcOutGet
())
//a枪继电器没闭合
//
&& (eSwSta_Off == DcOutGet()) //a枪继电器没闭合
&&
(
0
==
(
PillarError
.
Mult
&~
0x20200
))
//a无错误
&&
(
0
==
(
PillarError
.
Mult
&~
0x20200
))
//a无错误
)
)
{
{
...
@@ -243,7 +243,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -243,7 +243,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
ChargeError_B
.
Value
.
VoltOutError
=
1
;
ChargeError_B
.
Value
.
VoltOutError
=
1
;
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
ChargeStopType_B
=
eChgStop_Run_VoltOutHighErr
;
ChargeStopType_B
=
eChgStop_Run_VoltOutHighErr
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_ChgStop
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_ChgStop
;
//pChargeCtrl->CurProcess = eChgPro_B_ChgBreak;
//pChargeCtrl->CurProcess = eChgPro_B_ChgBreak;
...
@@ -276,7 +276,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -276,7 +276,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
ChargeError_B
.
Value
.
CurrtOutError
=
1
;
ChargeError_B
.
Value
.
CurrtOutError
=
1
;
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
ChargeStopType_B
=
eChgStop_Run_CurrtOutHighErr
;
ChargeStopType_B
=
eChgStop_Run_CurrtOutHighErr
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_ChgStop
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_ChgStop
;
pChargeCtrl
->
Param
=
0
;
pChargeCtrl
->
Param
=
0
;
...
@@ -304,7 +304,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -304,7 +304,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
if
((
0
==
UserParam
.
ChgFun
.
Value
.
SigUniChg
)
if
((
0
==
UserParam
.
ChgFun
.
Value
.
SigUniChg
)
||
(
eChgPro_ChgIdle
!=
ChargeCtrl
.
CurProcess
)
//非空闲
||
(
eChgPro_ChgIdle
!=
ChargeCtrl
.
CurProcess
)
//非空闲
||
(
eSwSta_Off
!=
DcOutPosGetSet
())
//B枪继电器闭合
||
(
eSwSta_Off
!=
DcOutPosGetSet
())
//B枪继电器闭合
||
(
eSwSta_Off
!=
DcOutGet
())
//B枪继电器闭合
//
|| (eSwSta_Off != DcOutGet()) //B枪继电器闭合
||
(
0
!=
PillarError
.
Mult
)
//有错误
||
(
0
!=
PillarError
.
Mult
)
//有错误
)
)
{
/*立即断开*/
{
/*立即断开*/
...
@@ -312,7 +312,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -312,7 +312,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
UniChgTick
=
0
;
UniChgTick
=
0
;
CcsChgEnable
=
0
;
CcsChgEnable
=
0
;
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
}
}
else
if
(
NeedCurrt
<
(
u16
)((
u32
)
DcModuleAbility
.
MaxCurrt
*
DcModuleManage_B
.
ValidNum
))
//小于单桩能力
else
if
(
NeedCurrt
<
(
u16
)((
u32
)
DcModuleAbility
.
MaxCurrt
*
DcModuleManage_B
.
ValidNum
))
//小于单桩能力
...
@@ -325,7 +325,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -325,7 +325,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
UniChgTick
=
0
;
UniChgTick
=
0
;
CcsChgEnable
=
0
;
CcsChgEnable
=
0
;
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
}
}
else
if
((
GetSystemTick
()
-
UniChgTick
)
>
(
25
*
1000
))
//近半分钟后关闭模块输出 进入挂起模式
else
if
((
GetSystemTick
()
-
UniChgTick
)
>
(
25
*
1000
))
//近半分钟后关闭模块输出 进入挂起模式
...
@@ -343,13 +343,13 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -343,13 +343,13 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
{
{
VoltReadyTick
=
0
;
VoltReadyTick
=
0
;
DcOutSet_B
(
eSwSta_On
);
DcOutSet_B
(
eSwSta_On
);
DcOutSet_Uni
(
eSwSta_On
);
//
DcOutSet_Uni(eSwSta_On);
}
}
else
if
(
abs
(
GetDcModuleVolt_AB
()
-
GetBatVoltWaitPillarReady_B
())
<=
100
)
else
if
(
abs
(
GetDcModuleVolt_AB
()
-
GetBatVoltWaitPillarReady_B
())
<=
100
)
{
{
VoltReadyTick
=
0
;
VoltReadyTick
=
0
;
DcOutSet_B
(
eSwSta_On
);
DcOutSet_B
(
eSwSta_On
);
DcOutSet_Uni
(
eSwSta_On
);
//
DcOutSet_Uni(eSwSta_On);
}
}
else
else
{
{
...
@@ -389,13 +389,13 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -389,13 +389,13 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
{
{
VoltReadyTick
=
0
;
VoltReadyTick
=
0
;
DcOutSet_B
(
eSwSta_On
);
DcOutSet_B
(
eSwSta_On
);
DcOutSet_Uni
(
eSwSta_On
);
//
DcOutSet_Uni(eSwSta_On);
}
}
else
if
(
abs
(
GetDcModuleVolt_AB
()
-
GetBatVoltWaitPillarReady_B
())
<=
100
)
else
if
(
abs
(
GetDcModuleVolt_AB
()
-
GetBatVoltWaitPillarReady_B
())
<=
100
)
{
{
VoltReadyTick
=
0
;
VoltReadyTick
=
0
;
DcOutSet_B
(
eSwSta_On
);
DcOutSet_B
(
eSwSta_On
);
DcOutSet_Uni
(
eSwSta_On
);
//
DcOutSet_Uni(eSwSta_On);
}
}
else
else
{
{
...
@@ -439,7 +439,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -439,7 +439,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
ChargeError_B
.
Value
.
VoltOutError
=
1
;
ChargeError_B
.
Value
.
VoltOutError
=
1
;
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeStopType_B
=
eChgStop_Run_VoltOutHighErr
;
ChargeStopType_B
=
eChgStop_Run_VoltOutHighErr
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_ChgStop
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_ChgStop
;
...
@@ -473,7 +473,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -473,7 +473,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
ChargeError_B
.
Value
.
CurrtOutError
=
1
;
ChargeError_B
.
Value
.
CurrtOutError
=
1
;
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeStopType_B
=
eChgStop_Run_CurrtOutHighErr
;
ChargeStopType_B
=
eChgStop_Run_CurrtOutHighErr
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_ChgStop
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_ChgStop
;
...
@@ -493,7 +493,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -493,7 +493,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_SinglBatVolt
;
ChargeStopType_B
=
eChgStop_Run_SinglBatVolt
;
...
@@ -509,7 +509,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -509,7 +509,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_SocOver
;
ChargeStopType_B
=
eChgStop_Run_SocOver
;
...
@@ -525,7 +525,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -525,7 +525,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_CurrtOver
;
ChargeStopType_B
=
eChgStop_Run_CurrtOver
;
...
@@ -541,7 +541,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -541,7 +541,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_BatTempOver
;
ChargeStopType_B
=
eChgStop_Run_BatTempOver
;
...
@@ -557,7 +557,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -557,7 +557,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_BatIsolate
;
ChargeStopType_B
=
eChgStop_Run_BatIsolate
;
...
@@ -573,7 +573,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -573,7 +573,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_Cc2Error
;
ChargeStopType_B
=
eChgStop_Run_Cc2Error
;
...
@@ -586,7 +586,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -586,7 +586,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
if
(
0
==
BmsPauseTick
)
if
(
0
==
BmsPauseTick
)
...
@@ -600,7 +600,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -600,7 +600,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_BmsPause
;
ChargeStopType_B
=
eChgStop_Run_BmsPause
;
...
@@ -619,7 +619,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -619,7 +619,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
pChargeCtrl
->
CurProcess
=
eChgPro_B_CommBreak
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_CommBreak
;
...
@@ -635,7 +635,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -635,7 +635,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
pChargeCtrl
->
CurProcess
=
eChgPro_B_CommBreak
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_CommBreak
;
...
@@ -650,7 +650,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -650,7 +650,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
pChargeCtrl
->
CurProcess
=
eChgPro_B_CommBreak
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_CommBreak
;
...
@@ -664,7 +664,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -664,7 +664,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_BmsStop
;
ChargeStopType_B
=
eChgStop_Run_BmsStop
;
...
@@ -680,7 +680,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -680,7 +680,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_UserCancel
;
ChargeStopType_B
=
eChgStop_Run_UserCancel
;
...
@@ -703,7 +703,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -703,7 +703,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_Soc98
;
ChargeStopType_B
=
eChgStop_Run_Soc98
;
...
@@ -720,7 +720,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -720,7 +720,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_SinglBatVoltOverPermitMax
;
ChargeStopType_B
=
eChgStop_Run_SinglBatVoltOverPermitMax
;
...
@@ -745,7 +745,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -745,7 +745,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
CcStatusChkTick
=
0
;
CcStatusChkTick
=
0
;
...
@@ -762,7 +762,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -762,7 +762,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_EmerClose
;
ChargeStopType_B
=
eChgStop_Run_EmerClose
;
...
@@ -778,7 +778,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -778,7 +778,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_DoorOpen
;
ChargeStopType_B
=
eChgStop_Run_DoorOpen
;
...
@@ -794,7 +794,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -794,7 +794,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_Contactor
;
ChargeStopType_B
=
eChgStop_Run_Contactor
;
...
@@ -810,7 +810,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -810,7 +810,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_Contactor
;
ChargeStopType_B
=
eChgStop_Run_Contactor
;
...
@@ -826,7 +826,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -826,7 +826,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_InVolt
;
ChargeStopType_B
=
eChgStop_Run_InVolt
;
...
@@ -842,7 +842,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -842,7 +842,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_NoDcmod
;
ChargeStopType_B
=
eChgStop_Run_NoDcmod
;
...
@@ -858,7 +858,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -858,7 +858,7 @@ void ChgProWaitVoltChgRun_B(StructChargeCtrl_B *pChargeCtrl)
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
else
else
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcModuleSet_AB
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
(
DcModuleManage
.
ValidNum
+
DcModuleManage_B
.
ValidNum
));
DcOutSet_Uni
(
eSwSta_Off
);
//
DcOutSet_Uni(eSwSta_Off);
UniChgEnable
=
FALSE
;
UniChgEnable
=
FALSE
;
DcOutSet_B
(
eSwSta_Off
);
DcOutSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_Meter
;
ChargeStopType_B
=
eChgStop_Run_Meter
;
...
...
DcPillar/Src/Thread/Lcd/LcdPro_B_FactoryTest.c
浏览文件 @
e360e1d9
...
@@ -77,9 +77,9 @@ void FactoryTestPaint_B(void)
...
@@ -77,9 +77,9 @@ void FactoryTestPaint_B(void)
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestAddr_B_Emergency
,
TempU16
);
LcdShowData16
(
IconFactoryTestAddr_B_Emergency
,
TempU16
);
if
(
eSwSta_On
==
DcOutPosGet_B
())
//
if(eSwSta_On == DcOutPosGet_B())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestAddr_B_DcOutSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestAddr_B_DcOutSta
,
TempU16
);
...
@@ -118,9 +118,9 @@ void FactoryTestUpdate_B(StructFactoryTestUpdate *pUpdate)
...
@@ -118,9 +118,9 @@ void FactoryTestUpdate_B(StructFactoryTestUpdate *pUpdate)
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestAddr_B_Emergency
,
TempU16
);
LcdShowData16
(
IconFactoryTestAddr_B_Emergency
,
TempU16
);
if
(
eSwSta_On
==
DcOutPosGet_B
())
//
if(eSwSta_On == DcOutPosGet_B())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestAddr_B_DcOutSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestAddr_B_DcOutSta
,
TempU16
);
...
...
DcPillar/Src/Thread/Lcd/LcdPro_B_FactoryTestTwo.c
浏览文件 @
e360e1d9
...
@@ -67,9 +67,9 @@ void FactoryTestTwoPaint_B(void)
...
@@ -67,9 +67,9 @@ void FactoryTestTwoPaint_B(void)
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_B_DoorSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_B_DoorSta
,
TempU16
);
if
(
eSwSta_On
==
DcOutNegG
et_B
())
//if(eSwSta_On == DcOutPosGetS
et_B())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_B_DcOutNegSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_B_DcOutNegSta
,
TempU16
);
...
@@ -79,15 +79,15 @@ void FactoryTestTwoPaint_B(void)
...
@@ -79,15 +79,15 @@ void FactoryTestTwoPaint_B(void)
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_B_eLockSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_B_eLockSta
,
TempU16
);
if
(
eSwSta_On
==
DcOutPosGet_Uni
())
//
if(eSwSta_On == DcOutPosGet_Uni())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_Uni_DcOutPosSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_Uni_DcOutPosSta
,
TempU16
);
if
(
eSwSta_On
==
DcOutNegGet_Uni
())
//
if(eSwSta_On == DcOutNegGet_Uni())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_Uni_DcOutNegSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_Uni_DcOutNegSta
,
TempU16
);
...
@@ -121,9 +121,9 @@ void FactoryTestTwoUpdate_B(StructFactoryTestTwoUpdate *pUpdate)
...
@@ -121,9 +121,9 @@ void FactoryTestTwoUpdate_B(StructFactoryTestTwoUpdate *pUpdate)
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_B_DoorSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_B_DoorSta
,
TempU16
);
if
(
eSwSta_On
==
DcOutNegGet_B
())
//
if(eSwSta_On == DcOutNegGet_B())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_B_DcOutNegSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_B_DcOutNegSta
,
TempU16
);
...
@@ -133,15 +133,15 @@ void FactoryTestTwoUpdate_B(StructFactoryTestTwoUpdate *pUpdate)
...
@@ -133,15 +133,15 @@ void FactoryTestTwoUpdate_B(StructFactoryTestTwoUpdate *pUpdate)
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_B_eLockSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_B_eLockSta
,
TempU16
);
if
(
eSwSta_On
==
DcOutPosGet_Uni
())
//
if(eSwSta_On == DcOutPosGet_Uni())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_Uni_DcOutPosSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_Uni_DcOutPosSta
,
TempU16
);
if
(
eSwSta_On
==
DcOutNegGet_Uni
())
//
if(eSwSta_On == DcOutNegGet_Uni())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_Uni_DcOutNegSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_Uni_DcOutNegSta
,
TempU16
);
...
@@ -164,7 +164,7 @@ void LcdProFactoryTestTwo_B(StructLcdCtrl *pLcdCtrl)
...
@@ -164,7 +164,7 @@ void LcdProFactoryTestTwo_B(StructLcdCtrl *pLcdCtrl)
StructFactoryTestTwoUpdate
Update
;
StructFactoryTestTwoUpdate
Update
;
IdleLedSet_B
(
eSwSta_Off
);
IdleLedSet_B
(
eSwSta_Off
);
DcOutNegSet_B
(
eSwSta_Off
);
//
DcOutNegSet_B(eSwSta_Off);
DrainResistSet_B
(
eSwSta_Off
);
DrainResistSet_B
(
eSwSta_Off
);
LockSet_B
(
eSwSta_Off
);
LockSet_B
(
eSwSta_Off
);
...
@@ -214,10 +214,10 @@ void LcdProFactoryTestTwo_B(StructLcdCtrl *pLcdCtrl)
...
@@ -214,10 +214,10 @@ void LcdProFactoryTestTwo_B(StructLcdCtrl *pLcdCtrl)
IdleLedSet_B
(
eSwSta_On
);
IdleLedSet_B
(
eSwSta_On
);
break
;
break
;
case
BtnFactoryTestTwo_B_DcOutNegOff
:
case
BtnFactoryTestTwo_B_DcOutNegOff
:
DcOutNegSet_B
(
eSwSta_Off
);
//
DcOutNegSet_B(eSwSta_Off);
break
;
break
;
case
BtnFactoryTestTwo_B_DcOutNegOn
:
case
BtnFactoryTestTwo_B_DcOutNegOn
:
DcOutNegSet_B
(
eSwSta_On
);
//
DcOutNegSet_B(eSwSta_On);
break
;
break
;
case
BtnFactoryTestTwo_B_eLockOff
:
case
BtnFactoryTestTwo_B_eLockOff
:
LockSet_B
(
eSwSta_Off
);
LockSet_B
(
eSwSta_Off
);
...
@@ -227,17 +227,17 @@ void LcdProFactoryTestTwo_B(StructLcdCtrl *pLcdCtrl)
...
@@ -227,17 +227,17 @@ void LcdProFactoryTestTwo_B(StructLcdCtrl *pLcdCtrl)
break
;
break
;
case
BtnFactoryTestTwo_Uni_DcOutPosOff
:
case
BtnFactoryTestTwo_Uni_DcOutPosOff
:
DcOutPosSet_Uni
(
eSwSta_Off
);
//
DcOutPosSet_Uni(eSwSta_Off);
break
;
break
;
case
BtnFactoryTestTwo_Uni_DcOutPosOn
:
case
BtnFactoryTestTwo_Uni_DcOutPosOn
:
DcOutPosSet_Uni
(
eSwSta_On
);
//
DcOutPosSet_Uni(eSwSta_On);
break
;
break
;
case
BtnFactoryTestTwo_Uni_DcOutNegOff
:
case
BtnFactoryTestTwo_Uni_DcOutNegOff
:
DcOutNegSet_Uni
(
eSwSta_Off
);
//
DcOutNegSet_Uni(eSwSta_Off);
break
;
break
;
case
BtnFactoryTestTwo_Uni_DcOutNegOn
:
case
BtnFactoryTestTwo_Uni_DcOutNegOn
:
DcOutNegSet_Uni
(
eSwSta_On
);
//
DcOutNegSet_Uni(eSwSta_On);
break
;
break
;
default:
default:
...
@@ -259,7 +259,7 @@ void LcdProFactoryTestTwo_B(StructLcdCtrl *pLcdCtrl)
...
@@ -259,7 +259,7 @@ void LcdProFactoryTestTwo_B(StructLcdCtrl *pLcdCtrl)
if
(
eLcdPro_B_FactoryTestTwo
!=
pLcdCtrl
->
CurScreen
)
if
(
eLcdPro_B_FactoryTestTwo
!=
pLcdCtrl
->
CurScreen
)
{
{
IdleLedSet_B
(
eSwSta_Off
);
IdleLedSet_B
(
eSwSta_Off
);
DcOutNegSet_B
(
eSwSta_Off
);
//
DcOutNegSet_B(eSwSta_Off);
DrainResistSet_B
(
eSwSta_Off
);
DrainResistSet_B
(
eSwSta_Off
);
LockSet_B
(
eSwSta_Off
);
LockSet_B
(
eSwSta_Off
);
return
;
return
;
...
...
DcPillar/Src/Thread/Lcd/LcdPro_FactoryTest.c
浏览文件 @
e360e1d9
...
@@ -77,9 +77,9 @@ void FactoryTestPaint(void)
...
@@ -77,9 +77,9 @@ void FactoryTestPaint(void)
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestAddr_Emergency
,
TempU16
);
LcdShowData16
(
IconFactoryTestAddr_Emergency
,
TempU16
);
if
(
eSwSta_On
==
DcOutPosGet
())
//
if(eSwSta_On == DcOutPosGet())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestAddr_DcOutSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestAddr_DcOutSta
,
TempU16
);
...
@@ -118,9 +118,9 @@ void FactoryTestUpdate(StructFactoryTestUpdate *pUpdate)
...
@@ -118,9 +118,9 @@ void FactoryTestUpdate(StructFactoryTestUpdate *pUpdate)
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestAddr_Emergency
,
TempU16
);
LcdShowData16
(
IconFactoryTestAddr_Emergency
,
TempU16
);
if
(
eSwSta_On
==
DcOutPosGet
())
//
if(eSwSta_On == DcOutPosGet())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestAddr_DcOutSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestAddr_DcOutSta
,
TempU16
);
...
...
DcPillar/Src/Thread/Lcd/LcdPro_FactoryTestTwo.c
浏览文件 @
e360e1d9
...
@@ -63,9 +63,9 @@ void FactoryTestTwoPaint(void)
...
@@ -63,9 +63,9 @@ void FactoryTestTwoPaint(void)
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_DoorSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_DoorSta
,
TempU16
);
if
(
eSwSta_On
==
DcOutNegGet
())
//
if(eSwSta_On == DcOutNegGet())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_DcOutNegSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_DcOutNegSta
,
TempU16
);
...
@@ -130,9 +130,9 @@ void FactoryTestTwoUpdate(StructFactoryTestTwoUpdate *pUpdate)
...
@@ -130,9 +130,9 @@ void FactoryTestTwoUpdate(StructFactoryTestTwoUpdate *pUpdate)
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_DoorSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_DoorSta
,
TempU16
);
if
(
eSwSta_On
==
DcOutNegGet
())
//
if(eSwSta_On == DcOutNegGet())
TempU16
=
1
;
//
TempU16 = 1;
else
//
else
TempU16
=
0
;
TempU16
=
0
;
LcdShowData16
(
IconFactoryTestTwoAddr_DcOutNegSta
,
TempU16
);
LcdShowData16
(
IconFactoryTestTwoAddr_DcOutNegSta
,
TempU16
);
...
@@ -182,7 +182,7 @@ void LcdProFactoryTestTwo(StructLcdCtrl *pLcdCtrl)
...
@@ -182,7 +182,7 @@ void LcdProFactoryTestTwo(StructLcdCtrl *pLcdCtrl)
StructFactoryTestTwoUpdate
Update
;
StructFactoryTestTwoUpdate
Update
;
IdleLedSet
(
eSwSta_Off
);
IdleLedSet
(
eSwSta_Off
);
DcOutNegSet
(
eSwSta_Off
);
//
DcOutNegSet(eSwSta_Off);
DehumidifierSet
(
eSwSta_Off
);
DehumidifierSet
(
eSwSta_Off
);
DrainResistSet
(
eSwSta_Off
);
DrainResistSet
(
eSwSta_Off
);
LockSet
(
eSwSta_Off
);
LockSet
(
eSwSta_Off
);
...
@@ -233,10 +233,10 @@ void LcdProFactoryTestTwo(StructLcdCtrl *pLcdCtrl)
...
@@ -233,10 +233,10 @@ void LcdProFactoryTestTwo(StructLcdCtrl *pLcdCtrl)
IdleLedSet
(
eSwSta_On
);
IdleLedSet
(
eSwSta_On
);
break
;
break
;
case
BtnFactoryTestTwo_DcOutNegOff
:
case
BtnFactoryTestTwo_DcOutNegOff
:
DcOutNegSet
(
eSwSta_Off
);
//
DcOutNegSet(eSwSta_Off);
break
;
break
;
case
BtnFactoryTestTwo_DcOutNegOn
:
case
BtnFactoryTestTwo_DcOutNegOn
:
DcOutNegSet
(
eSwSta_On
);
//
DcOutNegSet(eSwSta_On);
break
;
break
;
case
BtnFactoryTestTwo_DehOff
:
case
BtnFactoryTestTwo_DehOff
:
DehumidifierSet
(
eSwSta_Off
);
DehumidifierSet
(
eSwSta_Off
);
...
@@ -270,7 +270,7 @@ void LcdProFactoryTestTwo(StructLcdCtrl *pLcdCtrl)
...
@@ -270,7 +270,7 @@ void LcdProFactoryTestTwo(StructLcdCtrl *pLcdCtrl)
if
(
eLcdPro_FactoryTestTwo
!=
pLcdCtrl
->
CurScreen
)
if
(
eLcdPro_FactoryTestTwo
!=
pLcdCtrl
->
CurScreen
)
{
{
IdleLedSet
(
eSwSta_Off
);
IdleLedSet
(
eSwSta_Off
);
DcOutNegSet
(
eSwSta_Off
);
//
DcOutNegSet(eSwSta_Off);
DehumidifierSet
(
eSwSta_Off
);
DehumidifierSet
(
eSwSta_Off
);
LockSet
(
eSwSta_Off
);
LockSet
(
eSwSta_Off
);
return
;
return
;
...
...
DcPillar/Src/Thread/Thd_Mult.c
浏览文件 @
e360e1d9
...
@@ -673,8 +673,8 @@ void Thd_Mult(void const *parameter)
...
@@ -673,8 +673,8 @@ void Thd_Mult(void const *parameter)
}
}
else
if
((
3
==
DoorChkCnt
)
&&
(
0
!=
UserParam
.
ChgFun
.
Value
.
Door
))
else
if
((
3
==
DoorChkCnt
)
&&
(
0
!=
UserParam
.
ChgFun
.
Value
.
Door
))
{
{
//
PillarError_B.Value.Door = 1; //0504 test
PillarError_B
.
Value
.
Door
=
1
;
//0504 test
//
PillarError.Value.Door = 1;
PillarError
.
Value
.
Door
=
1
;
}
}
/*防雷器故障检测*/
/*防雷器故障检测*/
if
(
eSwSta_Off
==
SPDGet
())
if
(
eSwSta_Off
==
SPDGet
())
...
@@ -761,11 +761,13 @@ void Thd_Mult(void const *parameter)
...
@@ -761,11 +761,13 @@ void Thd_Mult(void const *parameter)
;
// PillarError_B.Value.NoDcmod = 1;
;
// PillarError_B.Value.NoDcmod = 1;
else
else
PillarError_B
.
Value
.
NoDcmod
=
0
;
PillarError_B
.
Value
.
NoDcmod
=
0
;
#if 0
/*B枪位电能表通讯故障判断*/
/*B枪位电能表通讯故障判断*/
if(eMeterSta_Unavail == MeterComm.Status_B)
if(eMeterSta_Unavail == MeterComm.Status_B)
;
//
PillarError_B.Value.Meter = 1; //0505 屏蔽B枪电表错误
PillarError_B.Value.Meter = 1; //0505 屏蔽B枪电表错误
else
else
PillarError_B.Value.Meter = 0;
PillarError_B.Value.Meter = 0;
#endif
/*B枪位绝缘错误判断*/
/*B枪位绝缘错误判断*/
if
(
0
!=
ChargeError_B
.
Value
.
IsolateError
)
if
(
0
!=
ChargeError_B
.
Value
.
IsolateError
)
PillarError_B
.
Value
.
Insulation
=
1
;
PillarError_B
.
Value
.
Insulation
=
1
;
...
@@ -807,7 +809,7 @@ void Thd_Mult(void const *parameter)
...
@@ -807,7 +809,7 @@ void Thd_Mult(void const *parameter)
{
{
PillarError_B
.
Value
.
EleLock
=
1
;
PillarError_B
.
Value
.
EleLock
=
1
;
}
}
/*B枪位接触器故障判断*/
#if 0
/*B枪位接触器故障判断*/
if(((0 == UserParam.ChgFun.Value.NegContactor) && (DcOutPosSta_B == DcOutPosGet_B()))\
if(((0 == UserParam.ChgFun.Value.NegContactor) && (DcOutPosSta_B == DcOutPosGet_B()))\
||((0 != UserParam.ChgFun.Value.NegContactor) && (DcOutPosSta_B == DcOutPosGet_B()) && (DcOutNegSta_B == DcOutNegGet_B())))
||((0 != UserParam.ChgFun.Value.NegContactor) && (DcOutPosSta_B == DcOutPosGet_B()) && (DcOutNegSta_B == DcOutNegGet_B())))
{
{
...
@@ -839,6 +841,8 @@ void Thd_Mult(void const *parameter)
...
@@ -839,6 +841,8 @@ void Thd_Mult(void const *parameter)
{
{
//PillarError_B.Value.Contactor = 1;
//PillarError_B.Value.Contactor = 1;
}
}
#endif
//交流接触器
if
((
PillarError
.
Value
.
Emergency
==
0
)
&&
(
ACContactorSta
!=
ACContactorGet
()))
if
((
PillarError
.
Value
.
Emergency
==
0
)
&&
(
ACContactorSta
!=
ACContactorGet
()))
{
{
if
(
ACContactorChkCnt
<
20
)
if
(
ACContactorChkCnt
<
20
)
...
@@ -879,11 +883,13 @@ void Thd_Mult(void const *parameter)
...
@@ -879,11 +883,13 @@ void Thd_Mult(void const *parameter)
;
// PillarError.Value.NoDcmod = 1;
;
// PillarError.Value.NoDcmod = 1;
else
else
PillarError
.
Value
.
NoDcmod
=
0
;
PillarError
.
Value
.
NoDcmod
=
0
;
#if 0 //屏蔽电能表错误
/*电能表通讯故障判断*/
/*电能表通讯故障判断*/
if(eMeterSta_Unavail == MeterComm.Status)
if(eMeterSta_Unavail == MeterComm.Status)
PillarError
.
Value
.
Meter
=
0
;
//1; 0504 屏蔽电表错误
PillarError.Value.Meter =
1;
else
else
PillarError.Value.Meter = 0;
PillarError.Value.Meter = 0;
#endif
/*绝缘错误判断*/
/*绝缘错误判断*/
if
(
0
!=
ChargeError
.
Value
.
IsolateError
)
if
(
0
!=
ChargeError
.
Value
.
IsolateError
)
PillarError
.
Value
.
Insulation
=
1
;
PillarError
.
Value
.
Insulation
=
1
;
...
@@ -925,6 +931,7 @@ void Thd_Mult(void const *parameter)
...
@@ -925,6 +931,7 @@ void Thd_Mult(void const *parameter)
{
{
PillarError
.
Value
.
EleLock
=
1
;
PillarError
.
Value
.
EleLock
=
1
;
}
}
#if 0 ////不再检测直流接触器
/*接触器故障判断*/
/*接触器故障判断*/
if(((0 == UserParam.ChgFun.Value.NegContactor) && (DcOutPosSta == DcOutPosGet()))\
if(((0 == UserParam.ChgFun.Value.NegContactor) && (DcOutPosSta == DcOutPosGet()))\
||((0 != UserParam.ChgFun.Value.NegContactor) && (DcOutPosSta == DcOutPosGet()) && (DcOutNegSta == DcOutNegGet())))//两个接触器
||((0 != UserParam.ChgFun.Value.NegContactor) && (DcOutPosSta == DcOutPosGet()) && (DcOutNegSta == DcOutNegGet())))//两个接触器
...
@@ -955,9 +962,10 @@ void Thd_Mult(void const *parameter)
...
@@ -955,9 +962,10 @@ void Thd_Mult(void const *parameter)
}
}
else if(20 == ContactorChkCnt)
else if(20 == ContactorChkCnt)
{
{
PillarError
.
Value
.
Contactor
=
0
;
//1; 0504 test
PillarError.Value.Contactor = 0;//1; 0504 test
}
}
#endif
#if 0 //不再检测联级接触器
/*联级接触器故障判断*/
/*联级接触器故障判断*/
if(((0 == UserParam.ChgFun.Value.SigUniChg))\
if(((0 == UserParam.ChgFun.Value.SigUniChg))\
||((DcOutPosSta_Uni == DcOutPosGet_Uni()) && (DcOutNegSta_Uni == DcOutNegGet_Uni())))//两个接触器
||((DcOutPosSta_Uni == DcOutPosGet_Uni()) && (DcOutNegSta_Uni == DcOutNegGet_Uni())))//两个接触器
...
@@ -992,7 +1000,7 @@ void Thd_Mult(void const *parameter)
...
@@ -992,7 +1000,7 @@ void Thd_Mult(void const *parameter)
// PillarError.Value.UniContactor = 1;
// PillarError.Value.UniContactor = 1;
// PillarError_B.Value.UniContactor = 1;
// PillarError_B.Value.UniContactor = 1;
}
}
#endif
/*绝缘检测通讯故障判断*/
/*绝缘检测通讯故障判断*/
if
((
GetSystemTick
()
-
ImdCheckTcik
)
>=
600
)
if
((
GetSystemTick
()
-
ImdCheckTcik
)
>=
600
)
{
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论