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
51532c14
Commit
51532c14
authored
4 years ago
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整TFT驱动,屏幕刷新正常,图片正常切
parent
a781e138
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
144 additions
and
79 deletions
+144
-79
bsp_Motor.c
Sources/MOTOR/bsp_Motor.c
+8
-8
bsp_TFT.c
Sources/TFT/bsp_TFT.c
+2
-2
preprocess.c
Sources/USER/preprocess.c
+3
-1
TBDML.ini
TBDML.ini
+1
-1
api_CAN.c
api_Sources/api_CAN.c
+34
-21
api_RTC.c
api_Sources/api_RTC.c
+17
-18
gui_Led.c
gui_Sources/gui_Led.c
+79
-28
No files found.
Sources/MOTOR/bsp_Motor.c
View file @
51532c14
...
...
@@ -45,7 +45,7 @@ void bsp_Motor_init(void)
MCCC3_MCAM
=
Enable
;
//左对齐
MCCC3_CD
=
Disable
;
//禁止延时
/*
MCCC4_MCOM = Disable;
MCCC4_MCAM = Disable;
MCCC4_CD = Disable;
...
...
@@ -54,13 +54,13 @@ void bsp_Motor_init(void)
MCCC5_CD = Disable;
MCCC6_MCOM
=
Disable
;
//双全H桥模式
MCCC6_MCAM
=
Disable
;
//左对齐
MCCC6_CD
=
Disable
;
//禁止延时
MCCC7_MCOM
=
Disable
;
//全H桥模式
MCCC7_MCAM
=
Disable
;
//左对齐
MCCC7_CD
=
Disable
;
//禁止延时
MCCC6_MCOM = Disable;
MCCC6_MCAM = Disable;
MCCC6_CD = Disable;
MCCC7_MCOM = Disable;
MCCC7_MCAM = Disable;
MCCC7_CD = Disable;
*/
MCCTL1_MCTOIE
=
Enable
;
//使能中断
w1
=
&
MCDC0
;
//初始化MCOC 0-7
...
...
This diff is collapsed.
Click to expand it.
Sources/TFT/bsp_TFT.c
View file @
51532c14
...
...
@@ -76,7 +76,7 @@ void bsp_TFT_Init(void)
bsp_WriteData
(
0x26
);
bsp_WriteComm
(
0x21
);
//--
bsp_WriteData
(
0x0
1
);
//--MV = 0; MX=1; MY=1
bsp_WriteData
(
0x0
0
);
//--MV = 0; MX=1; MY=1
bsp_WriteData
(
0xa5
);
bsp_WriteData
(
0xa5
);
bsp_WriteData
(
0xa5
);
...
...
@@ -100,7 +100,7 @@ void bsp_TFT_Init(void)
bsp_WriteData
(
0xa5
);
bsp_WriteComm
(
0xA2
);
//-- Gate Set VGPP = Inside; ScanDir = Normal; scan mode = scan mode 1
bsp_WriteData
(
0x
0
0
);
//180ȷת
bsp_WriteData
(
0x
1
0
);
//180ȷת
bsp_WriteData
(
0xa5
);
bsp_WriteData
(
0xa5
);
bsp_WriteData
(
0xa5
);
...
...
This diff is collapsed.
Click to expand it.
Sources/USER/preprocess.c
View file @
51532c14
...
...
@@ -129,7 +129,9 @@ void T20MS_Task(void)
//DB8379_WriteData(ON);//Do Led off
}
else
Gui_KL15LedDisplay
();
//15电指示灯
{
Gui_KL15LedDisplay
();
//15电指示灯
}
}
...
...
This diff is collapsed.
Click to expand it.
TBDML.ini
View file @
51532c14
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
api_Sources/api_CAN.c
View file @
51532c14
...
...
@@ -27,7 +27,6 @@ void App_ReceiveCanMsg(void)
INT16U
Can_Power_L
;
INT16U
Can_Power
;
//--------- Meter Signal ---------//
//转速
if
(
g_canMsg61444
.
ProceF
==
MSG_FULL
)
{
...
...
@@ -46,6 +45,39 @@ void App_ReceiveCanMsg(void)
g_canMsg61444
.
ProceF
=
EMPOTY
;
}
//水温
if
(
g_canMsg65262
.
ProceF
==
MSG_FULL
)
{
//水温 Engine_colant_temperature
if
(
g_canMsg65262
.
Data
[
0
]
!=
255
)
{
g_tempMeter
.
CurBoardVal
=
g_canMsg65262
.
Data
[
0
];
if
(
g_tempMeter
.
CurBoardVal
>
40
)
{
g_tempMeter
.
CurBoardVal
=
g_tempMeter
.
CurBoardVal
-
40
;
}
else
{
g_tempMeter
.
CurBoardVal
=
0
;
}
}
//Engine Fuel Temperature 1 发动机燃料温度 1 8 8 1 -40
if
(
g_canMsg65262
.
Data
[
1
]
!=
255
)
{
;
}
//Engine Oil Temperature 1 发动机机油温度 2 16 16 0.03125 -273
if
(
0
)
{
;
}
g_canMsg65262
.
ProceF
=
EMPOTY
;
}
//天蓝液_00
if
(
g_canMsg65110_00
.
ProceF
==
MSG_FULL
)
{
...
...
@@ -66,25 +98,6 @@ void App_ReceiveCanMsg(void)
g_canMsg65110_3D
.
ProceF
=
EMPOTY
;
}
//水温
if
(
g_canMsg65262
.
ProceF
==
MSG_FULL
)
{
if
(
g_canMsg65262
.
Data
[
0
]
!=
255
)
{
g_tempMeter
.
CurBoardVal
=
g_canMsg65262
.
Data
[
0
];
if
(
g_tempMeter
.
CurBoardVal
>
40
)
{
g_tempMeter
.
CurBoardVal
=
g_tempMeter
.
CurBoardVal
-
40
;
}
else
{
g_tempMeter
.
CurBoardVal
=
0
;
}
}
g_canMsg65262
.
ProceF
=
EMPOTY
;
}
//--------- Led Signal ---------//
//机油压力
...
...
@@ -400,7 +413,7 @@ void App_ReceiveCanMsg(void)
g_canMsg65226ECM
.
ProceF
=
EMPOTY
;
}
//油耗
if
(
g_canMsg65266
.
ProceF
==
MSG_FULL
)
{
...
...
This diff is collapsed.
Click to expand it.
api_Sources/api_RTC.c
View file @
51532c14
...
...
@@ -165,18 +165,18 @@ void Api_ClockGenerate(void)
{
g_LED
.
pPosLampTime
=
null
;
}
//门开
if
(
LINE_IN_OPEN_DOORn
==
LOW
)
//门开
if
(
LINE_IN_OPEN_DOORn
==
LOW
)
{
if
(
g_LED
.
pDoorOpenTime
<
T_0_5s
)
if
(
g_LED
.
pDoorOpenTime
<
T_0_5s
)
{
g_LED
.
pDoorOpenTime
++
;
g_LED
.
pDoorOpenTime
++
;
}
}
else
{
g_LED
.
pDoorOpenTime
=
null
;
}
}
//远光灯
if
(
LINE_IN_HIGH_BEAM
==
HIGH
)
{
...
...
@@ -469,33 +469,32 @@ void Api_ClockGenerate(void)
}
//----------------- KL15硬线灯去抖 ------------------------------------------------//
/*
//EBD-pin5
if(pBrakeIn == LOW)
//手刹
if
(
LINE_IN_PARKING
==
LOW
)
{
if
(g_LED.pBrake
Time < T_0_5s)
if
(
g_LED
.
pPark
Time
<
T_0_5s
)
{
g_LED.p
BrakeTime
++;
g_LED
.
p
ParkTime
++
;
}
}
else
{
g_LED.p
Brake
Time = null;
g_LED
.
p
Park
Time
=
null
;
}
//手刹
if(pParkIn == LOW)
/*
//EBD-pin5
if(pBrakeIn == LOW)
{
if(g_LED.p
Park
Time < T_0_5s)
if(g_LED.p
Brake
Time < T_0_5s)
{
g_LED.p
Park
Time ++;
g_LED.p
Brake
Time ++;
}
}
else
{
g_LED.p
Park
Time = null;
g_LED.p
Brake
Time = null;
}
//ABS
if(pABSIn == LOW)
{
...
...
This diff is collapsed.
Click to expand it.
gui_Sources/gui_Led.c
View file @
51532c14
...
...
@@ -44,6 +44,7 @@ void Gui_AllLedOff(void)
* Return : None
* onther :
--------------------------------------------------------------------------*/
INT8U
Test_Hyq
;
void
Gui_KL15LedDisplay
(
void
)
{
//---------直驱指示灯------
...
...
@@ -108,9 +109,8 @@ void Gui_KL15LedDisplay(void)
}
//--------5912驱动指示灯
/*
//BD8379_D0 2 驻车制动
if (
0
)
if
(
(
LINE_IN_PARKING
==
0u
)
&&
(
g_LED
.
pParkTime
>=
T_0_3s
)
)
{
BD83790A
|=
BD8379_D0
;
//on
}
...
...
@@ -119,7 +119,7 @@ void Gui_KL15LedDisplay(void)
BD83790A
&=
~
BD8379_D0
;
//off
}
//BD8379_D1 油含水 15 油水分离
if (
0
)
if
(
Test_Hyq
)
{
BD83790A
|=
BD8379_D1
;
//on
}
...
...
@@ -128,7 +128,7 @@ void Gui_KL15LedDisplay(void)
BD83790A
&=
~
BD8379_D1
;
//off
}
//BD8379_D2 Svs灯 25 发动机保护灯
if (
0
)
if
(
Test_Hyq
)
{
BD83790A
|=
BD8379_D2
;
//on
}
...
...
@@ -137,7 +137,7 @@ void Gui_KL15LedDisplay(void)
BD83790A
&=
~
BD8379_D2
;
//off
}
//BD8379_D3 20 驾驶员警告
if (
0
)
if
(
Test_Hyq
)
{
BD83790A
|=
BD8379_D3
;
//on
}
...
...
@@ -146,7 +146,7 @@ void Gui_KL15LedDisplay(void)
BD83790A
&=
~
BD8379_D3
;
//off
}
//BD8379_D4 预留
if (
0
)
if
(
Test_Hyq
)
{
BD83790A
|=
BD8379_D4
;
//on
}
...
...
@@ -155,7 +155,7 @@ void Gui_KL15LedDisplay(void)
BD83790A
&=
~
BD8379_D4
;
//off
}
//BD8379_D5 水温报警灯 5 发动机水温高
if (
0
)
if
(
Test_Hyq
)
{
BD83790A
|=
BD8379_D5
;
//on
}
...
...
@@ -164,7 +164,7 @@ void Gui_KL15LedDisplay(void)
BD83790A
&=
~
BD8379_D5
;
//off
}
//BD8379_D6 24 巡航指示灯
if (
0
)
if
(
Test_Hyq
)
{
BD83790A
|=
BD8379_D6
;
//on
}
...
...
@@ -173,7 +173,7 @@ void Gui_KL15LedDisplay(void)
BD83790A
&=
~
BD8379_D6
;
//off
}
//BD8379_D7 17 EPS故障
if (
0
)
if
(
Test_Hyq
)
{
BD83790A
|=
BD8379_D7
;
//on
}
...
...
@@ -182,16 +182,68 @@ void Gui_KL15LedDisplay(void)
BD83790A
&=
~
BD8379_D7
;
//off
}
//BD8379_D8 6 ABS故障
if (
0
)
if
(
DIDFlag
.
Bits
.
DID1011Valid
==
Enable
)
{
BD83790A |= BD8379_D8; //on
if
(
IOCTL_DID1011
.
FF_Byte
==
1
)
{
BD83790A
|=
BD8379_D8
;
//on
}
else
{
BD83790A
&=
~
BD8379_D8
;
//off
}
}
else
{
BD83790A &= ~BD8379_D8; //off
if
((
g_LED
.
CheckLightsTime
<
T_CheckTime
)
&&
(
g_revMeter
.
CurBoardVal
<
300
))
{
if
((
ConfigItem
.
ABS_ESCConfig
==
0
)
||
(
ConfigItem
.
ABS_ESCConfig
==
1
))
{
BD83790A
|=
BD8379_D8
;
//on
}
}
else
{
if
(
ConfigItem
.
ABS_ESCConfig
==
0
)
{
//硬线(+..)
if
(
g_LED
.
ABSFaultTimes
>
T_0_1s
)
{
BD83790A
&=
~
BD8379_D8
;
//off
bDSTable
[
PicABS
]
=
0
;
DTC_ABSErrFlag
=
Disable
;
}
else
{
BD83790A
|=
BD8379_D8
;
//on
bDSTable
[
PicABS
]
|=
DS0_MASK
;
DTC_ABSErrFlag
=
Enable
;
}
}
else
if
(
ConfigItem
.
ABS_ESCConfig
==
1
)
{
//can
if
(
g_CanSwith
.
ABSLamp
)
{
BD83790A
|=
BD8379_D8
;
//on
bDSTable
[
PicABS
]
|=
DS0_MASK
;
DTC_ABSErrFlag
=
Enable
;
}
else
{
BD83790A
&=
~
BD8379_D8
;
//off
bDSTable
[
PicABS
]
=
0
;
DTC_ABSErrFlag
=
Disable
;
}
}
else
{
;
}
}
}
//BD8379_D9 制动器故障 4 制动气压不足/制动系统故障
if (
0
)
if
(
Test_Hyq
)
{
BD83790A
|=
BD8379_D9
;
//on
}
...
...
@@ -200,7 +252,7 @@ void Gui_KL15LedDisplay(void)
BD83790A
&=
~
BD8379_D9
;
//off
}
//BD8379_D10 预留3
if (
0
)
if
(
Test_Hyq
)
{
BD83790A
|=
BD8379_D10
;
//on
}
...
...
@@ -209,7 +261,7 @@ void Gui_KL15LedDisplay(void)
BD83790A
&=
~
BD8379_D10
;
//off
}
//BD8379_D11 预留4
if (
0
)
if
(
Test_Hyq
)
{
BD83790A
|=
BD8379_D11
;
//on
}
...
...
@@ -219,7 +271,7 @@ void Gui_KL15LedDisplay(void)
}
//BD8379_D0 OBD 10 发动机排放故障
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D0
;
//on
}
...
...
@@ -228,7 +280,7 @@ void Gui_KL15LedDisplay(void)
BD83790B
&=
~
BD8379_D0
;
//off
}
//BD8379_D1 7 燃油报警
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D1
;
//on
}
...
...
@@ -237,7 +289,7 @@ void Gui_KL15LedDisplay(void)
BD83790B
&=
~
BD8379_D1
;
//off
}
//BD8379_D2 预热指示灯 14 发动机预热
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D2
;
//on
}
...
...
@@ -246,7 +298,7 @@ void Gui_KL15LedDisplay(void)
BD83790B
&=
~
BD8379_D2
;
//off
}
//BD8379_D3 预留2
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D3
;
//on
}
...
...
@@ -255,7 +307,7 @@ void Gui_KL15LedDisplay(void)
BD83790B
&=
~
BD8379_D3
;
//off
}
//BD8379_D4 13 车厢举升报警
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D4
;
//on
}
...
...
@@ -264,7 +316,7 @@ void Gui_KL15LedDisplay(void)
BD83790B
&=
~
BD8379_D4
;
//off
}
//BD8379_D5 22 DPF禁止再生
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D5
;
//on
}
...
...
@@ -273,7 +325,7 @@ void Gui_KL15LedDisplay(void)
BD83790B
&=
~
BD8379_D5
;
//off
}
//BD8379_D6 11 发动机故障
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D6
;
//on
}
...
...
@@ -282,7 +334,7 @@ void Gui_KL15LedDisplay(void)
BD83790B
&=
~
BD8379_D6
;
//off
}
//BD8379_D7 机油报警 3 低油压报警
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D7
;
//on
}
...
...
@@ -291,7 +343,7 @@ void Gui_KL15LedDisplay(void)
BD83790B
&=
~
BD8379_D7
;
//off
}
//BD8379_D8 18 DPF再生(黄色)
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D8
;
//on
}
...
...
@@ -300,7 +352,7 @@ void Gui_KL15LedDisplay(void)
BD83790B
&=
~
BD8379_D8
;
//off
}
//BD8379_D9 21 DPF再生(红色)
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D9
;
//on
}
...
...
@@ -309,7 +361,7 @@ void Gui_KL15LedDisplay(void)
BD83790B
&=
~
BD8379_D9
;
//off
}
//BD8379_D10 12 制动蹄片磨损报警
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D10
;
//on
}
...
...
@@ -318,7 +370,7 @@ void Gui_KL15LedDisplay(void)
BD83790B
&=
~
BD8379_D10
;
//off
}
//BD8379_D11 门开 门开在30电上
if (
0
)
if
(
Test_Hyq
)
{
BD83790B
|=
BD8379_D11
;
//on
}
...
...
@@ -326,7 +378,6 @@ void Gui_KL15LedDisplay(void)
{
BD83790B
&=
~
BD8379_D11
;
//off
}
*/
}
/*-------------------------------------------------------------------------
* Function Name : Gui_KL30LedDisplay
...
...
This diff is collapsed.
Click to expand it.
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