Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LE19
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
时昊
LE19
Commits
912b1f90
Commit
912b1f90
authored
Mar 17, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改功率表计算方式
parent
3f0ad845
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
Gauge_Display.c
le19源码/Source/Application/Display/Gauge_Display.c
+18
-14
No files found.
le19源码/Source/Application/Display/Gauge_Display.c
View file @
912b1f90
...
@@ -270,9 +270,9 @@ void Gauge_Power_Display(void)
...
@@ -270,9 +270,9 @@ void Gauge_Power_Display(void)
SEG_SET_PowerDial
(
1u
,
0u
,
0u
,
255u
);
SEG_SET_PowerDial
(
1u
,
0u
,
0u
,
255u
);
}
}
}
}
else
//
-
else
//
PTModeInd = 1
{
{
if
(
Batt_Curr
<
0xFB00
)
if
(
Batt_Curr
<
0xFB00
)
//0.05 -1600
{
{
BattCurr
.
Valid
=
1
;
BattCurr
.
Valid
=
1
;
Batt_Curr
=
(
Batt_Curr
*
5
);
Batt_Curr
=
(
Batt_Curr
*
5
);
...
@@ -286,7 +286,12 @@ void Gauge_Power_Display(void)
...
@@ -286,7 +286,12 @@ void Gauge_Power_Display(void)
Batt_Curr
=
160000
-
Batt_Curr
;
Batt_Curr
=
160000
-
Batt_Curr
;
BattCurr
.
Symbol
=
1
;
BattCurr
.
Symbol
=
1
;
}
}
BattCurr
.
Value
=
Batt_Curr
/
100
;
BattCurr
.
Value
=
Batt_Curr
;
//100倍
BattCurr
.
Value
*=
100
;
//乘100%
BattCurr
.
Value
/=
200
;
//除200
BattCurr
.
Value
+=
90
;
//大于等于10进1 0.1*100=10
BattCurr
.
Value
/=
100
;
//1倍,留整数
}
}
else
else
{
{
...
@@ -300,27 +305,19 @@ void Gauge_Power_Display(void)
...
@@ -300,27 +305,19 @@ void Gauge_Power_Display(void)
//0格和0%
//0格和0%
SEG_SET_PowerDial
(
1u
,
0u
,
0u
,
0u
);
SEG_SET_PowerDial
(
1u
,
0u
,
0u
,
0u
);
}
}
else
else
//PTModeInd = 1,且有效时
{
{
//-1格和-50%
//-1格和-50%
SEG_SET_PowerDial
(
1u
,
0x81u
,
1u
,
50u
);
SEG_SET_PowerDial
(
1u
,
0x81u
,
1u
,
50u
);
if
(
BattCurr
.
Symbol
==
1
)
if
(
BattCurr
.
Symbol
==
1
)
//-
{
{
if
(
BattCurr
.
Value
>
100
)
if
(
BattCurr
.
Value
>
50
)
//负数情况下,数值越大,实际越小
{
{
//-1 -2格和-100%
//-1 -2格和-100%
SEG_SET_PowerDial
(
1u
,
0x82u
,
1u
,
100u
);
SEG_SET_PowerDial
(
1u
,
0x82u
,
1u
,
100u
);
}
}
}
}
else
{
if
(
BattCurr
.
Value
>
0
)
{
//0格和0%
SEG_SET_PowerDial
(
1u
,
0u
,
0u
,
0u
);
}
}
}
}
}
}
}
}
...
@@ -427,9 +424,16 @@ void Gauge_Clock_Display(void)
...
@@ -427,9 +424,16 @@ void Gauge_Clock_Display(void)
//ʱ����ʾ
//ʱ����ʾ
if
(
Factory_ClearOdo_Display_Flag
==
0
)
if
(
Factory_ClearOdo_Display_Flag
==
0
)
{
if
(
CAN_MSG_Status
(
ID_can0x18FEE69F_Msg_Count
)
!=
0u
)
{
SEG_SET_Clock
(
0
,
0
,
0
,
0
,
0
);
}
else
{
{
SEG_SET_Clock
(
RTCTimeCurrent
.
Hour
,
RTCTimeCurrent
.
Minute
,
FLASH_SYNC_1Hz
,
1
,
1
);
SEG_SET_Clock
(
RTCTimeCurrent
.
Hour
,
RTCTimeCurrent
.
Minute
,
FLASH_SYNC_1Hz
,
1
,
1
);
}
}
}
}
}
else
else
...
...
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