Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
DC360_1drap3_xiaoju_V1
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
丁雨邯
DC360_1drap3_xiaoju_V1
Commits
184cd9d2
提交
184cd9d2
authored
6月 29, 2020
作者:
wysheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化智能分配
上级
2d35a47b
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
120 行增加
和
39 行删除
+120
-39
Drv_DcModule.h
DcPillar/Src/Drivers/Drv_DcModule.h
+49
-6
Drv_TCUComm.c
DcPillar/Src/Drivers/Drv_TCUComm.c
+21
-3
Global.h
DcPillar/Src/Global.h
+1
-1
ChgPro_ChgRun_SmartAllocation.c
DcPillar/Src/SmartAllocation/ChgPro_ChgRun_SmartAllocation.c
+7
-7
Drv_DcModule_SmartAllocation.c
DcPillar/Src/SmartAllocation/Drv_DcModule_SmartAllocation.c
+6
-6
Drv_SmartAllocation.c
DcPillar/Src/SmartAllocation/Drv_SmartAllocation.c
+0
-0
Drv_SmartAllocation.h
DcPillar/Src/SmartAllocation/Drv_SmartAllocation.h
+9
-16
ChgPro_ChgIdle.c
DcPillar/Src/Thread/Charge/ChgPro_ChgIdle.c
+27
-0
没有找到文件。
DcPillar/Src/Drivers/Drv_DcModule.h
浏览文件 @
184cd9d2
...
@@ -4,8 +4,7 @@
...
@@ -4,8 +4,7 @@
#include "Global.h"
#include "Global.h"
#define DcModule_ZhongXing 1
#define DcModule_ZhongXing 0
#define DcModule_BaudRate (250)
#define DcModule_BaudRate (250)
...
@@ -78,8 +77,6 @@ typedef struct
...
@@ -78,8 +77,6 @@ typedef struct
#define DcModuleMaxCurrt (100) //10A
#define DcModuleMaxCurrt (100) //10A
#define DcModuleMinCurrt (5) //1A
#define DcModuleMinCurrt (5) //1A
#define DcModuleSinMaxCurrt (2000)
#define DcModuleSinMaxCurrt (2000)
#else
#else
#define DcModuleMaxVolt (5000)//750V
#define DcModuleMaxVolt (5000)//750V
...
@@ -93,15 +90,61 @@ typedef enum
...
@@ -93,15 +90,61 @@ typedef enum
eSwSta_High
,
eSwSta_High
,
}
EnumModuStatus
;
}
EnumModuStatus
;
#if DcModule_ZhongXing
typedef
union
{
u16
Mult
;
struct
{
u16
Reserve1
:
3
;
//Bit2-Bit0: 预留
u16
GroupType
:
1
;
//Bit3: 分组模式 0x00 --- 固定分组 0x01 --- 动态分组
u16
Fault
:
1
;
//Bit4: 0x01 --- 故障状态, 0x00 --- 正常
u16
Alarm
:
1
;
//Bit5: 0x01 --- 告警状态, 0x00 --- 正常
u16
OnOff
:
2
;
//Bit7 ~ Bit6: 工作状态 0x01 --- 待机状态 0x02 --- 工作状态
u16
Reserve
:
1
;
//Bit0: 预留
u16
other
:
1
;
//Bit1: 其他故障 0x00 -- 正常 0x01 --- 故障
u16
fan
:
1
;
//Bit2: 风扇故障 0x00 -- 正常 0x01 --- 故障
u16
outShort
:
1
;
//Bit3: 直流输出短路 0x00 -- 正常 0x01 --- 故障
u16
tempOver
:
1
;
//Bit4: 过温 0x00 -- 正常 0x01 --- 故障
u16
outLow
:
1
;
//Bit5: 直流输出欠压 0x00 -- 正常 0x01 --- 故障
u16
outHigh
:
1
;
//Bit6: 直流输出过压故障 0x00 -- 正常 0x01 --- 故障
u16
accIn
:
1
;
//Bit7: 交流输入故障 0x00 -- 正常 0x01 --- 故障
}
Value
;
}
UnionDcModuleStatus
;
#else
typedef
union
{
u16
Mult
;
struct
{
u16
OnOff
:
1
;
//0x01 --- 关机状态 0x00 --- 工作状态
u16
Fault
:
1
;
// 0x01 --- 故障状态, 0x00 --- 正常
u16
Alarm
:
1
;
//0x01 --- 模块限流, 0x00 --- 模块恒压
u16
fan
:
1
;
//风扇故障 0x00 -- 正常 0x01 --- 故障
u16
accInHigh
:
1
;
//交流输入过压故障 0x00 -- 正常 0x01 --- 故障
u16
accInLow
:
1
;
//交流输入欠压故障 0x00 -- 正常 0x01 --- 故障
u16
outHigh
:
1
;
//直流输出过压故障 0x00 -- 正常 0x01 --- 故障
u16
outLow
:
1
;
//直流输出欠压 0x00 -- 正常 0x01 --- 故障
u16
outCurrentOver
:
1
;
// 0x00 -- 正常 0x01 --- 过流保护
u16
tempOver
:
1
;
//过温 0x00 -- 正常 0x01 --- 故障
u16
SetOnOff
:
1
;
//0x00 -- 设置开机 0x01 --- 设置关机
u16
Reserve1
:
5
;
//
}
Value
;
}
UnionDcModuleStatus
;
#endif
typedef
struct
typedef
struct
{
{
u8
Id
;
u8
Id
;
u8
Temp
;
u8
Temp
;
u16
Volt
;
//0.1V/Bit;
u16
Volt
;
//0.1V/Bit;
u16
Currt
;
//0.1A/Bit;
u16
Currt
;
//0.1A/Bit;
u16
State
;
UnionDcModuleStatus
State
;
u32
RecvTime
;
u32
RecvTime
;
u16
ModStatus
;
}
StructDcModuleStatus
;
}
StructDcModuleStatus
;
extern
StructDcModuleAbility
DcModuleAbility
;
extern
StructDcModuleAbility
DcModuleAbility
;
...
...
DcPillar/Src/Drivers/Drv_TCUComm.c
浏览文件 @
184cd9d2
...
@@ -463,7 +463,7 @@ StructTCUCControl TCUControlInfo =
...
@@ -463,7 +463,7 @@ StructTCUCControl TCUControlInfo =
},
//硬件版本
},
//硬件版本
.
SoftwareVersion
=
.
SoftwareVersion
=
{
{
(
u8
)(
__SoftVer__
>>
8
),
(
u8
)(
__SoftVer__
),
0x00
(
u8
)(
__SoftVer__
>>
16
),
(
u8
)(
__SoftVer__
>>
8
),
(
u8
)(
__SoftVer__
)
},
//软件版本
},
//软件版本
.
SoftwareData
=
.
SoftwareData
=
{
{
...
@@ -2526,12 +2526,21 @@ void InformationReporting_22_A(void)
...
@@ -2526,12 +2526,21 @@ void InformationReporting_22_A(void)
InformainReport_A
.
InfRe
.
DcModErr
=
PillarError
.
Value
.
DCmodError
;
InformainReport_A
.
InfRe
.
DcModErr
=
PillarError
.
Value
.
DCmodError
;
#if DcModule_ZhongXing
InformainReport_A
.
InfRe
.
DCModIn
=
DcModuleStatus_A
.
Value
.
accIn
;
InformainReport_A
.
InfRe
.
DCModIn
=
DcModuleStatus_A
.
Value
.
accIn
;
InformainReport_A
.
InfRe
.
DCModInHi
=
0
;
//
InformainReport_A.InfRe.DCModInHi = 0;
InformainReport_A
.
InfRe
.
DCModInLo
=
0
;
//
InformainReport_A.InfRe.DCModInLo = 0;
//InformainReport_A.InfRe.DCModPhas = 0;
//InformainReport_A.InfRe.DCModPhas = 0;
InformainReport_A
.
InfRe
.
DcOutShor
=
DcModuleStatus_A
.
Value
.
outShort
;
InformainReport_A
.
InfRe
.
DcOutShor
=
DcModuleStatus_A
.
Value
.
outShort
;
//InformainReport_A.InfRe.DCModOutCuHi = 0;
//InformainReport_A.InfRe.DCModOutCuHi = 0;
#else
//InformainReport_A.InfRe.DCModIn = DcModuleStatus_A.Value.accIn;
InformainReport_A
.
InfRe
.
DCModInHi
=
DcModuleStatus_A
.
Value
.
accInHigh
;
InformainReport_A
.
InfRe
.
DCModInLo
=
DcModuleStatus_A
.
Value
.
accInLow
;
//InformainReport_A.InfRe.DCModPhas = 0;
//InformainReport_A.InfRe.DcOutShor = DcModuleStatus_A.Value.outShort;
InformainReport_A
.
InfRe
.
DCModOutCuHi
=
DcModuleStatus_A
.
Value
.
outCurrentOver
;
#endif
InformainReport_A
.
InfRe
.
DCModOutVoHi
=
DcModuleStatus_A
.
Value
.
outHigh
;
InformainReport_A
.
InfRe
.
DCModOutVoHi
=
DcModuleStatus_A
.
Value
.
outHigh
;
InformainReport_A
.
InfRe
.
DCModOutVoLo
=
DcModuleStatus_A
.
Value
.
outLow
;
InformainReport_A
.
InfRe
.
DCModOutVoLo
=
DcModuleStatus_A
.
Value
.
outLow
;
...
@@ -2659,12 +2668,21 @@ void InformationReporting_22_B(void)
...
@@ -2659,12 +2668,21 @@ void InformationReporting_22_B(void)
InformainReport_B
.
InfRe
.
DcModErr
=
PillarError_B
.
Value
.
DCmodError
;
InformainReport_B
.
InfRe
.
DcModErr
=
PillarError_B
.
Value
.
DCmodError
;
#if DcModule_ZhongXing
InformainReport_B
.
InfRe
.
DCModIn
=
DcModuleStatus_B
.
Value
.
accIn
;
InformainReport_B
.
InfRe
.
DCModIn
=
DcModuleStatus_B
.
Value
.
accIn
;
//InformainReport_B.InfRe.DCModInHi = 0;
//InformainReport_B.InfRe.DCModInHi = 0;
//InformainReport_B.InfRe.DCModInLo = 0;
//InformainReport_B.InfRe.DCModInLo = 0;
//InformainReport_B.InfRe.DCModPhas = 0;
//InformainReport_B.InfRe.DCModPhas = 0;
InformainReport_B
.
InfRe
.
DcOutShor
=
DcModuleStatus_B
.
Value
.
outShort
;
InformainReport_B
.
InfRe
.
DcOutShor
=
DcModuleStatus_B
.
Value
.
outShort
;
//InformainReport_B.InfRe.DCModOutCuHi = 0;
//InformainReport_B.InfRe.DCModOutCuHi = 0;
#else
//InformainReport_B.InfRe.DCModIn = DcModuleStatus_B.Value.accIn;
InformainReport_B
.
InfRe
.
DCModInHi
=
DcModuleStatus_B
.
Value
.
accInHigh
;
InformainReport_B
.
InfRe
.
DCModInLo
=
DcModuleStatus_B
.
Value
.
accInLow
;
//InformainReport_B.InfRe.DCModPhas = 0;
//InformainReport_B.InfRe.DcOutShor = DcModuleStatus_B.Value.outShort;
InformainReport_B
.
InfRe
.
DCModOutCuHi
=
DcModuleStatus_B
.
Value
.
outCurrentOver
;
#endif
InformainReport_B
.
InfRe
.
DCModOutVoHi
=
DcModuleStatus_B
.
Value
.
outHigh
;
InformainReport_B
.
InfRe
.
DCModOutVoHi
=
DcModuleStatus_B
.
Value
.
outHigh
;
InformainReport_B
.
InfRe
.
DCModOutVoLo
=
DcModuleStatus_B
.
Value
.
outLow
;
InformainReport_B
.
InfRe
.
DCModOutVoLo
=
DcModuleStatus_B
.
Value
.
outLow
;
...
...
DcPillar/Src/Global.h
浏览文件 @
184cd9d2
...
@@ -425,7 +425,7 @@ extern u8 HexToBcd(u8 Hex);
...
@@ -425,7 +425,7 @@ extern u8 HexToBcd(u8 Hex);
extern
int
CopyCode
(
u32
Des
,
u32
Scr
,
u32
Len
);
extern
int
CopyCode
(
u32
Des
,
u32
Scr
,
u32
Len
);
extern
int
UpdateFlagSet
(
u32
Status
);
extern
int
UpdateFlagSet
(
u32
Status
);
#define __SoftVer__ (0x01
10
) //BCD码 如:V1.02 SoftVer = 0x0102
#define __SoftVer__ (0x01
0102
) //BCD码 如:V1.02 SoftVer = 0x0102
#endif
#endif
DcPillar/Src/SmartAllocation/ChgPro_ChgRun_SmartAllocation.c
浏览文件 @
184cd9d2
...
@@ -153,26 +153,26 @@ void ChgProChgRun(StructChargeCtrl * pChargeCtrl)
...
@@ -153,26 +153,26 @@ void ChgProChgRun(StructChargeCtrl * pChargeCtrl)
if
(
DcModuleGroup
[
1
].
status
==
Valid
)
if
(
DcModuleGroup
[
1
].
status
==
Valid
)
{
{
DcModuleGroup
[
1
].
status
=
Hold_A
;
DcModuleGroup
[
1
].
status
=
Hold_A
;
DcModuleManage
.
ValidNum
+=
DcModuleGroup
[
1
].
ValidNum
;
//
DcModuleManage.ValidNum += DcModuleGroup[1].ValidNum;
DcModuleGroup
[
1
].
flag
=
1
;
DcModuleGroup
[
1
].
flag
=
1
;
}
}
else
if
(
DcModuleGroup
[
3
].
status
==
Valid
)
else
if
(
DcModuleGroup
[
3
].
status
==
Valid
)
{
{
DcModuleGroup
[
3
].
status
=
Hold_A
;
DcModuleGroup
[
3
].
status
=
Hold_A
;
DcModuleManage
.
ValidNum
+=
DcModuleGroup
[
3
].
ValidNum
;
//
DcModuleManage.ValidNum += DcModuleGroup[3].ValidNum;
DcModuleGroup
[
3
].
flag
=
1
;
DcModuleGroup
[
3
].
flag
=
1
;
}
}
else
if
(
DcModuleGroup
[
2
].
status
==
Valid
else
if
(
DcModuleGroup
[
2
].
status
==
Valid
&&
ChargeCtrl_B
.
CurProcess
==
eChgPro_ChgIdle
)
&&
ChargeCtrl_B
.
CurProcess
==
eChgPro_ChgIdle
)
{
{
DcModuleGroup
[
2
].
status
=
Hold_A
;
DcModuleGroup
[
2
].
status
=
Hold_A
;
DcModuleManage
.
ValidNum
+=
DcModuleGroup
[
2
].
ValidNum
;
//
DcModuleManage.ValidNum += DcModuleGroup[2].ValidNum;
DcModuleGroup
[
2
].
flag
=
1
;
DcModuleGroup
[
2
].
flag
=
1
;
#if (DcModule_ZhongXing == 0)
#if (DcModule_ZhongXing == 0)
if
(
DcModuleGroup
[
3
].
status
==
Hold_A
)
if
(
DcModuleGroup
[
3
].
status
==
Hold_A
)
{
{
DcModuleGroup
[
3
].
status
=
Valid
;
DcModuleGroup
[
3
].
status
=
Valid
;
DcModuleManage
.
ValidNum
-=
DcModuleGroup
[
3
].
ValidNum
;
//
DcModuleManage.ValidNum -= DcModuleGroup[3].ValidNum;
}
}
#endif
#endif
}
}
...
@@ -182,17 +182,17 @@ void ChgProChgRun(StructChargeCtrl * pChargeCtrl)
...
@@ -182,17 +182,17 @@ void ChgProChgRun(StructChargeCtrl * pChargeCtrl)
if
(
DcModuleGroup
[
2
].
status
==
Hold_A
)
if
(
DcModuleGroup
[
2
].
status
==
Hold_A
)
{
{
DcModuleGroup
[
2
].
status
=
Valid
;
DcModuleGroup
[
2
].
status
=
Valid
;
DcModuleManage
.
ValidNum
-=
DcModuleGroup
[
2
].
ValidNum
;
//
DcModuleManage.ValidNum -= DcModuleGroup[2].ValidNum;
}
}
else
if
(
DcModuleGroup
[
3
].
status
==
Hold_A
)
else
if
(
DcModuleGroup
[
3
].
status
==
Hold_A
)
{
{
DcModuleGroup
[
3
].
status
=
Valid
;
DcModuleGroup
[
3
].
status
=
Valid
;
DcModuleManage
.
ValidNum
-=
DcModuleGroup
[
3
].
ValidNum
;
//
DcModuleManage.ValidNum -= DcModuleGroup[3].ValidNum;
}
}
else
if
(
DcModuleGroup
[
1
].
status
==
Hold_A
)
else
if
(
DcModuleGroup
[
1
].
status
==
Hold_A
)
{
{
DcModuleGroup
[
1
].
status
=
Valid
;
DcModuleGroup
[
1
].
status
=
Valid
;
DcModuleManage
.
ValidNum
-=
DcModuleGroup
[
1
].
ValidNum
;
//
DcModuleManage.ValidNum -= DcModuleGroup[1].ValidNum;
}
}
}
}
...
...
DcPillar/Src/SmartAllocation/Drv_DcModule_SmartAllocation.c
浏览文件 @
184cd9d2
...
@@ -29,7 +29,7 @@ StructDcModuleManage DcModuleManage;
...
@@ -29,7 +29,7 @@ StructDcModuleManage DcModuleManage;
StructDcModuleManage
DcModuleManage_B
;
StructDcModuleManage
DcModuleManage_B
;
StructDcModuleManage
DcModuleManage_All
;
StructDcModuleManage
DcModuleManage_All
;
StructDcModuleStatus
DcModuleStatus_ALL
[
64
];
StructDcModuleStatus
DcModuleStatus_ALL
[
16
];
StructDcModuleCtrl
DcModuleCtrl
;
StructDcModuleCtrl
DcModuleCtrl
;
StructDcModuleCtrl
DcModuleCtrl_B
;
StructDcModuleCtrl
DcModuleCtrl_B
;
...
@@ -320,7 +320,7 @@ void DcModule(void const * parameter)
...
@@ -320,7 +320,7 @@ void DcModule(void const * parameter)
{
{
DcModeleRelayInit
();
DcModeleRelayInit
();
DCModuleRelayOutChkInit
();
DCModuleRelayOutChkInit
();
osDelay
(
6000
);
//
osDelay(6000);
DcModuleCanInit
();
DcModuleCanInit
();
//ACContactorSet(eSwSta_On);
//ACContactorSet(eSwSta_On);
...
@@ -348,7 +348,7 @@ void DcModule(void const * parameter)
...
@@ -348,7 +348,7 @@ void DcModule(void const * parameter)
}
}
}
}
RelayStatusCheck
();
//
RelayStatusCheck();
DcModuleManageProcess_SmartAllocation
();
DcModuleManageProcess_SmartAllocation
();
...
@@ -735,7 +735,7 @@ void DcModuleMsgReceive_ZhongXing(CanRxMsg* RxMsg)
...
@@ -735,7 +735,7 @@ void DcModuleMsgReceive_ZhongXing(CanRxMsg* RxMsg)
DcModuleManage_All
.
OnlineFlag
|=
((
long
long
)
1
<<
(
addr
&
0x0f
));
DcModuleManage_All
.
OnlineFlag
|=
((
long
long
)
1
<<
(
addr
&
0x0f
));
Data
.
Currt
=
(((
u16
)
RxMsg
->
Data
[
4
]
<<
8
)
+
RxMsg
->
Data
[
5
])
/
10
;
Data
.
Currt
=
(((
u16
)
RxMsg
->
Data
[
4
]
<<
8
)
+
RxMsg
->
Data
[
5
])
/
10
;
Data
.
Volt
=
((
u16
)
RxMsg
->
Data
[
2
]
<<
8
)
+
RxMsg
->
Data
[
3
];
Data
.
Volt
=
((
u16
)
RxMsg
->
Data
[
2
]
<<
8
)
+
RxMsg
->
Data
[
3
];
Data
.
State
=
((
u16
)
RxMsg
->
Data
[
1
]
<<
8
)
+
RxMsg
->
Data
[
0
];
Data
.
State
.
Mult
=
((
u16
)
RxMsg
->
Data
[
1
]
<<
8
)
+
RxMsg
->
Data
[
0
];
Data
.
RecvTime
=
GetSystemTick
();
Data
.
RecvTime
=
GetSystemTick
();
Data
.
Temp
=
RxMsg
->
Data
[
6
];
//当前组号
Data
.
Temp
=
RxMsg
->
Data
[
6
];
//当前组号
DcModuleStatus_ALL
[
Data
.
Id
]
=
Data
;
DcModuleStatus_ALL
[
Data
.
Id
]
=
Data
;
...
@@ -751,12 +751,12 @@ void DcModuleMsgReceive_Incre(CanRxMsg* RxMsg)
...
@@ -751,12 +751,12 @@ void DcModuleMsgReceive_Incre(CanRxMsg* RxMsg)
DcModuleManage_All
.
OnlineFlag
|=
((
long
long
)
1
<<
Data
.
Id
);
DcModuleManage_All
.
OnlineFlag
|=
((
long
long
)
1
<<
Data
.
Id
);
Data
.
Currt
=
((
u32
)
RxMsg
->
Data
[
2
]
<<
8
)
+
RxMsg
->
Data
[
3
];
Data
.
Currt
=
((
u32
)
RxMsg
->
Data
[
2
]
<<
8
)
+
RxMsg
->
Data
[
3
];
Data
.
Volt
=
((
u32
)
RxMsg
->
Data
[
4
]
<<
8
)
+
RxMsg
->
Data
[
5
];
Data
.
Volt
=
((
u32
)
RxMsg
->
Data
[
4
]
<<
8
)
+
RxMsg
->
Data
[
5
];
Data
.
State
=
((
u32
)
RxMsg
->
Data
[
6
]
<<
8
)
+
RxMsg
->
Data
[
7
];
Data
.
State
.
Mult
=
((
u32
)
RxMsg
->
Data
[
6
]
<<
8
)
+
RxMsg
->
Data
[
7
];
Data
.
RecvTime
=
GetSystemTick
();
Data
.
RecvTime
=
GetSystemTick
();
DcModuleStatus_ALL
[
Data
.
Id
]
=
Data
;
DcModuleStatus_ALL
[
Data
.
Id
]
=
Data
;
}
}
GetNXRAcVolt
(
RxMsg
);
//
GetNXRAcVolt(RxMsg);
}
}
void
DcModuleMsgReceive
(
CanRxMsg
*
RxMsg
)
void
DcModuleMsgReceive
(
CanRxMsg
*
RxMsg
)
...
...
DcPillar/Src/SmartAllocation/Drv_SmartAllocation.c
浏览文件 @
184cd9d2
差异被折叠。
点击展开。
DcPillar/Src/SmartAllocation/Drv_SmartAllocation.h
浏览文件 @
184cd9d2
...
@@ -2,6 +2,14 @@
...
@@ -2,6 +2,14 @@
#define __DRV_SMARTALLOCATION_H__
#define __DRV_SMARTALLOCATION_H__
#include "Global.h"
#include "Global.h"
#include "Drv_DcModule.h"
#if DcModule_ZhongXing
#define DCModuleStatusOn 0x02
#else
#define DCModuleStatusOn 0x00
#endif
typedef
enum
typedef
enum
{
{
...
@@ -15,7 +23,7 @@ typedef struct
...
@@ -15,7 +23,7 @@ typedef struct
{
{
u8
addr
;
u8
addr
;
u8
online
;
u8
online
;
u16
status
;
UnionDcModuleStatus
status
;
u8
cmd
;
u8
cmd
;
u32
Voltage
;
u32
Voltage
;
u32
Current
;
u32
Current
;
...
@@ -44,21 +52,6 @@ typedef struct
...
@@ -44,21 +52,6 @@ typedef struct
u16
ActualCurrt
;
//0.1A/Bit;
u16
ActualCurrt
;
//0.1A/Bit;
}
StructDcModuleGroupCtrl
;
}
StructDcModuleGroupCtrl
;
typedef
union
{
u8
Mult
;
struct
{
u8
Reserve
:
1
;
//Bit0: 预留
u8
other
:
1
;
//Bit1: 其他故障 0x00 -- 正常 0x01 --- 故障
u8
fan
:
1
;
//Bit2: 风扇故障 0x00 -- 正常 0x01 --- 故障
u8
outShort
:
1
;
//Bit3: 直流输出短路 0x00 -- 正常 0x01 --- 故障
u8
tempOver
:
1
;
//Bit4: 过温 0x00 -- 正常 0x01 --- 故障
u8
outLow
:
1
;
//Bit5: 直流输出欠压 0x00 -- 正常 0x01 --- 故障
u8
outHigh
:
1
;
//Bit6: 直流输出过压故障 0x00 -- 正常 0x01 --- 故障
u8
accIn
:
1
;
//Bit7: 交流输入故障 0x00 -- 正常 0x01 --- 故障
}
Value
;
}
UnionDcModuleStatus
;
extern
UnionDcModuleStatus
DcModuleStatus
;
extern
UnionDcModuleStatus
DcModuleStatus
;
extern
UnionDcModuleStatus
DcModuleStatus_A
;
extern
UnionDcModuleStatus
DcModuleStatus_A
;
...
...
DcPillar/Src/Thread/Charge/ChgPro_ChgIdle.c
浏览文件 @
184cd9d2
...
@@ -46,6 +46,8 @@ void ChgProChgIdle(StructChargeCtrl *pChargeCtrl)
...
@@ -46,6 +46,8 @@ void ChgProChgIdle(StructChargeCtrl *pChargeCtrl)
memset
(
&
BmvMsg
,
0xFF
,
sizeof
(
BmvMsg
));
memset
(
&
BmvMsg
,
0xFF
,
sizeof
(
BmvMsg
));
memset
(
&
BmtMsg
,
0xFF
,
sizeof
(
BmtMsg
));
memset
(
&
BmtMsg
,
0xFF
,
sizeof
(
BmtMsg
));
u32
OneSecondTick
=
GetSystemTick
();
u32
LockCount
=
0
;
while
(
1
)
while
(
1
)
{
{
memset
(
&
BemMsg
,
0
,
sizeof
(
BemMsg
));
memset
(
&
BemMsg
,
0
,
sizeof
(
BemMsg
));
...
@@ -96,6 +98,31 @@ void ChgProChgIdle(StructChargeCtrl *pChargeCtrl)
...
@@ -96,6 +98,31 @@ void ChgProChgIdle(StructChargeCtrl *pChargeCtrl)
}
}
ACContactorSet
(
eSwSta_On
);
ACContactorSet
(
eSwSta_On
);
}
}
if
((
GetSystemTick
()
-
OneSecondTick
)
>=
1000
)
{
if
(
LockGet
()
==
eSwSta_On
&&
ChargeStopType
!=
eChgStop_None
)
{
LockCount
++
;
if
(
LockCount
>=
10
)
{
LockCount
=
10
;
}
else
if
(
LockCount
>=
3
)
{
LockCount
=
10
;
LockSet
(
eSwSta_Off
);
}
else
if
(
LockCount
>=
2
)
{
LockSet
(
eSwSta_On
);
}
}
}
if
(
if
(
(
0
!=
PillarError
.
Value
.
Emergency
)
(
0
!=
PillarError
.
Value
.
Emergency
)
||
(
0
!=
PillarError
.
Value
.
NoDcmod
)
||
(
0
!=
PillarError
.
Value
.
NoDcmod
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论