Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MV18
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
SCCNJ
MV18
Commits
e91c4d6d
Commit
e91c4d6d
authored
Oct 09, 2021
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整所有指示灯,待进一步验证
parent
80ab578f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
162 additions
and
49 deletions
+162
-49
C_Layout.hwl
C_Layout.hwl
+2
-2
api_EEPROM.c
Sources/EEPROM/api_EEPROM.c
+6
-8
TBDML.ini
TBDML.ini
+1
-1
api_CAN.c
api_Sources/api_CAN.c
+2
-2
api_RTC.c
api_Sources/api_RTC.c
+25
-14
g_VarType.h
app_Headers/g_VarType.h
+2
-0
gui_Led.c
gui_Sources/gui_Led.c
+124
-22
No files found.
C_Layout.hwl
View file @
e91c4d6d
OPEN source 0 0 60 100
Source < attributes TOOLTIP on,TOOLTIP_FORMAT signed,TOOLTIP_MODE details,FREEZE off,MARKS off
OPEN assembly 60 0 40 31
Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,FORMAT Auto,FREEZE off,TOPPC 0xF
2ADC
0
Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,FORMAT Auto,FREEZE off,TOPPC 0xF
4800
0
OPEN procedure 0 39 60 17
Procedure < attributes VALUES on,TYPES off
OPEN register 60 31 40 25
...
...
@@ -17,4 +17,4 @@ Command < attributes CACHESIZE 1000
bckcolor 50331647
font 'Courier New' 9 BLACK
AUTOSIZE on
ACTIVATE "Command" "Register" "Memory" "Procedure" "Assembly" "Data:2" "
Data:1" "Source
"
ACTIVATE "Command" "Register" "Memory" "Procedure" "Assembly" "Data:2" "
Source" "Data:1
"
Sources/EEPROM/api_EEPROM.c
View file @
e91c4d6d
...
...
@@ -381,9 +381,9 @@ void Init2EData(void)
//Byte2::Bit7 - Bit4 单位 : default:0 km/h,L/100km
Diag2eData
.
D_F1A8
[
3
]
=
0x46
;
//3200-5000rpm
//Byte3::Bit0 车道偏离LDWS
: default:0 未配置
//Byte3::Bit0 车道偏离LDWS : default:0 未配置
//Byte3::Bit3 - Bit1 水温表报警点 : default:2 105degC
//Byte3::Bit7 - Bit
4 转速表红区 : default:2 3200rpm
//Byte3::Bit7 - Bit
6 发动机系统保护SVS : default:0 CAN 1 硬线
Diag2eData
.
D_F1A8
[
4
]
=
0x20
;
//Byte4::Bit6 - Bit5 燃油表参数 : default:0 E点105Ω;F点7Ω
//Byte4::Bit7 冷却液液位报警 : default:0 未配置
...
...
@@ -413,9 +413,8 @@ void Init2EData(void)
ConfigItem
.
LDWSConfig
=
Diag2eData
.
D_F1A8
[
3
]
&
0x01
;
//水温表报警点
ConfigItem
.
TempConfig
=
(
Diag2eData
.
D_F1A8
[
3
]
>>
1
)
&
0x07
;
//转速红区配置
g_RedArea
=
(
Diag2eData
.
D_F1A8
[
3
]
>>
4
)
&
0x0F
;
g_RedArea
=
2400
+
g_RedArea
*
200
;
//--//
//发动机系统保护 SVS
ConfigItem
.
SVSConfig
=
(
Diag2eData
.
D_F1A8
[
3
]
>>
6
)
&
0x03
;
//燃油
ConfigItem
.
FuelConfig
=
(
Diag2eData
.
D_F1A8
[
4
]
>>
5
)
&
0x03
;
//冷却液位低
...
...
@@ -452,9 +451,8 @@ void Init2EData(void)
ConfigItem
.
LDWSConfig
=
Diag2eData
.
D_F1A8
[
3
]
&
0x01
;
//水温表报警点
ConfigItem
.
TempConfig
=
(
Diag2eData
.
D_F1A8
[
3
]
>>
1
)
&
0x07
;
//转速红区配置
g_RedArea
=
(
Diag2eData
.
D_F1A8
[
3
]
>>
4
)
&
0x0F
;
g_RedArea
=
2400
+
g_RedArea
*
200
;
//--//
//发动机系统保护 SVS
ConfigItem
.
SVSConfig
=
(
Diag2eData
.
D_F1A8
[
3
]
>>
6
)
&
0x03
;
//燃油
ConfigItem
.
FuelConfig
=
(
Diag2eData
.
D_F1A8
[
4
]
>>
5
)
&
0x03
;
//冷却液位低
...
...
TBDML.ini
View file @
e91c4d6d
...
...
@@ -11,7 +11,7 @@ Layout=C_layout.hwl
LoadDialogOptions
=
AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
CPU
=
HC12
AEFWarningDialog
=
FALSE
MainFrame
=
2,3,-
32000,-32000
,-1,-1,248,32,1208,692
MainFrame
=
2,3,-
1,-1
,-1,-1,248,32,1208,692
TOOLBAR
=
57600 57601 32795 0 57635 57634 57637 0 57671 57669 0 32777 32776 32782 32780 32781 32778 0 32806
Configuration
=
TBDML.hwc
Statusbar
=
1
...
...
api_Sources/api_CAN.c
View file @
e91c4d6d
...
...
@@ -120,7 +120,7 @@ void App_ReceiveCanMsg(void)
}
//驾驶员警告(黄)
if
((
g_canMsg65279
.
Data
[
1
]
&
0x07
)
==
0x01
)
if
((
g_canMsg65279
.
Data
[
1
]
&
0x07
)
==
0x01
)
{
g_CanSwith
.
DriverWarn
=
S_on
;
}
...
...
@@ -528,7 +528,7 @@ void App_ReceiveCanMsg(void)
if
(
g_canMsg04119
.
ProceF
==
MSG_FULL
)
{
//ESP关闭
if
((
g_canMsg
61441
.
Data
[
2
]
&
0x0C
)
==
0x04
)
if
((
g_canMsg
04119
.
Data
[
0
]
&
0x03
)
==
0x01
)
{
g_CanSwith
.
ESPoff
=
1
;
}
...
...
api_Sources/api_RTC.c
View file @
e91c4d6d
...
...
@@ -541,7 +541,31 @@ void Api_ClockGenerate(void)
{
g_LED
.
pPowerTakeoffTime
=
null
;
}
//安全带
if
(
LINT_IN_SAFEBELTn
==
LOW
)
{
if
(
g_LED
.
pSafeBelt1Time
<
T_0_5s
)
{
g_LED
.
pSafeBelt1Time
++
;
}
}
else
{
g_LED
.
pSafeBelt1Time
=
null
;
}
//车厢举升
if
(
LINE_IN_CONTAINERn
==
LOW
)
{
if
(
g_LED
.
pConTainerTime
<
T_0_5s
)
{
g_LED
.
pConTainerTime
++
;
}
}
else
{
g_LED
.
pConTainerTime
=
null
;
}
/*
//EBD-pin5
if(pBrakeIn == LOW)
...
...
@@ -568,20 +592,7 @@ void Api_ClockGenerate(void)
{
g_LED.ABSFaultTimes = null;
}
//安全带
if(pSafeBelt1In == LOW)
{
if(g_LED.pSafeBelt1Time < T_0_5s)
{
g_LED.pSafeBelt1Time ++;
}
}
else
{
g_LED.pSafeBelt1Time = null;
}
//排气制动+
if(pExhaustBrakIn == HIGH)
{
...
...
app_Headers/g_VarType.h
View file @
e91c4d6d
...
...
@@ -699,6 +699,7 @@ typedef struct
INT8U
LTurnDiTime
;
INT8U
RTurnEnTime
;
INT8U
RTurnDiTime
;
INT8U
pConTainerTime
;
}
_LED
;
...
...
@@ -856,6 +857,7 @@ typedef struct
INT8U
LDWSConfig
;
INT8U
EngConfig
;
INT8U
BrakeShoeConfig
;
INT8U
SVSConfig
;
}
_Config
;
typedef
struct
...
...
gui_Sources/gui_Led.c
View file @
e91c4d6d
...
...
@@ -44,7 +44,6 @@ void Gui_AllLedOff(void)
* Return : None
* onther :
--------------------------------------------------------------------------*/
INT8U
Test_Hyq
;
void
Gui_KL15LedDisplay
(
void
)
{
//---------直驱指示灯------
...
...
@@ -66,13 +65,88 @@ void Gui_KL15LedDisplay(void)
}
//08 安全带
if
(
1
)
if
(
DIDFlag
.
Bits
.
DID1017Valid
==
Enable
)
{
LED_SafeBelt_OUT
=
LEDON
;
//on
if
(
IOCTL_DID1017
.
FF_Byte
==
1
)
{
LED_SafeBelt_OUT
=
LEDON
;
//on
}
else
{
LED_SafeBelt_OUT
=
LEDOFF
;
//off
}
}
else
{
LED_SafeBelt_OUT
=
LEDOFF
;
//off
//主安全带
if
((
g_LED
.
CheckLightsTime
<
T_CheckTime
)
&&
(
g_revMeter
.
CurBoardVal
<
300
))
{
LED_SafeBelt_OUT
=
LEDON
;
//on
}
else
{
if
(
g_LED
.
pSafeBelt1Time
>=
T_0_3s
||
g_CanSwith
.
DriverBelt
)
{
LED_SafeBelt_OUT
=
LEDON
;
//on
}
else
{
LED_SafeBelt_OUT
=
LEDOFF
;
//off
}
//主副安全带-LCD
if
(
g_LED
.
pSafeBelt1Time
>=
T_0_3s
)
{
//非故障信息界面-插入显示
if
(
bCurMenuIDX
!=
_MN_SHOW_ERRINFO
)
bDSTable
[
PicDrSafeBelt
]
|=
DS0_MASK
;
//显示完删除队列-N
if
((
bDSTableShowTime
[
PicDrSafeBelt
]
==
T1_5s
)
&&
((
bDSTable
[
PicDrSafeBelt
]
&
DS0_MASK
)
==
DS0_MASK
))
bDSTable
[
PicDrSafeBelt
]
=
0
;
}
/*else if (g_CanSwith.DriverBelt || g_CanSwith.PsngrBelt)
{
//非故障信息界面-插入显示
if (bCurMenuIDX != _MN_SHOW_ERRINFO)
bDSTable[PicDrSafeBelt] |= DS0_MASK;
if ((g_CanSwith.OldDriverBelt == 0) && (g_CanSwith.OldPsngrBelt == 0))
{
if (g_CanSwith.DriverBelt || g_CanSwith.PsngrBelt)
{
bDSTableShowTime[PicDrSafeBelt] = 0;
}
}
else if ((g_CanSwith.OldDriverBelt == 1) && (g_CanSwith.OldPsngrBelt == 0))
{
if (g_CanSwith.PsngrBelt)
{
bDSTableShowTime[PicDrSafeBelt] = 0;
}
}
else if ((g_CanSwith.OldDriverBelt == 0) && (g_CanSwith.OldPsngrBelt == 1))
{
if (g_CanSwith.DriverBelt)
{
bDSTableShowTime[PicDrSafeBelt] = 0;
}
}
else
{
;
}
g_CanSwith.OldDriverBelt = g_CanSwith.DriverBelt;
g_CanSwith.OldPsngrBelt = g_CanSwith.PsngrBelt;
//显示完删除队列-N
if ((bDSTableShowTime[PicDrSafeBelt] == T1_5s) && ((bDSTable[PicDrSafeBelt] & DS0_MASK) == DS0_MASK))
bDSTable[PicDrSafeBelt] = 0;
}*/
else
{
bDSTable
[
PicDrSafeBelt
]
=
0
;
bDSTableShowTime
[
PicDrSafeBelt
]
=
0
;
}
}
}
//09 充电状态——指示灯 不受软件控制
//19 发动机排气系统温度高——指示灯
...
...
@@ -85,8 +159,8 @@ void Gui_KL15LedDisplay(void)
LED_EXCSysHighTemp_OUT
=
LEDOFF
;
//off
}
//26 ESC关闭
if
(
1
)
//26 ESC关闭
(预留)
if
(
0
)
{
LED_ESCOFF_OUT
=
LEDON
;
//on
}
...
...
@@ -95,8 +169,8 @@ void Gui_KL15LedDisplay(void)
LED_ESCOFF_OUT
=
LEDOFF
;
//off
}
//23 ECO
if
(
1
)
//23 ECO
(预留)
if
(
0
)
{
LED_ECO_OUT
=
LEDON
;
//on
}
...
...
@@ -105,8 +179,8 @@ void Gui_KL15LedDisplay(void)
LED_ECO_OUT
=
LEDOFF
;
//off
}
//27 ESC故障
if
(
1
)
//27 ESC故障
(预留)
if
(
0
)
{
LED_ESC_OUT
=
LEDON
;
//on
}
...
...
@@ -167,13 +241,27 @@ void Gui_KL15LedDisplay(void)
}
//BD8379_D2 Svs灯 25 发动机保护灯
if
(
Test_Hyq
)
if
(
(
g_LED
.
CheckLightsTime
<
T_CheckTime
)
&&
(
g_revMeter
.
CurBoardVal
<
300
)
)
{
BD83790A
|=
BD8379_D2
;
//on
}
else
{
BD83790A
&=
~
BD8379_D2
;
//off
if
((
ConfigItem
.
SVSConfig
==
0x00u
)
||
(
ConfigItem
.
SVSConfig
==
0x01u
))
{
if
(
g_CanSwith
.
EngFailure1
==
0x01u
)
{
BD83790A
|=
BD8379_D2
;
//on
}
else
{
BD83790A
&=
~
BD8379_D2
;
//off
}
}
else
{
BD83790A
&=
~
BD8379_D2
;
//off
}
}
//BD8379_D3 20 驾驶员警告
...
...
@@ -206,7 +294,7 @@ void Gui_KL15LedDisplay(void)
}
//BD8379_D4 预留
if
(
Test_Hyq
)
if
(
0
)
{
BD83790A
|=
BD8379_D4
;
//on
}
...
...
@@ -347,13 +435,20 @@ void Gui_KL15LedDisplay(void)
}
}
//BD8379_D7 17 EPS故障
if
(
Test_Hyq
)
if
(
(
g_LED
.
CheckLightsTime
<
T_CheckTime
)
&&
(
g_revMeter
.
CurBoardVal
<
300
)
)
{
BD83790A
|=
BD8379_D7
;
//on
}
else
{
BD83790A
&=
~
BD8379_D7
;
//off
if
(
g_CanSwith
.
ESPoff
==
0x01u
)
{
BD83790A
|=
BD8379_D7
;
//on
}
else
{
BD83790A
&=
~
BD8379_D7
;
//off
}
}
//BD8379_D8 6 ABS故障
...
...
@@ -455,7 +550,7 @@ void Gui_KL15LedDisplay(void)
}
}
//BD8379_D10 预留3
if
(
Test_Hyq
)
if
(
0
)
{
BD83790A
|=
BD8379_D10
;
//on
}
...
...
@@ -464,7 +559,7 @@ void Gui_KL15LedDisplay(void)
BD83790A
&=
~
BD8379_D10
;
//off
}
//BD8379_D11 预留4
if
(
Test_Hyq
)
if
(
0
)
{
BD83790A
|=
BD8379_D11
;
//on
}
...
...
@@ -514,7 +609,7 @@ void Gui_KL15LedDisplay(void)
}
//BD8379_D1 7 燃油报警
if
(
Test_Hyq
)
if
(
0
)
{
BD83790B
|=
BD8379_D1
;
//on
}
...
...
@@ -553,7 +648,7 @@ void Gui_KL15LedDisplay(void)
}
}
//BD8379_D3 预留2
if
(
Test_Hyq
)
if
(
0
)
{
BD83790B
|=
BD8379_D3
;
//on
}
...
...
@@ -563,7 +658,7 @@ void Gui_KL15LedDisplay(void)
}
//BD8379_D4 13 车厢举升报警
if
(
Test_Hyq
)
if
(
g_LED
.
pConTainerTime
>=
T_0_5s
)
{
BD83790B
|=
BD8379_D4
;
//on
}
...
...
@@ -573,13 +668,20 @@ void Gui_KL15LedDisplay(void)
}
//BD8379_D5 22 DPF禁止再生
if
(
Test_Hyq
)
if
(
(
g_LED
.
CheckLightsTime
<
T_CheckTime
)
&&
(
g_revMeter
.
CurBoardVal
<
300
)
)
{
BD83790B
|=
BD8379_D5
;
//on
}
else
{
BD83790B
&=
~
BD8379_D5
;
//off
if
(
g_CanSwith
.
InhibiteDPF
==
0x01u
)
{
BD83790B
|=
BD8379_D5
;
//on
}
else
{
BD83790B
&=
~
BD8379_D5
;
//off
}
}
//BD8379_D6 11 发动机故障
...
...
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