Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
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
时昊
haoJin750TFT
Commits
d2dfa673
Commit
d2dfa673
authored
Aug 20, 2024
by
王雅楠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangyanan' into 'dev'
Wangyanan See merge request
!53
parents
e5b12ed6
395f6416
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
183 additions
and
94 deletions
+183
-94
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+132
-71
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+51
-23
No files found.
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
d2dfa673
...
...
@@ -2765,16 +2765,6 @@ static const uint16_t PICList_ESpeed_NIGHT[] = {
Pic_0716_782_125
,
};
static
const
uint16_t
PICList_Fuel
[]
=
{
Pic_0554_315_473
,
Pic_0555_366_473
,
Pic_0556_426_473
,
Pic_0557_469_473
,
Pic_0558_514_473
,
Pic_0559_550_473
,
Pic_0560_586_473
,
Pic_0561_623_473
,
};
static
const
uint16_t
PICList_Fuel_RED
[]
=
{
Pic_0562_315_473
,
Pic_0555_366_473
,
Pic_0556_426_473
,
...
...
@@ -2784,6 +2774,16 @@ static const uint16_t PICList_Fuel_RED[] = {
Pic_0560_586_473
,
Pic_0561_623_473
,
};
// static const uint16_t PICList_Fuel_RED[] = {
// Pic_0562_315_473,
// Pic_0555_366_473,
// Pic_0556_426_473,
// Pic_0557_469_473,
// Pic_0558_514_473,
// Pic_0559_550_473,
// Pic_0560_586_473,
// Pic_0561_623_473,
// };
static
const
uint16_t
PICList_Fuel_SelfCheck
[]
=
{
Pic_0554_315_473
,
Pic_0555_366_473
,
...
...
@@ -2845,7 +2845,14 @@ static void AMT630H_GUI_Light()
}
if
(
Get_TelltalesLedSts
(
em_LED_Coolant_Temperature
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0741_616_20
);
if
(
FLASH_SYNC_1Hz
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0741_616_20
);
/*水温灯报警闪烁1HZ*/
}
else
{
;
}
}
if
(
Get_TelltalesLedSts
(
em_LED_WIFI
))
{
...
...
@@ -2953,23 +2960,31 @@ static void AMT630H_GUI_TIME(uint16_t Hour, uint16_t Minute)
// }
/*燃油显示函数*/
uint8_t
g_u16_GUI_PerFuelLevel
=
0
;
uint8_t
g_u16_GUI_PerFuelLevel
=
1
;
static
void
AMT630H_GUI_Fuel
(
uint8_t
Fuel
)
{
/*外部传参燃油处于数组第几格*/
/*R>83且处于非开路状态时 黄色燃油灯闪烁*/
/*R开路状态时 黄色燃油灯闪烁*/
/*以上两种情况黄色燃油灯闪烁的频率不同*/
static
uint8_t
s_FuelLowTime
=
0U
;
uint8_t
FuelLevel
;
FuelLevel
=
Fuel
;
static
uint8_t
s_FuelLowTime
=
0U
;
if
(
Fuel
==
0
)
{
FuelLevel
=
1
;
}
else
{
;
}
if
(
g_u8Display_Mode
==
ModeDAY
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0553_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0550_715_533
);
/*F*/
/*
燃油桶
闪烁*/
if
(
Fuel
Level
==
0
)
/*
开路状态黄色燃油灯 1HZ
闪烁*/
if
(
Fuel
==
0
)
{
if
(
FLASH_SYNC_1Hz
)
{
...
...
@@ -2977,7 +2992,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
}
s_FuelLowTime
=
0
;
}
else
if
(
Fuel
Level
==
1
)
else
if
(
Fuel
==
1
)
{
s_FuelLowTime
++
;
if
(
s_FuelLowTime
<=
15
)
...
...
@@ -3000,7 +3015,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0662_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0660_715_533
);
/*F*/
if
(
Fuel
Level
==
0
)
if
(
Fuel
==
0
)
{
if
(
FLASH_SYNC_1Hz
)
{
...
...
@@ -3008,7 +3023,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
}
s_FuelLowTime
=
0
;
}
else
if
(
Fuel
Level
==
1
)
else
if
(
Fuel
==
1
)
{
s_FuelLowTime
++
;
if
(
s_FuelLowTime
<=
15
)
...
...
@@ -3027,13 +3042,12 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
}
}
/*燃油格数走格*/
if
(
FuelLevel
>
0
)
{
if
(
FuelLevel
!=
g_u16_GUI_PerFuelLevel
)
{
for
(
uint8_t
i
=
0
;
i
<
=
g_u16_GUI_PerFuelLevel
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel
[
i
]);
}
...
...
@@ -3051,27 +3065,60 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
;
}
}
else
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
{
g_u16_GUI_PerFuelLevel
=
FuelLevel
;
for
(
uint8_t
i
=
0
;
i
<
=
g_u16_GUI_PerFuelLevel
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel
[
i
]);
}
}
}
else
{
;
}
}
uint16_t
g_u16PerFuel_SelfCheck
=
0
;
/*燃油自检函数*/
static
void
AMT630H_GUI_Fuel_SelfCheck
(
uint8_t
Fuel
)
{
uint8_t
FuelLevel
;
FuelLevel
=
Fuel
;
if
(
Fuel
==
1
)
{
FuelLevel
=
2
;
}
else
{
;
}
if
(
g_u8Display_Mode
==
ModeDAY
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0553_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0550_715_533
);
/*F*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0551_503_529
);
/*黑色燃油灯*/
}
else
if
(
g_u8Display_Mode
==
ModeNIGHT
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0662_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0660_715_533
);
/*F*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0661_503_529
);
/*白色燃油灯*/
}
/*开机自检燃油走格*/
if
(
FuelLevel
>
0
)
{
if
(
FuelLevel
!=
g_u16_GUI_PerFuelLevel
)
{
for
(
uint8_t
i
=
0
;
i
<
=
g_u16_GUI_PerFuelLevel
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_RED
[
i
]);
}
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_SelfCheck
[
i
]);
}
if
(
FuelLevel
>
g_u16_GUI_PerFuelLevel
)
{
g_u16_GUI_PerFuelLevel
++
;
...
...
@@ -3084,60 +3131,74 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
{
;
}
}
else
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
if
(
FuelLevel
==
g_u16_GUI_PerFuelLevel
)
{
g_u16_GUI_PerFuelLevel
=
FuelLevel
;
for
(
uint8_t
i
=
0
;
i
<
=
g_u16_GUI_PerFuelLevel
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_RED
[
i
]);
}
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_SelfCheck
[
i
]);
}
}
}
}
/*燃油自检函数*/
static
void
AMT630H_GUI_Fuel_SelfCheck
(
uint8_t
Fuel
)
{
uint8_t
FuelLevel
;
FuelLevel
=
Fuel
;
if
(
g_u8Display_Mode
==
ModeDAY
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0553_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0550_715_533
);
/*F*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0551_503_529
);
/*黑色燃油灯*/
}
else
if
(
g_u8Display_Mode
==
ModeNIGHT
)
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0662_315_473
);
/*燃油格*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0549_299_533
);
/*E*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0660_715_533
);
/*F*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0661_503_529
);
/*白色燃油灯*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0562_315_473
);
/*燃油红区*/
}
/*燃油格数走格*/
if
(
FuelLevel
>
g_u16_GUI_PerFuelLevel
)
{
g_u16_GUI_PerFuelLevel
++
;
}
else
if
((
FuelLevel
<
g_u16_GUI_PerFuelLevel
)
&&
(
g_u16_GUI_PerFuelLevel
!=
0
))
{
g_u16_GUI_PerFuelLevel
--
;
}
else
{
;
}
for
(
uint8_t
i
=
0
;
i
<
g_u16_GUI_PerFuelLevel
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
PICList_Fuel_SelfCheck
[
i
]);
}
// if (FuelLevel != g_u16PerFuel_SelfCheck)
// {
// if(g_u16PerFuel_SelfCheck == 0)
// {
// SetPagePic(GRAPHICS_PAGE_0, Pic_0562_315_473);
// }
// else
// {
// for (uint8_t i = 0; i < g_u16PerFuel_SelfCheck; i++)
// {
// SetPagePic(GRAPHICS_PAGE_0, PICList_Fuel_SelfCheck[i]);
// }
// if (FuelLevel > g_u16PerFuel_SelfCheck)
// {
// g_u16PerFuel_SelfCheck++;
// }
// else
// {
// ;
// }
// }
// }
// else
// {
// for (uint8_t i = 0; i < g_u16_GUI_PerFuelLevel; i++)
// {
// SetPagePic(GRAPHICS_PAGE_0, PICList_Fuel_SelfCheck[i]);
// }
// }
// /*燃油格数走格*/
// if (FuelLevel > g_u16_GUI_PerFuelLevel)
// {
// g_u16_GUI_PerFuelLevel++;
// }
// else if ((FuelLevel < g_u16_GUI_PerFuelLevel) && (g_u16_GUI_PerFuelLevel != 0))
// {
// g_u16_GUI_PerFuelLevel--;
// }
// else
// {
// ;
// }
// for (uint8_t i = 0; i < g_u16_GUI_PerFuelLevel; i++)
// {
// SetPagePic(GRAPHICS_PAGE_0, PICList_Fuel_SelfCheck[i]);
// }
}
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
d2dfa673
...
...
@@ -5,6 +5,10 @@
#include "Line_In\Line_In_user.h"
#include "Components.h"
uint8_t
ECU_Engine_Temperature_flag
=
0
;
static
Tellib_uint16_t
LED_Turn_Left_Judgement
(
void
);
static
void
LED_Turn_Left_Execution
(
Tellib_uint16_t
led_status
);
static
Tellib_uint16_t
LED_Turn_Right_Judgement
(
void
);
...
...
@@ -228,7 +232,7 @@ static Tellib_uint16_t LED_TCS_Judgement(void)
}
else
{
if
(
Get_CAN_CH0_ID_37B_Sig_TCS_Work_Mode
==
0x0
)
if
(
Get_CAN_CH0_ID_37B_Sig_TCS_Work_Mode
()
==
0x0
)
{
if
(
Get_CAN_CH0_ID_37B_Sig_TCS_Warning_Lamp
()
==
0x1
)
{
...
...
@@ -243,24 +247,13 @@ static Tellib_uint16_t LED_TCS_Judgement(void)
LED_STATE
=
0u
;
}
}
else
if
(
Get_CAN_CH0_ID_37B_Sig_TCS_Work_Mode
==
0x0
)
else
if
(
Get_CAN_CH0_ID_37B_Sig_TCS_Work_Mode
()
==
0x1u
)
{
if
(
Get_CAN_CH0_ID_37B_Sig_TCS_Warning_Lamp
()
==
0x1
)
{
LED_STATE
=
2u
;
/*TCS/亮*/
}
else
if
(
Get_CAN_CH0_ID_37B_Sig_TCS_Warning_Lamp
()
==
0x0
)
{
LED_STATE
=
0u
;
}
else
{
LED_STATE
=
0u
;
}
LED_STATE
=
2u
;
/*TCS/亮*/
}
else
{
;
LED_STATE
=
0u
;
}
}
return
LED_STATE
;
...
...
@@ -342,34 +335,69 @@ static void LED_Fuel_Level_Low_Execution(Tellib_uint16_t led_status)
{
}
// uint16_t ECU_Engine_Temperature_R =0;
// uint32_t test_ECU_Engine_Temperature =0;
/*信号来源:ECU_101 +硬线-P11 阻值 CAN>硬线*/
static
Tellib_uint16_t
LED_Coolant_Temperature_Judgement
(
void
)
{
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CH0_101_Msg_Count
)
==
CAN_SIG_LOST
)
{
LED_STATE
=
0u
;
if
(
Line_In_Get_Status
(
LINE_IN_Coolant_Temperature
)
)
// ECU_Engine_Temperature_R = ADC_Read_Signal(ADC_CH_COOLANT_TEMP1_R)
;
if
(
ADC_Read_Signal
(
ADC_CH_COOLANT_TEMP1_R
)
<=
20
)
{
ECU_Engine_Temperature_flag
=
1
;
LED_STATE
=
1u
;
}
else
else
if
(
ADC_Read_Signal
(
ADC_CH_COOLANT_TEMP1_R
)
>=
23
)
{
ECU_Engine_Temperature_flag
=
0
;
LED_STATE
=
0u
;
}
else
{
if
(
ECU_Engine_Temperature_flag
==
1
)
{
LED_STATE
=
1u
;
}
else
if
(
ECU_Engine_Temperature_flag
==
0
)
{
LED_STATE
=
0u
;
}
else
{
LED_STATE
=
0u
;
}
}
}
else
{
if
(
Get_CAN_CH0_ID_101_Sig_ECU_Engine_Temperature_State
()
==
0x01UL
)
// test_ECU_Engine_Temperature = Get_CAN_CH0_ID_101_Sig_ECU_Engine_Temperature();
if
(
Get_CAN_CH0_ID_101_Sig_ECU_Engine_Temperature
()
>=
120
)
{
LED_STATE
=
1u
;
ECU_Engine_Temperature_flag
=
1
;
LED_STATE
=
1u
;
}
else
else
if
(
Get_CAN_CH0_ID_101_Sig_ECU_Engine_Temperature
()
<=
118
)
{
ECU_Engine_Temperature_flag
=
0
;
LED_STATE
=
0u
;
}
else
{
if
(
ECU_Engine_Temperature_flag
==
1
)
{
LED_STATE
=
1u
;
}
else
if
(
ECU_Engine_Temperature_flag
==
0
)
{
LED_STATE
=
0u
;
}
else
{
LED_STATE
=
0u
;
}
}
}
return
LED_STATE
;
}
...
...
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