Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
4283ec07
Commit
4283ec07
authored
May 11, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加显示
parent
495ea51f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2391 additions
and
2843 deletions
+2391
-2843
TianYing200.BAT
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
+0
-3
FaultCode.h
Firmware/Source/Application/FaultCode/FaultCode.h
+2
-1
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+18
-111
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+2341
-2675
SEG_DISPLAY.h
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
+30
-53
No files found.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
View file @
4283ec07
SET PATH=C:\Keil_v5\ARM\ARMCC\Bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\tyw05\AppData\Local\Microsoft\WindowsApps;
SET ARMCC5_ASMOPT=--diag_suppress=9931
SET ARMCC5_CCOPT=--diag_suppress=9931
SET ARMCC5_LINKOPT=--diag_suppress=9931
SET CPU_TYPE=BAT32G139GK64FB
SET CPU_VENDOR=Cmsemicon
SET UV2_TARGET=TianYing200
...
...
Firmware/Source/Application/FaultCode/FaultCode.h
View file @
4283ec07
...
...
@@ -3,7 +3,8 @@
#include "Application.h"
#include "common.h"
extern
uint32_t
FaultCode_Data
[
254
]
;
extern
uint8_t
FaultCode_Number
;
uint8_t
FaultCode_Compare
(
uint32_t
FaultCode
,
uint32_t
*
CodeList
,
uint8_t
len
);
void
ECU_FaultCode_Processing_Service
(
void
);
#endif
\ No newline at end of file
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
4283ec07
#include "GUI_Display\GUI_Display.h"
#include "SEG_DISPLAY\SEG_DISPLAY.h"
#include "Application.h"
void
Gauge_VSpeed_Display
(
void
)
{
uint16_t
VSpeedDisplayValue
=
0
;
if
(
Common_Get_IG_Sts
(
)
==
COMMON_POWER_ON
)
{
if
(
Get_VechileSpeedValid
(
)
==
1u
)
{
VSpeedDisplayValue
=
Get_DispVechileSpeed
(
)
/
10u
;
SEG_SET_VSpeed_NUM
(
1u
,
VSpeedDisplayValue
);
}
else
{
VSpeedDisplayValue
=
0u
;
SEG_SET_VSpeed_NUM
(
1u
,
VSpeedDisplayValue
);
}
}
else
{
VSpeedDisplayValue
=
0u
;
SEG_SET_VSpeed_NUM
(
0u
,
0u
);
}
}
void
Gauge_Clock_Display
(
void
)
{
uint8_t
PageType_DIS
=
0
;
...
...
@@ -31,7 +9,7 @@ void Gauge_Clock_Display(void)
{
PageType_DIS
=
Get_Current_PageType
();
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_06_Screen_Time, 100
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_07_Screen_Time
,
LED_ON
);
if
(
PageType_DIS
==
1
)
{
...
...
@@ -64,67 +42,14 @@ void Gauge_Clock_Display(void)
else
{
SEG_SET_Clock
(
0
,
0
,
0
,
0
,
0
);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_06_Screen_Time, 0
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_07_Screen_Time
,
LED_OFF
);
}
}
void
Gauge_Trip_Display
(
void
)
{
if
(
Common_Get_IG_Sts
(
)
==
COMMON_POWER_ON
)
{
SEG_SET_TRIP_NUM
(
1u
,
Get_Trip_Value
());
}
else
{
SEG_SET_TRIP_NUM
(
0u
,
0u
);
}
}
void
Gauge_ODO_Display
(
void
)
{
if
(
Common_Get_IG_Sts
(
)
==
COMMON_POWER_ON
)
{
SEG_SET_ODO_NUM
(
1u
,
Get_ODO_Value
()
/
10u
);
}
else
{
SEG_SET_ODO_NUM
(
0u
,
0u
);
}
}
void
Gauge_FuelDial_Display
(
void
)
{
if
(
Common_Get_IG_Sts
(
)
==
COMMON_POWER_ON
)
{
SEG_SET_FuelDial
(
1
,
Get_CurFuelSetp
());
}
else
{
SEG_SET_FuelDial
(
0
,
0
);
}
}
void
Gauge_EspeedDial_Display
(
void
)
{
if
(
Common_Get_IG_Sts
(
)
==
COMMON_POWER_ON
)
{
SEG_SET_EspeedDial
(
1
,
Get_DispEngineSpeed
()
/
1000
,
Get_DispEngineSpeed
());
}
else
{
SEG_SET_EspeedDial
(
0
,
0
,
0
);
}
}
void
Gauge_Frame_Display
(
void
)
{
if
(
Common_Get_IG_Sts
(
)
==
COMMON_POWER_ON
)
{
SEG_SET_Frame
(
1
);
}
else
{
SEG_SET_Frame
(
0
);
}
}
void
Clear_Bu98
(
void
)
...
...
@@ -141,7 +66,6 @@ void Clear_Bu98(void)
void
Gauge_Service
(
void
)
{
static
uint16_t
VSpeed_Count
=
0u
;
Gauge_Frame_Display
();
if
(
ClearODO_Flag
==
1
)
{
if
(
Common_Get_IG_Sts
(
)
==
COMMON_POWER_ON
)
...
...
@@ -151,16 +75,6 @@ void Gauge_Service(void)
else
{
Clear_Bu98
();
//RTE_GPIO_Set_Level(VSPEED_TEN_OUT, 0);
//RTE_GPIO_Set_Level(VSPEED_HUNDREDS_OUT, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_Normal_Voltage, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_03_High_Low_Voltage, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_Fuel_W, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Fuel_Y, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_06_Screen_Time, 0);
}
}
else
...
...
@@ -176,14 +90,16 @@ void Gauge_Service(void)
else
{
VSpeed_Count
=
0
;
Gauge_VSpeed_Display
(
);
SEG_SET_VSpeed_NUM
(
1u
,
Get_DispVechileSpeed
(
)
/
10u
,
Get_Dis_KM_Unit
()
);
}
Gauge_ODO_Display
(
);
SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS
(
Get_Dis_KM_Unit
(),
Get_ODO_Value
()
/
10u
,
Get_Trip_Value
()
);
Gauge_Clock_Display
();
Gauge_Trip_Display
();
Gauge_FuelDial_Display
();
Gauge_EspeedDial_Display
();
SEG_SET_FuelDial
(
1
,
Get_CurFuelSetp
());
SEG_SET_EspeedDial
(
1
,
Get_DispEngineSpeed
()
/
500
);
SEG_SET_CoolantDial
(
1
,
GET_DataCoolantTempSegDisp
(),
GET_DataCoolantTempValueDisp
(),
GET_DataCollantTempSegValid
());
SEG_SET_Voltage_NUM
(
1
,
Get_Battery_Voltage
());
SEG_SET_TPMS_NUM
(
1
,
Get_Front_TPMS_Sig_Value
(),
Get_Rear_TPMS_Sig_Value
(),
Get_Dis_Tpms_Unit
(),
Get_Front_TPMS_Sig_Vaild
(),
Get_Rear_TPMS_Sig_Vaild
());
}
else
{
...
...
@@ -193,16 +109,7 @@ void Gauge_Service(void)
else
{
Clear_Bu98
();
//RTE_GPIO_Set_Level(VSPEED_TEN_OUT, 0);
//RTE_GPIO_Set_Level(VSPEED_HUNDREDS_OUT, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_Normal_Voltage, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_03_High_Low_Voltage, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_Fuel_W, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Fuel_Y, 0);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_06_Screen_Time, 0);
}
}
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
4283ec07
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
View file @
4283ec07
...
...
@@ -7,57 +7,40 @@
typedef
enum
{
SEG_LED_Voltage
=
0u
,
SEG_LED_Auto_Start_Stop
,
SEG_LED_Fuel
,
SEG_LED_MAX
em_SEG_High_Beam
,
em_SEG_FAULT_ELECTROSPRAY
,
em_SEG_ABS
,
em_SEG_Oil_Pressure
,
em_SEG_Bluetooth
,
em_SEG_TCS
,
em_SEG_Auto_Start_Stop
,
em_SEG_Keys
,
em_SEG_Upkeep
,
em_SEG_Low_Batt_Vol
,
em_SEG_Lateral_Strut
,
em_SEG_Tire_Pressure_Alarm
,
em_SEG_Turn_Left
,
em_SEG_Turn_Right
,
em_SEG_Coolant
,
em_SEG_Fuel
,
SEG_LED_MAX
,
}
SEG_LED_Idx_t
;
enum
{
Gear_P
=
0
,
//P
Gear_R
,
//R
Gear_N
,
//N
Gear_D
,
//D
};
/**@brief 边框线显示函数*/
_Fun_Res
SEG_SET_Frame
(
uint8_t
m_Flag
);
/**@brief 挡位显示函数*/
_Fun_Res
SEG_SET_GEAR
(
uint8_t
m_Gear_Flag
,
uint8_t
m_Gear
);
/**@brief 电量表盘显示函数*/
_Fun_Res
SEG_SET_EleDial
(
uint8_t
m_Flag
,
uint8_t
m_SEG
,
uint8_t
m_NUM
);
/**@brief 燃油表盘显示函数*/
_Fun_Res
SEG_SET_FuelDial
(
uint8_t
m_Flag
,
uint8_t
m_SEG
);
/**@brief 转速表盘显示函数*/
_Fun_Res
SEG_SET_EspeedDial
(
uint8_t
m_Flag
,
uint8_t
m_SEG
,
uint16_t
m_NUM
);
/**@brief 功率表盘显示函数*/
_Fun_Res
SEG_SET_PowerDial
(
uint8_t
m_Flag
,
uint8_t
m_SEG
,
uint8_t
m_Sign
,
uint8_t
m_NUM
);
/**@brief 续航里程显示函数*/
_Fun_Res
SEG_SET_DTE_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM
);
/**@brief 车速8字段显示函数*/
_Fun_Res
SEG_SET_VSpeed_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM
);
/**@brief L8字段显示函数*/
_Fun_Res
SEG_SET_L8_NUM
(
uint8_t
m_Flag
,
uint8_t
m_NUM
);
/**@brief 总计里程显示函数*/
_Fun_Res
SEG_SET_ODO_NUM
(
uint8_t
m_Flag
,
uint32_t
m_NUM
);
/**@brief 小计里程显示函数*/
_Fun_Res
SEG_SET_TRIP_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM
);
/**@brief 时间显示函数*/
_Fun_Res
SEG_SET_Clock
(
uint8_t
m_hour
,
uint8_t
m_minute
,
uint8_t
m_icon
,
uint8_t
m_Flag1
,
uint8_t
m_Flag2
);
void
SEG_SET_DTC_NUM
(
uint16_t
num
);
void
SEG_SET_LED_STS
(
uint8_t
LED_NUM
,
uint8_t
m_Flag
);
void
SEG_SET_FuelDial
(
uint8_t
m_Flag
,
uint8_t
m_SEG
);
void
SEG_SET_EspeedDial
(
uint8_t
m_Flag
,
uint8_t
m_SEG
);
void
SEG_SET_CoolantDial
(
uint8_t
m_Flag
,
uint8_t
m_SEG
,
uint16_t
m_Num
,
uint8_t
m_flash
);
void
SEG_SET_VSpeed_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM
,
uint8_t
m_Unit
);
void
SEG_SET_Voltage_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM
);
void
SEG_SET_TPMS_NUM
(
uint8_t
m_Flag
,
uint16_t
m_NUM1
,
uint16_t
m_NUM2
,
uint8_t
m_Unit
,
uint8_t
m_valid1
,
uint8_t
m_valid2
);
void
SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS
(
uint8_t
m_Uint
,
uint32_t
m_NUM_ODO
,
uint32_t
m_NUM_TRIP
);
void
SEG_SET_Clock
(
uint8_t
m_hour
,
uint8_t
m_minute
,
uint8_t
m_icon
,
uint8_t
m_Flag1
,
uint8_t
m_Flag2
);
void
Check_SEG_Display
(
void
);
...
...
@@ -69,14 +52,8 @@ extern uint8_t Espeed_check_SEG_step;
#define IC_SEG_ON 0x07u
#define IC_SEG_GREY 0x01u
/**@brief 指示灯显示函数*/
_Fun_Res
SEG_SET_LED_STS
(
uint8_t
LED_NUM
,
uint8_t
m_Flag
);
//扫盘用
_Fun_Res
SEG_Scan_SET_EleDial
(
uint8_t
m_SEG
);
_Fun_Res
SEG_Scan_SET_PowerDial
(
uint8_t
m_SEG
);
void
SEG_Scan_SET_Fuel
Dial
(
void
);
void
SEG_Scan_SET_Fuel
_Coolant_Dial
(
uint8_t
coolant
);
void
SEG_Scan_SET_EspeedDial
(
void
);
extern
void
Checkself_Init
(
void
);
...
...
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