Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
DC360_1drap3_xiaoju_V1
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
丁雨邯
DC360_1drap3_xiaoju_V1
Commits
13d4f640
提交
13d4f640
authored
6月 16, 2020
作者:
wysheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
模块状态上报
上级
c68ce5d6
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
153 行增加
和
26 行删除
+153
-26
Drv_TCUComm.c
DcPillar/Src/Drivers/Drv_TCUComm.c
+19
-19
Drv_SmartAllocation.c
DcPillar/Src/SmartAllocation/Drv_SmartAllocation.c
+113
-6
Drv_SmartAllocation.h
DcPillar/Src/SmartAllocation/Drv_SmartAllocation.h
+20
-0
ChgPro_ShakeHand.c
DcPillar/Src/Thread/Charge/ChgPro_ShakeHand.c
+1
-1
没有找到文件。
DcPillar/Src/Drivers/Drv_TCUComm.c
浏览文件 @
13d4f640
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#include "Drv_Adc.h"
#include "Drv_Adc.h"
#include "Drv_SmartAllocation.h"
osMessageQId
TCUMsg
=
0
;
osMessageQId
TCUMsg
=
0
;
osMessageQId
TCUMsg_B
=
0
;
osMessageQId
TCUMsg_B
=
0
;
...
@@ -2445,19 +2445,19 @@ void InformationReporting_22_A(void)
...
@@ -2445,19 +2445,19 @@ void InformationReporting_22_A(void)
InformainReport_A
.
InfRe
.
DCCurrHi
=
0
;
InformainReport_A
.
InfRe
.
DCCurrHi
=
0
;
InformainReport_A
.
InfRe
.
DcModErr
=
PillarError
.
Value
.
NoDcmod
;
InformainReport_A
.
InfRe
.
DcModErr
=
PillarError
.
Value
.
DCmodError
;
InformainReport_A
.
InfRe
.
DCModIn
=
0
;
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
=
PillarError
.
Value
.
O
utShort
;
InformainReport_A
.
InfRe
.
DcOutShor
=
DcModuleStatus_A
.
Value
.
o
utShort
;
InformainReport_A
.
InfRe
.
DCModOutCuHi
=
0
;
//
InformainReport_A.InfRe.DCModOutCuHi = 0;
InformainReport_A
.
InfRe
.
DCModOutVoHi
=
0
;
InformainReport_A
.
InfRe
.
DCModOutVoHi
=
DcModuleStatus_A
.
Value
.
outHigh
;
InformainReport_A
.
InfRe
.
DCModOutVoLo
=
0
;
InformainReport_A
.
InfRe
.
DCModOutVoLo
=
DcModuleStatus_A
.
Value
.
outLow
;
InformainReport_A
.
InfRe
.
DCModTempHi
=
0
;
InformainReport_A
.
InfRe
.
DCModTempHi
=
DcModuleStatus_A
.
Value
.
tempOver
;
InformainReport_A
.
InfRe
.
DCModComm
=
PillarError
.
Value
.
NoDcmod
;
InformainReport_A
.
InfRe
.
DCModComm
=
PillarError
.
Value
.
NoDcmod
;
InformainReport_A
.
InfRe
.
DCModFan
=
0
;
InformainReport_A
.
InfRe
.
DCModFan
=
DcModuleStatus_A
.
Value
.
fan
;
InformainReport_A
.
InfRe
.
CCConnect
=
!
CcStatusRead
();
InformainReport_A
.
InfRe
.
CCConnect
=
!
CcStatusRead
();
InformainReport_A
.
InfRe
.
InsertGunSta
=
1
;
InformainReport_A
.
InfRe
.
InsertGunSta
=
1
;
if
(
!
CcStatusRead
()
&&
(
ChargeCtrl
.
CurProcess
==
eChgPro_ChgIdle
))
if
(
!
CcStatusRead
()
&&
(
ChargeCtrl
.
CurProcess
==
eChgPro_ChgIdle
))
...
@@ -2576,19 +2576,19 @@ void InformationReporting_22_B(void)
...
@@ -2576,19 +2576,19 @@ void InformationReporting_22_B(void)
InformainReport_B
.
InfRe
.
DCCurrHi
=
0
;
InformainReport_B
.
InfRe
.
DCCurrHi
=
0
;
InformainReport_B
.
InfRe
.
DcModErr
=
PillarError_B
.
Value
.
NoDcmod
;
InformainReport_B
.
InfRe
.
DcModErr
=
PillarError_B
.
Value
.
DCmodError
;
InformainReport_B
.
InfRe
.
DCModIn
=
0
;
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
=
PillarError_B
.
Value
.
O
utShort
;
InformainReport_B
.
InfRe
.
DcOutShor
=
DcModuleStatus_B
.
Value
.
o
utShort
;
InformainReport_B
.
InfRe
.
DCModOutCuHi
=
0
;
//
InformainReport_B.InfRe.DCModOutCuHi = 0;
InformainReport_B
.
InfRe
.
DCModOutVoHi
=
0
;
InformainReport_B
.
InfRe
.
DCModOutVoHi
=
DcModuleStatus_B
.
Value
.
outHigh
;
InformainReport_B
.
InfRe
.
DCModOutVoLo
=
0
;
InformainReport_B
.
InfRe
.
DCModOutVoLo
=
DcModuleStatus_B
.
Value
.
outLow
;
InformainReport_B
.
InfRe
.
DCModTempHi
=
0
;
InformainReport_B
.
InfRe
.
DCModTempHi
=
DcModuleStatus_B
.
Value
.
tempOver
;
InformainReport_B
.
InfRe
.
DCModComm
=
PillarError_B
.
Value
.
NoDcmod
;
InformainReport_B
.
InfRe
.
DCModComm
=
PillarError_B
.
Value
.
NoDcmod
;
InformainReport_B
.
InfRe
.
DCModFan
=
0
;
InformainReport_B
.
InfRe
.
DCModFan
=
DcModuleStatus_B
.
Value
.
fan
;
InformainReport_B
.
InfRe
.
CCConnect
=
!
CcStatusRead_B
();
InformainReport_B
.
InfRe
.
CCConnect
=
!
CcStatusRead_B
();
InformainReport_B
.
InfRe
.
InsertGunSta
=
1
;
InformainReport_B
.
InfRe
.
InsertGunSta
=
1
;
if
(
!
CcStatusRead_B
()
&&
(
ChargeCtrl_B
.
CurProcess
==
eChgPro_ChgIdle
))
if
(
!
CcStatusRead_B
()
&&
(
ChargeCtrl_B
.
CurProcess
==
eChgPro_ChgIdle
))
...
...
DcPillar/Src/SmartAllocation/Drv_SmartAllocation.c
浏览文件 @
13d4f640
...
@@ -70,6 +70,11 @@ void DcModuleSetGroupNum(void);
...
@@ -70,6 +70,11 @@ void DcModuleSetGroupNum(void);
extern
void
GetNXRAcVoltMsg
(
u32
addr
);
extern
void
GetNXRAcVoltMsg
(
u32
addr
);
void
DcModuleCancelGroupNum
(
u16
addr
);
void
DcModuleCancelGroupNum
(
u16
addr
);
extern
void
DcModuleStatusCheck
(
void
);
UnionDcModuleStatus
DcModuleStatus
;
UnionDcModuleStatus
DcModuleStatus_A
;
UnionDcModuleStatus
DcModuleStatus_B
;
void
DcModuleManageProcess_SmartAllocation
(
void
)
void
DcModuleManageProcess_SmartAllocation
(
void
)
{
{
...
@@ -83,18 +88,19 @@ void DcModuleManageProcess_SmartAllocation(void)
...
@@ -83,18 +88,19 @@ void DcModuleManageProcess_SmartAllocation(void)
u32
Volt
,
Volt_A
,
Volt_B
;
u32
Volt
,
Volt_A
,
Volt_B
;
u8
status
;
u8
status
;
SendCheckToDcModule
();
if
((
GetSystemTick
()
-
CheckTick
)
<
100
)
if
((
GetSystemTick
()
-
CheckTick
)
<
100
)
return
;
return
;
CheckTick
=
GetSystemTick
();
CheckTick
=
GetSystemTick
();
SendCheckToDcModule
();
DcModuleStatusCheck
();
Flag
=
1
;
Flag
=
1
;
Count
=
0
;
Count
=
0
;
for
(
i
=
0
;
i
<
64
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
{
{
if
(
Flag
&
DcModuleManage_All
.
OnlineFlag
)
if
(
Flag
&
DcModuleManage_All
.
OnlineFlag
)
{
{
...
@@ -1303,6 +1309,8 @@ void RelayStatusCheck(void)
...
@@ -1303,6 +1309,8 @@ void RelayStatusCheck(void)
{
{
static
u32
Tick
=
0
;
static
u32
Tick
=
0
;
static
u8
flag
=
0
;
static
u8
flag
=
0
;
static
u8
flag_A
=
0
;
static
u8
flag_B
=
0
;
if
((
GetSystemTick
()
-
Tick
)
<
100
)
if
((
GetSystemTick
()
-
Tick
)
<
100
)
{
{
return
;
return
;
...
@@ -1310,8 +1318,8 @@ void RelayStatusCheck(void)
...
@@ -1310,8 +1318,8 @@ void RelayStatusCheck(void)
Tick
=
GetSystemTick
();
Tick
=
GetSystemTick
();
if
((
GetDcModeleRelaySet
(
Relay_K5K6
)
!=
GetK5K6Status
())
if
((
GetDcModeleRelaySet
(
Relay_K5K6
)
!=
GetK5K6Status
())
||
(
GetDcModeleRelaySet
(
Relay_K1K2
)
!=
GetK1K2Status
())
/*
|| (GetDcModeleRelaySet(Relay_K1K2) != GetK1K2Status())
||
(
GetDcModeleRelaySet
(
Relay_K7K8
)
!=
GetK7K8Status
()))
|| (GetDcModeleRelaySet(Relay_K7K8) != GetK7K8Status())
*/
)
{
{
flag
++
;
flag
++
;
}
}
...
@@ -1330,6 +1338,23 @@ void RelayStatusCheck(void)
...
@@ -1330,6 +1338,23 @@ void RelayStatusCheck(void)
flag
=
0
;
flag
=
0
;
}
}
if
(
GetDcModeleRelaySet
(
Relay_K1K2
)
!=
GetK1K2Status
())
{
flag_A
++
;
}
else
{
flag_A
=
0
;
}
if
(
GetDcModeleRelaySet
(
Relay_K7K8
)
!=
GetK7K8Status
())
{
flag_B
++
;
}
else
{
flag_B
=
0
;
}
if
(
flag
>=
5
)
if
(
flag
>=
5
)
{
{
flag
=
5
;
flag
=
5
;
...
@@ -1341,5 +1366,87 @@ void RelayStatusCheck(void)
...
@@ -1341,5 +1366,87 @@ void RelayStatusCheck(void)
PillarError
.
Value
.
UniContactor
=
0
;
PillarError
.
Value
.
UniContactor
=
0
;
PillarError_B
.
Value
.
UniContactor
=
0
;
PillarError_B
.
Value
.
UniContactor
=
0
;
}
}
if
(
flag_A
>=
5
)
{
flag_A
=
5
;
PillarError
.
Value
.
Contactor
=
1
;
}
else
{
PillarError
.
Value
.
Contactor
=
0
;
}
if
(
flag_B
>=
5
)
{
flag_B
=
5
;
PillarError_B
.
Value
.
Contactor
=
1
;
}
else
{
PillarError_B
.
Value
.
Contactor
=
0
;
}
}
void
DcModuleStatusCheck_ZhongXing
(
void
)
{
u16
status
=
0
;
u16
status_A
=
0
;
u16
status_B
=
0
;
u16
addr
=
0
;
for
(
u8
i
=
0
;
i
<
DcModuleGroupSize
;
i
++
)
{
if
(
DcModuleGroup
[
i
].
status
==
Hold_A
)
{
for
(
u8
j
=
0
;
j
<
DcModuleGroup
[
i
].
num
;
j
++
)
{
addr
=
DcModuleGroup
[
i
].
modules
[
j
].
addr
;
status_A
|=
DcModuleStatus_ALL
[
addr
].
State
;
}
}
else
if
(
DcModuleGroup
[
i
].
status
==
Hold_B
)
{
for
(
u8
j
=
0
;
j
<
DcModuleGroup
[
i
].
num
;
j
++
)
{
addr
=
DcModuleGroup
[
i
].
modules
[
j
].
addr
;
status_B
|=
DcModuleStatus_ALL
[
addr
].
State
;
}
}
else
if
(
DcModuleGroup
[
i
].
status
==
Valid
)
{
for
(
u8
j
=
0
;
j
<
DcModuleGroup
[
i
].
num
;
j
++
)
{
addr
=
DcModuleGroup
[
i
].
modules
[
j
].
addr
;
status
|=
DcModuleStatus_ALL
[
addr
].
State
;
}
}
}
if
(
status_A
&
0x0010
)
{
//PillarError.Value.DCmodError = 1;
}
if
(
status_B
&
0x0010
)
{
//PillarError_B.Value.DCmodError = 1;
}
DcModuleStatus
.
Mult
=
(
u8
)(
status
>>
8
);
DcModuleStatus_A
.
Mult
=
(
u8
)(
status_A
>>
8
);
DcModuleStatus_B
.
Mult
=
(
u8
)(
status_B
>>
8
);
}
void
DcModuleStatusCheck
(
void
)
{
#if DcModule_ZhongXing
DcModuleStatusCheck_ZhongXing
();
#else
#endif
}
}
DcPillar/Src/SmartAllocation/Drv_SmartAllocation.h
浏览文件 @
13d4f640
...
@@ -44,6 +44,26 @@ typedef struct
...
@@ -44,6 +44,26 @@ 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_A
;
extern
UnionDcModuleStatus
DcModuleStatus_B
;
extern
StructDcModuleGroup
DcModuleGroup
[];
extern
StructDcModuleGroup
DcModuleGroup
[];
extern
void
DcModuleGroupDateInit
(
void
);
extern
void
DcModuleGroupDateInit
(
void
);
...
...
DcPillar/Src/Thread/Charge/ChgPro_ShakeHand.c
浏览文件 @
13d4f640
...
@@ -118,7 +118,7 @@ void ChgProShakeHand(StructChargeCtrl *pChargeCtrl)
...
@@ -118,7 +118,7 @@ void ChgProShakeHand(StructChargeCtrl *pChargeCtrl)
pChargeCtrl
->
CurProcess
=
eChgPro_ChgStop
;
pChargeCtrl
->
CurProcess
=
eChgPro_ChgStop
;
pChargeCtrl
->
Param
=
0
;
pChargeCtrl
->
Param
=
0
;
ShortCirCheckSet
(
eSwSta_Off
);
ShortCirCheckSet
(
eSwSta_Off
);
TCUCurChgRecd
.
TCUChgStopType
=
0x22
;
//
TCUCurChgRecd.TCUChgStopType = 0x22;
}
}
}
}
else
else
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论