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
0be9621c
Commit
0be9621c
authored
Oct 07, 2024
by
王佳伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:根据规范新增水温表具体逻辑(未添加断路短路功能)
parent
bbf1d175
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
529 additions
and
163 deletions
+529
-163
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
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
+3
-2
No files found.
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
View file @
0be9621c
...
@@ -738,6 +738,16 @@
...
@@ -738,6 +738,16 @@
<FileType>
5
</FileType>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\BlueTooth.h
</FilePath>
<FilePath>
..\..\..\..\Source\Application\BlueTooth.h
</FilePath>
</File>
</File>
<File>
<FileName>
Hysteresis_V10_239.lib
</FileName>
<FileType>
4
</FileType>
<FilePath>
..\..\..\..\Source\Application\Hysteresis_V10_239.lib
</FilePath>
</File>
<File>
<FileName>
Hysteresis.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\Hysteresis.h
</FilePath>
</File>
</Files>
</Files>
</Group>
</Group>
<Group>
<Group>
...
...
Firmware/Source/Application/Data_Coolant.c
View file @
0be9621c
This diff is collapsed.
Click to expand it.
Firmware/Source/Application/Data_Coolant.h
View file @
0be9621c
#ifndef DATA_COOLANT_H
#ifndef DATA_COOLANT_H
#define DATA_COOLANT_H
#define DATA_COOLANT_H
#include "stdint.h"
#include "Components.h"
typedef
enum
{
#define Coolant_LEN 17
CoolantSensorNormal
=
0
,
CoolantSensorShortCircuit
,
typedef
unsigned
int
INT16U
;
CoolantSensorOpenCircuit
,
/*** 控制结构 ***/
}
CoolantSensorSts_t
;
typedef
struct
extern
void
Coolant_KL15_Init
(
void
);
{
extern
void
Coolant_KL30_Init
(
void
);
uint8_t
u8_DestSeg
;
extern
void
Coolant_Cal_Sevice
(
uint8_t
deltaTime
);
uint8_t
u8_CurSeg
;
extern
uint8_t
Get_CurCoolantSetp
(
void
);
}
DataCoolantTempDisStruct
;
extern
CoolantSensorSts_t
Get_Coolant_Sensor_State
(
void
);
void
Coolant_R_Cal
(
uint8_t
deltaTime
);
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
#endif
Firmware/Source/Application/Hysteresis.h
0 → 100644
View file @
0be9621c
#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 @
0be9621c
File added
Firmware/Source/Component/Components.h
View file @
0be9621c
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include "Data_VSpeed.h"
#include "Data_VSpeed.h"
#include "Data_Coolant.h"
#include "Data_Coolant.h"
#include "Data_Fuel.h"
#include "Data_Fuel.h"
#include "Hysteresis.h"
#include "Mileage\Services_Mileage_User.h"
#include "Mileage\Services_Mileage_User.h"
#include "BackLight.h"
#include "BackLight.h"
#include "RTC\RTE_RTC.h"
#include "RTC\RTE_RTC.h"
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
0be9621c
...
@@ -72,6 +72,7 @@ static void Power_KL30_Init(void)
...
@@ -72,6 +72,7 @@ static void Power_KL30_Init(void)
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
FaultCode_Init
();
FaultCode_Init
();
TEMP_KL30_Init
();
}
}
static
void
Power_Wakeup_Init
(
void
)
static
void
Power_Wakeup_Init
(
void
)
...
@@ -106,6 +107,7 @@ static void Power_Wakeup_Init(void)
...
@@ -106,6 +107,7 @@ static void Power_Wakeup_Init(void)
Protocol_KL30_Wakeup_Init
();
Protocol_KL30_Wakeup_Init
();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
FaultCode_Init
();
FaultCode_Init
();
TEMP_KL30_Init
();
}
}
static
void
Power_LVP_Init
(
void
)
static
void
Power_LVP_Init
(
void
)
...
@@ -129,6 +131,7 @@ static void Power_IG_ON_Init(void)
...
@@ -129,6 +131,7 @@ static void Power_IG_ON_Init(void)
Line_In_KL15_ON_Init
();
Line_In_KL15_ON_Init
();
Telltales_KL15_Init
();
Telltales_KL15_Init
();
Fuel_KL15_Init
();
Fuel_KL15_Init
();
TEMP_KL15_Init
();
//RTE_GPIO_Set_Level(Blacklight_PWM, 1);
//RTE_GPIO_Set_Level(Blacklight_PWM, 1);
FaultCode_Init
();
FaultCode_Init
();
AMT630H_Animation_IGON
();
AMT630H_Animation_IGON
();
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
0be9621c
...
@@ -40,7 +40,7 @@ void Sys_10ms_Tasks(void)
...
@@ -40,7 +40,7 @@ void Sys_10ms_Tasks(void)
Key_Clear_Time
();
Key_Clear_Time
();
Key_TimeOut_Service
();
Key_TimeOut_Service
();
Fuel_R_Cal
(
10u
);
Fuel_R_Cal
(
10u
);
Coolant_R
_Cal
(
10u
);
//
_Cal(10u);
Data_Light_Res_service
(
10
);
Data_Light_Res_service
(
10
);
BackLight_Process
();
BackLight_Process
();
}
}
...
@@ -49,6 +49,7 @@ void Sys_20ms_Tasks(void)
...
@@ -49,6 +49,7 @@ void Sys_20ms_Tasks(void)
{
{
Data_Vehicle_Speed_Processing_Service
();
Data_Vehicle_Speed_Processing_Service
();
Data_Engine_Speed_Processing_Service
();
Data_Engine_Speed_Processing_Service
();
Data_Coolant_Temp_Processing_Service
();
}
}
void
Sys_50ms_Tasks
(
void
)
void
Sys_50ms_Tasks
(
void
)
...
@@ -82,7 +83,7 @@ void Sys_100ms_Tasks(void)
...
@@ -82,7 +83,7 @@ void Sys_100ms_Tasks(void)
S3_ServerCNTT
();
S3_ServerCNTT
();
Get_DisTime_Service
();
Get_DisTime_Service
();
Fuel_Cal_Sevice
(
100u
);
Fuel_Cal_Sevice
(
100u
);
Coolant_Cal_Sevice
(
100u
);
//
Coolant_Cal_Sevice(100u);
Services_Mileage_Callback
();
Services_Mileage_Callback
();
// Data_Mileage_Clear();
// Data_Mileage_Clear();
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN04
,
GpioOut_High
);
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