Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VC66_7C
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
ISUZU
VC66_7C
Commits
64510179
Commit
64510179
authored
Feb 06, 2023
by
hu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' into withBoot
parents
10a6da7e
50993e08
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
16 deletions
+41
-16
Data_CoolantTemperature.c
...ion/APP/Data_CoolantTemperature/Data_CoolantTemperature.c
+35
-5
Gauges.c
source/Application/APP/GaugesMode/Gauges.c
+1
-11
Gauges.h
source/Application/APP/GaugesMode/Gauges.h
+5
-0
No files found.
source/Application/APP/Data_CoolantTemperature/Data_CoolantTemperature.c
View file @
64510179
...
...
@@ -5,6 +5,7 @@
#include "DisplaySch_user.h"
#include "DispSch.h"
#include "Gauges.h"
//-------------------------------------------
//水温数据处理
...
...
@@ -74,14 +75,17 @@ void Coolant_Processing_Service(void)
uint8_t
TargetSeg
=
0
;
uint8_t
Msg_CoolTemp
=
0u
;
uint8_t
CanStatus
=
0u
;
static
uint16_t
TempCurSeg
=
0
;
static
uint16_t
TempCurSegTime
=
0
;
static
uint16_t
DestPostionOld
=
0
;
CanStatus
=
CAN_MSG_Status
(
ID_CanMsg18FEEE00_Msg_Count
);
if
(
CanStatus
==
CAN_SIG_LOST
)
{
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Valid
=
0
u
;
CoolantVariable
.
Value
=
0u
;
Timer2s
=
0
;
Timer2s
=
0
u
;
}
else
{
...
...
@@ -90,6 +94,7 @@ void Coolant_Processing_Service(void)
if
(
Msg_CoolTemp
>
0xFAu
)
{
CoolantVariable
.
Valid
=
0u
;
CoolantVariable
.
Value
=
0u
;
TargetSeg
=
0u
;
}
else
...
...
@@ -108,7 +113,33 @@ void Coolant_Processing_Service(void)
}
}
CoolantVariable
.
CurSeg
=
CalCoolant_CurSeg
(
CoolantVariable
.
Valid
,
CoolantVariable
.
Value
);
TempCurSeg
=
CalCoolant_CurSeg
(
CoolantVariable
.
Valid
,
CoolantVariable
.
Value
);
if
(
(
GetGaugesDirec
(
TempGauges
)
==
1u
)
&&
(
TempCurSeg
==
DestPostion
[
TempGauges
]
/
10u
)
)
{
if
(
DestPostionOld
!=
DestPostion
[
TempGauges
]
/
10u
)
{
DestPostionOld
=
DestPostion
[
TempGauges
]
/
10u
;
TempCurSegTime
=
0u
;
}
if
(
TempCurSegTime
<
200u
)
{
TempCurSegTime
++
;
}
else
{
CoolantVariable
.
CurSeg
=
TempCurSeg
;
}
}
else
{
TempCurSegTime
=
0u
;
CoolantVariable
.
CurSeg
=
TempCurSeg
;
}
}
/*-------------------------------------------------------------------------
* Function Name : CalCoolant_CurSeg
...
...
@@ -122,15 +153,14 @@ static uint8_t CalCoolant_CurSeg(uint8_t Valid, uint8_t Temp)
{
uint8_t
u8Result
=
0u
;
SetGaugesPara
(
TempGauges
,
Temp
);
if
(
Valid
)
{
SetGaugesPara
(
TempGauges
,
Temp
);
u8Result
=
GetGaugesCurrentPos
(
TempGauges
)
;
}
else
{
//范围外/CAN中断
SetGaugesPara
(
TempGauges
,
Temp
);
u8Result
=
0
;
}
...
...
source/Application/APP/GaugesMode/Gauges.c
View file @
64510179
...
...
@@ -12,8 +12,6 @@
*/
#include "Gauges.h"
#include "GaugesInterface.h"
#define GAUGES_TOTAL_NUM 9u
#define GAUGES_INIT_TIME_MAX 3500u
uint16_t
GaugesCurrentPos
[
GAUGES_TOTAL_NUM
]
;
uint16_t
BackupDestPostion
[
GAUGES_TOTAL_NUM
];
uint16_t
GaugesDisPos
[
GAUGES_TOTAL_NUM
];
...
...
@@ -422,18 +420,10 @@ void GaugeMoveing(uint8_t GaugesNum)
GaugesMoveTimesTmp
=
GaugesFreeSetTimes
;
}
else
{
/*水温表上升最后一格需要调整时间*/
if
((
GaugesNum
==
TempGauges
)
&&
(
DirecSign
[
TempGauges
]
==
1u
)
&&
(
GaugesCurrentPos
[
TempGauges
]
==
(
DestPostion
[
TempGauges
]
-
10u
)))
{
GaugesMoveTimesTmp
=
4000u
;
}
else
{
GaugesMoveTimesTmp
=
GaugesDisDelayMax
[
DisplayModeTmp
[
GaugesNum
]][
GaugesModuleType
[
GaugesNum
]];
}
}
}
if
(
GaugesNum
==
VoltGauges
)
{
...
...
source/Application/APP/GaugesMode/Gauges.h
View file @
64510179
...
...
@@ -22,6 +22,10 @@
/*#define uint32_t unsigned long*/
/*??Struct*/
#define GAUGES_TOTAL_NUM 9u
#define GAUGES_INIT_TIME_MAX 3500u
typedef
enum
{
StepperMotor
=
0u
,
...
...
@@ -54,6 +58,7 @@ typedef struct
}
_GaugesInfoInit
;
extern
uint16_t
DestPostion
[
GAUGES_TOTAL_NUM
];
extern
uint8_t
QuerySector
(
_GaugesInfoInit
*
GParam
,
uint8_t
DirecSignPara
,
uint8_t
SubAscf
,
uint16_t
FunGaugesDataIn
);
extern
uint16_t
GetGaugestargetPosSub
(
_GaugesInfoInit
*
GParam
,
uint8_t
SubAscf
,
uint8_t
SectorID
,
uint8_t
DirecSignPara
,
uint16_t
FunGaugesDataIn
);
extern
uint16_t
GetGaugestargetPos
(
_GaugesInfoInit
*
GParam
,
uint8_t
DirecSignPara
);
...
...
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