Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
baizhengyuan
TianYing_ty100
Commits
33bc1913
Commit
33bc1913
authored
May 09, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加电压无效,显示--的标志
parent
d06acc5e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
Data_Voltage.c
Firmware/Source/Application/Data_Voltage/Data_Voltage.c
+9
-0
Data_Voltage.h
Firmware/Source/Application/Data_Voltage/Data_Voltage.h
+1
-0
No files found.
Firmware/Source/Application/Data_Voltage/Data_Voltage.c
View file @
33bc1913
...
...
@@ -2,10 +2,12 @@
#include "Data_Voltage\Data_Voltage.h"
uint8_t
voltage_value
=
0
;
uint8_t
voltage_valid
=
0
;
void
Data_Voltage_Init
(
void
)
{
voltage_value
=
0
;
voltage_valid
=
0
;
}
void
Data_Voltage_Processing_Service
(
void
)
{
...
...
@@ -14,15 +16,18 @@ void Data_Voltage_Processing_Service ( void )
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x401_Msg_Count
)
==
CAN_SIG_LOST
)
{
voltage_value
=
0
;
voltage_valid
=
0
;
}
else
{
voltage_value
=
Get_CAN_CH0_ID_401_Sig_ECU_Battery_Voltage
();
voltage_valid
=
1
;
}
}
else
{
voltage_value
=
0
;
voltage_valid
=
0
;
}
}
...
...
@@ -32,3 +37,7 @@ uint8_t Get_Battery_Voltage(void)
{
return
voltage_value
;
}
uint8_t
Get_Battery_Voltage_Valid
(
void
)
{
return
voltage_valid
;
}
\ No newline at end of file
Firmware/Source/Application/Data_Voltage/Data_Voltage.h
View file @
33bc1913
...
...
@@ -6,4 +6,5 @@
void
Data_Voltage_Init
(
void
);
void
Data_Voltage_Processing_Service
(
void
);
uint8_t
Get_Battery_Voltage
(
void
);
uint8_t
Get_Battery_Voltage_Valid
(
void
);
#endif
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