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
89e57de4
Commit
89e57de4
authored
Oct 10, 2024
by
张金硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:新增佳伟的水温部分逻辑和水温表走格贴图
parent
b0870e31
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
538 additions
and
165 deletions
+538
-165
HaoJin750TFT.uvprojx
.../Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
+10
-0
Data_Coolant.c
Firmware/Source/Application/Data_Coolant.c
+382
-146
Data_Coolant.h
Firmware/Source/Application/Data_Coolant.h
+59
-15
Hysteresis.h
Firmware/Source/Application/Hysteresis.h
+71
-0
Hysteresis_V10_239.lib
Firmware/Source/Application/Hysteresis_V10_239.lib
+0
-0
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+11
-2
Components.h
Firmware/Source/Component/Components.h
+1
-0
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+3
-0
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+1
-2
No files found.
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
View file @
89e57de4
...
...
@@ -738,6 +738,16 @@
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\BlueTooth.h
</FilePath>
</File>
<File>
<FileName>
Hysteresis.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\Hysteresis.h
</FilePath>
</File>
<File>
<FileName>
Hysteresis_V10_239.lib
</FileName>
<FileType>
4
</FileType>
<FilePath>
..\..\..\..\Source\Application\Hysteresis_V10_239.lib
</FilePath>
</File>
</Files>
</Group>
<Group>
...
...
Firmware/Source/Application/Data_Coolant.c
View file @
89e57de4
This diff is collapsed.
Click to expand it.
Firmware/Source/Application/Data_Coolant.h
View file @
89e57de4
#ifndef DATA_COOLANT_H
#define DATA_COOLANT_H
#include "stdint.h"
typedef
enum
{
CoolantSensorNormal
=
0
,
CoolantSensorShortCircuit
,
CoolantSensorOpenCircuit
,
}
CoolantSensorSts_t
;
extern
void
Coolant_KL15_Init
(
void
);
extern
void
Coolant_KL30_Init
(
void
);
extern
void
Coolant_Cal_Sevice
(
uint8_t
deltaTime
);
extern
uint8_t
Get_CurCoolantSetp
(
void
);
extern
CoolantSensorSts_t
Get_Coolant_Sensor_State
(
void
);
void
Coolant_R_Cal
(
uint8_t
deltaTime
);
#include "Components.h"
#define Coolant_LEN 17
typedef
unsigned
int
INT16U
;
/*** 控制结构 ***/
typedef
struct
{
uint8_t
u8_DestSeg
;
uint8_t
u8_CurSeg
;
}
DataCoolantTempDisStruct
;
extern
DataCoolantTempDisStruct
DataCoolantTemp_Dis
;
typedef
struct
{
uint16_t
Temp_Value
;
uint8_t
Symbol
;
uint16_t
u16Can_Actual
;
uint8_t
u8Can_Valid
;
uint16_t
u16Res_Actual
;
uint16_t
u16Res_ADValue
;
uint8_t
u8Res_Valid
;
uint8_t
u8Res_ADValid
;
uint8_t
u8Res_Flashtimer
;
uint8_t
TEMPSetp
;
uint8_t
TEMPMode
;
uint16_t
TEMP_Fastime
;
}
DataCoolantTempStruct
;
//水温数据结构
typedef
struct
{
uint32_t
Buffer
[
5
];
uint8_t
Cnt
;
uint8_t
time
;
uint16_t
ResOpen_ActTimer
;
uint16_t
ResOpen_InActTimer
;
}
DataCoolantTempSamplerStruct
;
void
Common_SelfCheckTime_Init
(
void
);
void
Common_SelfCheckTime
(
void
);
void
Data_Coolant_Temp_Processing_Service
(
void
);
uint16_t
Get_Coolant_Res_To_Temp
(
uint16_t
Temp_Res
);
void
Get_Coolant_Temp_Seg
(
uint16_t
Temp_Value
);
void
Data_Coolant_Temp_Display
(
void
);
extern
uint16_t
GET_DataCollantTempSegValid
(
void
);
extern
void
TEMP_KL30_Init
(
void
);
extern
void
TEMP_KL15_Init
(
void
);
extern
uint8_t
GET_DataCoolantTempSegDisp
(
void
);
void
TEMP_Gauges_Cal
(
void
);
uint16_t
Get_Res_To_Temp
(
uint16_t
*
ResBoard
,
uint16_t
*
TempBoard
,
uint8_t
Len
,
uint16_t
input
);
extern
DataCoolantTempStruct
DataCoolantTemp
;
#endif
Firmware/Source/Application/Hysteresis.h
0 → 100644
View file @
89e57de4
#ifndef HYSTERESIS_H__
#define HYSTERESIS_H__
// #define HYS_PLATFORM_16BIT
#ifdef HYS_PLATFORM_16BIT
typedef
unsigned
char
Hys_uint8_t
;
typedef
unsigned
int
Hys_uint16_t
;
typedef
unsigned
long
Hys_uint32_t
;
#else
typedef
unsigned
char
Hys_uint8_t
;
typedef
unsigned
short
Hys_uint16_t
;
typedef
unsigned
int
Hys_uint32_t
;
typedef
unsigned
long
long
Hys_uint64_t
;
#endif
/*所有需要处理的物理量枚举*/
typedef
enum
{
HYS_TEMP
=
0U
,
/*水温*/
HYS_PWM
,
/*..*/
HYS_NUM_MAX
,
}
HYS_Num_en_t
;
/***************************Do not modify the following*********************************/
/***************************Do not modify the following*********************************/
/***************************Do not modify the following*********************************/
/*当前文件版本号*/
#define HYS_VERSION_NUM 0X10U
#define HYS_RAM_DATA_LEN (HYS_NUM_MAX * 2U)
/*操作函数返回状态*/
typedef
enum
{
HYS_OPERATE_SUCCESS
=
0UL
,
/*函数操作成功*/
HYS_OPERATE_FAIL
,
/*函数操作失败*/
}
HYS_Operate_Type_en_t
;
typedef
struct
{
/*该段的下限值*/
Hys_uint16_t
u16HYSSegLow
;
/*该段的上限值*/
Hys_uint16_t
u16HYSSegHigh
;
}
HYS_Seg_Table_st_t
;
typedef
struct
{
/*参数分段属性表*/
const
HYS_Seg_Table_st_t
*
pstHYSSegTable
;
/*默认填0U即可*/
Hys_uint16_t
u16HYSReserved
;
/*分段属性表长度*/
Hys_uint8_t
u8HYSSegTableLen
;
/*1U:正序 0U:降序*/
Hys_uint8_t
u8HYSSortBy
;
}
HYS_Attribute_st_t
;
typedef
struct
{
/*物理量数量,也就是 HYS_NUM_MAX */
Hys_uint8_t
u8HYSNum
;
}
HYS_Init_st_t
;
/************************************************************************/
/*30初始化,所有状态重新开始计算*/
void
HYS_KL30_Init
(
Hys_uint8_t
*
pu8HYSRamData
,
const
HYS_Attribute_st_t
*
pstHYSAttribute
,
HYS_Init_st_t
*
pstHYSInit
);
/*唤醒初始化,会保持休眠唤醒前的状态*/
void
HYS_Wakeup_Init
(
Hys_uint8_t
*
pu8HYSRamData
,
const
HYS_Attribute_st_t
*
pstHYSAttribute
,
HYS_Init_st_t
*
pstHYSInit
);
/*输入对应索引的物理量参数*/
HYS_Operate_Type_en_t
HYS_Physical_Quantity_Input
(
HYS_Num_en_t
enHYSIndex
,
Hys_uint16_t
u16HYSPhysValue
);
/*获取分段结果,返回0xFF表示无效*/
Hys_uint8_t
HYS_Get_Seg
(
HYS_Num_en_t
enHYSIndex
);
/*复位某个物理量,重新判断计算*/
HYS_Operate_Type_en_t
HYS_Reset_Physical_Quantity
(
HYS_Num_en_t
enHYSIndex
);
/*读取版本号*/
Hys_uint8_t
HYS_Version_Read
(
void
);
#endif
\ No newline at end of file
Firmware/Source/Application/Hysteresis_V10_239.lib
0 → 100644
View file @
89e57de4
File added
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
89e57de4
...
...
@@ -3554,11 +3554,20 @@ static void AMT630H_GUI_PhoneConnect_Fuel(uint8_t Fuel)
*PARAMETER : uint8_t Coolant-水温等级 0 - 红区一格 1 - 正常一格
*RETURN : NULL
*/
void
AMT630H_GUI_PhoneConnect_Coolant
(
void
)
void
AMT630H_GUI_PhoneConnect_Coolant
(
uint8_t
Coolant
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0947_709_533
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0948_967_533
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0413_727_533
);
if
(
Coolant
>
0
)
{
for
(
uint8_t
i
=
0
;
i
<
Coolant
;
i
++
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0427_729_536
+
i
);
}
}
}
/*电压显示函数*/
static
void
AMT630H_GUI_Voltage
(
uint16_t
Voltage
)
...
...
@@ -4802,7 +4811,7 @@ void AMT630H_GUI_PhoneConnect_Second_LowHalf(void)
AMT630H_GUI_PhoneConnect_VSpeed
(
VechileSpeed
);
AMT630H_GUI_PhoneConnect_ESpeed
(
Get_DispEngineSpeed
());
AMT630H_GUI_PhoneConnect_Fuel
(
Get_CurFuelSetp
());
AMT630H_GUI_PhoneConnect_Coolant
();
AMT630H_GUI_PhoneConnect_Coolant
(
GET_DataCoolantTempSegDisp
()
);
AMT630H_GUI_PhoneConnect_Telephone
();
if
(
KL30_VOLTAGE_time
<
10
)
{
...
...
Firmware/Source/Component/Components.h
View file @
89e57de4
...
...
@@ -28,6 +28,7 @@
#include "Data_VSpeed.h"
#include "Data_Coolant.h"
#include "Data_Fuel.h"
#include "Hysteresis.h"
#include "Mileage\Services_Mileage_User.h"
#include "BackLight.h"
#include "RTC\RTE_RTC.h"
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
89e57de4
...
...
@@ -72,6 +72,7 @@ static void Power_KL30_Init(void)
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
FaultCode_Init
();
TEMP_KL30_Init
();
}
static
void
Power_Wakeup_Init
(
void
)
...
...
@@ -106,6 +107,7 @@ static void Power_Wakeup_Init(void)
Protocol_KL30_Wakeup_Init
();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
FaultCode_Init
();
TEMP_KL30_Init
();
}
static
void
Power_LVP_Init
(
void
)
...
...
@@ -129,6 +131,7 @@ static void Power_IG_ON_Init(void)
Line_In_KL15_ON_Init
();
Telltales_KL15_Init
();
Fuel_KL15_Init
();
TEMP_KL15_Init
();
//RTE_GPIO_Set_Level(Blacklight_PWM, 1);
FaultCode_Init
();
mwAmt630hUartSendDatainit
();
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
89e57de4
...
...
@@ -41,7 +41,6 @@ void Sys_10ms_Tasks(void)
Key_Clear_Time
();
Key_TimeOut_Service
();
Fuel_R_Cal
(
10u
);
Coolant_R_Cal
(
10u
);
Data_Light_Res_service
(
10
);
BackLight_Process
();
}
...
...
@@ -50,6 +49,7 @@ void Sys_20ms_Tasks(void)
{
Data_Vehicle_Speed_Processing_Service
();
Data_Engine_Speed_Processing_Service
();
Data_Coolant_Temp_Processing_Service
();
}
void
Sys_50ms_Tasks
(
void
)
...
...
@@ -83,7 +83,6 @@ void Sys_100ms_Tasks(void)
S3_ServerCNTT
();
Get_DisTime_Service
();
Fuel_Cal_Sevice
(
100u
);
Coolant_Cal_Sevice
(
100u
);
Services_Mileage_Callback
();
// Data_Mileage_Clear();
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN04
,
GpioOut_High
);
...
...
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