Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT_RMR42E
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
时昊
RT_RMR42E
Commits
11a6bdc5
Commit
11a6bdc5
authored
Mar 07, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:修改故障码扳子标志显示策略
parent
38b467fd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
14 deletions
+89
-14
Fault_Code.c
Firmware/Source/Application/Driving_Information/Fault_Code.c
+31
-0
Fault_Code.h
Firmware/Source/Application/Driving_Information/Fault_Code.h
+5
-3
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+2
-0
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+48
-11
SEG_DISPLAY.h
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
+3
-0
No files found.
Firmware/Source/Application/Driving_Information/Fault_Code.c
View file @
11a6bdc5
...
...
@@ -30,6 +30,8 @@ void Fault_Code_KL15_Init(void)
void
Fault_Code_Service
(
void
)
{
#if (PART_NUMBER == G54_A01)
uint8_t
codeNum
=
0U
;
Code
.
FaultCodeArr
[
0
]
=
Get_CAN_CH0_ID_38E_Sig_BMCU_FaultCode
();
Code
.
FaultCodeArr
[
1
]
=
Get_CAN_CH0_ID_234_Sig_EMS_FaultCode
();
Code
.
FaultCodeArr
[
2
]
=
Get_CAN_CH0_ID_22A_Sig_GCU_FaultCode
();
...
...
@@ -58,6 +60,22 @@ void Fault_Code_Service(void)
Code
.
FaultCodeValidHistory
=
Code
.
FaultCodeValid
;
}
if
(
Code
.
FaultCodeValid
)
{
for
(
uint8_t
i
=
0U
;
i
<
MAX_CODE_NUM
;
i
++
)
{
if
(
Code
.
FaultCodeArr
[
i
]
!=
0U
)
{
codeNum
++
;
}
}
Code
.
FaultCodeNum
=
codeNum
;
}
else
{
Code
.
FaultCodeNum
=
0U
;
}
#endif
}
...
...
@@ -138,3 +156,16 @@ uint8_t Get_FaultCode_Valid(void)
return
Code
.
FaultCodeValid
;
}
/******************************************************************************
函数名:Get_FaultCode_Num
功 能:获取故障码个数
参 数:无
返回值:Code.FaultCodeNum
******************************************************************************
注 意:该函数必须每 ms被调用一次
******************************************************************************/
uint8_t
Get_FaultCode_Num
(
void
)
{
return
Code
.
FaultCodeNum
;
}
Firmware/Source/Application/Driving_Information/Fault_Code.h
View file @
11a6bdc5
...
...
@@ -9,12 +9,13 @@
typedef
struct
//__attribute__((aligned(4)))
{
uint8_t
FaultCodeValid
;
/*故障码有效状态*/
uint8_t
FaultCodeValidHistory
;
/*故障码有效状态*/
uint8_t
FaultCodeNum
;
/*故障码个数*/
uint16_t
FaultCodeArr
[
MAX_CODE_NUM
];
//故障码列表
uint16_t
FaultCodeDis
;
//当前显示故障
uint16_t
DisTimeCount
;
/*故障码显示计时*/
uint8_t
FaultCodeValid
;
/*故障码有效状态*/
uint8_t
FaultCodeValidHistory
;
/*故障码有效状态*/
}
FaultCodeStruct_st_t
;
...
...
@@ -25,6 +26,7 @@ extern void Fault_Code_Display_Queue(uint8_t TaskTime);
extern
uint16_t
Get_FaultCode_Value
(
void
);
extern
uint8_t
Get_FaultCode_Valid
(
void
);
extern
uint8_t
Get_FaultCode_Num
(
void
);
#endif
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
11a6bdc5
...
...
@@ -160,7 +160,9 @@ void Gauge_faultcode_Display(void)
{
uint8_t
u8faucodeValid
=
Get_FaultCode_Valid
();
uint16_t
u16faucodelValue
=
Get_FaultCode_Value
();
uint8_t
u8FaultCodeNum
=
Get_FaultCode_Num
();
SEG_SET_Fault_Code
(
u8faucodeValid
,
u16faucodelValue
,
0
);
SEG_SET_Fault_Code_Spanner
(
u8faucodeValid
,
0
,
u8FaultCodeNum
);
}
void
Clear_Bu98
(
void
)
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
11a6bdc5
...
...
@@ -1059,7 +1059,6 @@ _Fun_Res SEG_SET_Fault_Code(uint8_t m_Flag, uint16_t m_NUM, uint8_t checkself)
{
if
(
checkself
==
1
)
{
IC1_SEG087
=
IC_SEG_ON
;
/*千位*/
Num
=
(
m_NUM
/
1000u
)
%
10u
;
m8
=
SEG_DISPLAY_NUMBER0
[
Num
];
...
...
@@ -1301,15 +1300,6 @@ _Fun_Res SEG_SET_Fault_Code(uint8_t m_Flag, uint16_t m_NUM, uint8_t checkself)
}
else
{
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG087
=
IC_SEG_ON
;
}
else
{
IC1_SEG087
=
IC_SEG_GREY
;
}
IC1_SEG094
=
IC_SEG_ON
;
IC1_SEG093
=
IC_SEG_ON
;
IC1_SEG091
=
IC_SEG_ON
;
...
...
@@ -1394,7 +1384,6 @@ _Fun_Res SEG_SET_Fault_Code(uint8_t m_Flag, uint16_t m_NUM, uint8_t checkself)
IC1_SEG083
=
IC_SEG_OFF
;
IC1_SEG084
=
IC_SEG_OFF
;
IC1_SEG085
=
IC_SEG_OFF
;
IC1_SEG087
=
IC_SEG_OFF
;
IC1_SEG088
=
IC_SEG_OFF
;
IC1_SEG089
=
IC_SEG_OFF
;
IC1_SEG090
=
IC_SEG_OFF
;
...
...
@@ -1427,6 +1416,52 @@ _Fun_Res SEG_SET_Fault_Code(uint8_t m_Flag, uint16_t m_NUM, uint8_t checkself)
return
m_Res
;
}
/**@brief 故障码扳子显示
* @param[in] m_Flag 故障码扳子是否显示 -1 显示 -0 不显示
* @param[in] flicker 故障码扳子是否闪烁 1---闪烁,非1--闪烁
* @param[in] checkself 是否自检 0<=m_NUM<=299
* @return 函数执行结果
* - EX_OK 上报成功
* - EX_ERR 上报失败
*/
_Fun_Res
SEG_SET_Fault_Code_Spanner
(
uint8_t
m_Flag
,
uint8_t
checkself
,
uint8_t
flicker
)
{
_Fun_Res
m_Res
;
if
(
m_Flag
>
3u
)
{
m_Res
=
EX_ERR
;
}
else
{
if
(
m_Flag
==
1u
)
{
if
(
flicker
==
1U
)
{
if
(
FLASH_SYNC_1Hz
)
{
IC1_SEG087
=
IC_SEG_ON
;
}
else
{
IC1_SEG087
=
IC_SEG_OFF
;
}
}
else
{
IC1_SEG087
=
IC_SEG_ON
;
}
}
else
{
IC1_SEG087
=
IC_SEG_OFF
;
}
m_Res
=
EX_OK
;
}
return
m_Res
;
}
// /**@brief 续航里程显示函数
// * @param[in] m_Flag 续航里程是否显示 -2 显示---km -1 显示 -0 不显示
...
...
@@ -2765,6 +2800,7 @@ void Check_SEG_Display(void)
Fuel
=
Checkself_SEG_step
/
5u
;
SEG_SET_FuelDial
(
1
,
Fuel
);
SEG_SET_Fault_Code
(
1
,
fau_code
,
1
);
SEG_SET_Fault_Code_Spanner
(
1
,
1
,
0
);
}
uint32_t
EleDial_2SOC
=
((
check_SEG_step
*
10
)
/
48
);
...
...
@@ -2852,6 +2888,7 @@ void Checkself_SEG_Display(void)
Fuel
=
Checkself_SEG_step
/
5u
;
SEG_SET_FuelDial
(
1
,
Fuel
);
SEG_SET_Fault_Code
(
1
,
fau_code
,
1
);
SEG_SET_Fault_Code_Spanner
(
1
,
1
,
0
);
}
uint32_t
EleDial_2SOC
=
((
Checkself_SEG_step
*
10
)
/
48
);
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
View file @
11a6bdc5
...
...
@@ -88,6 +88,9 @@ _Fun_Res SEG_SET_L8_NUM(uint8_t m_Flag , uint8_t m_NUM);
/**@brief 故障码显示函数*/
_Fun_Res
SEG_SET_Fault_Code
(
uint8_t
m_Flag
,
uint16_t
m_NUM
,
uint8_t
checkself
);
/**@brief 故障码扳子显示函数*/
_Fun_Res
SEG_SET_Fault_Code_Spanner
(
uint8_t
m_Flag
,
uint8_t
checkself
,
uint8_t
flicker
);
/**@brief 单次时间显示函数*/
_Fun_Res
SEG_SET_Clock
(
uint8_t
m_hour
,
uint8_t
m_minute
,
uint8_t
m_icon
,
uint8_t
m_Flag1
,
uint8_t
m_Flag2
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment