Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VC66_7C
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
ISUZU
VC66_7C
Commits
b5093ef0
Commit
b5093ef0
authored
Apr 08, 2023
by
hu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' into withBoot
parents
4907e8a2
d63bfdfa
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
64 additions
and
69 deletions
+64
-69
BackGroundLight.c
source/Application/APP/BackLight/BackGroundLight.c
+41
-52
BackLight_APP.c
source/Application/APP/BackLight/BackLight_APP.c
+3
-2
BackgroundLight.h
source/Application/APP/BackLight/BackgroundLight.h
+3
-3
Common_Interface.c
source/Application/RTE/Common_Interface.c
+2
-2
ADC.h
source/Driver/Analog_Signals/ADC.h
+1
-1
Analog_Signals.c
source/Driver/Analog_Signals/Analog_Signals.c
+7
-2
Analog_Signals.h
source/Driver/Analog_Signals/Analog_Signals.h
+1
-1
han00002ce20.h
source/Driver/Graphic/han00002ce20.h
+1
-1
tasks.c
source/System/tasks.c
+1
-1
Analog_Signals_RH850_庆铃重卡.xlsm
utility/AD/cfg/Analog_Signals_RH850_庆铃重卡.xlsm
+0
-0
Analog_Signals.h
utility/AD/inc/Analog_Signals.h
+1
-1
Analog_Signals.c
utility/AD/src/Analog_Signals.c
+3
-3
No files found.
source/Application/APP/BackLight/BackGroundLight.c
View file @
b5093ef0
...
...
@@ -192,65 +192,53 @@ void BackLightDamp(uint8_t TimeX)
}
/*-------------------------------------------------------------------------
* Function Name :
App_SwapShort
* Description
: ½»»»Êý¾Ý
* Function Name :
calculate_Thermistor
* Description
:
* Input : None
* Output : None
* Return : None
* onther : qitiancun 2018-9-10
--------------------------------------------------------------------------*/
void
AD_SwapShort
(
uint16_t
*
pData1
,
uint16_t
*
pData2
)
uint32_t
Calculate_Thermistor
(
BL_STATE_PARA
BLFunStatePara
)
{
uint16_t
psw
;
if
((
*
pData1
)
>
(
*
pData2
))
uint32_t
resistance
=
0
;
uint32_t
ThermistorADValue
=
0
;
uint8_t
i
=
0
;
uint16_t
AdValue
=
0
;
AdValue
=
BLFunStatePara
.
BL_User_NTC_AD
;
if
(
ThermistorIndex
==
0
)
{
psw
=
(
*
pData2
);
(
*
pData2
)
=
(
*
pData1
);
(
*
pData1
)
=
psw
;
ThermistorList
[
ThermistorIndex
++
]
=
AdValue
;
}
}
/*-------------------------------------------------------------------------
* Function Name : App_SortShort
* Description :
* Input : None
* Output : None
* Return : None
* onther : qitiancun 2018-9-10
--------------------------------------------------------------------------*/
void
AD_SortShort
(
uint16_t
SortData
[],
uint8_t
len
)
{
uint8_t
n
=
0u
,
m
;
for
(;
n
<
len
-
1u
;
n
++
)
else
{
for
(
i
=
0
;
i
<
ThermistorIndex
;
i
++
)
{
for
(
m
=
n
+
1u
;
m
<
len
;
m
++
)
if
(
AdValue
<
ThermistorList
[
i
]
)
{
AD_SwapShort
(
&
SortData
[
n
],
&
SortData
[
m
]);
memmove
((
uint8_t
*
)
&
ThermistorList
[
i
+
1
],
(
uint8_t
*
)
&
ThermistorList
[
i
],
(
ThermistorIndex
-
i
)
*
sizeof
(
ThermistorList
[
i
]));
ThermistorList
[
i
]
=
AdValue
;
ThermistorIndex
++
;
break
;
}
}
if
(
i
==
ThermistorIndex
)
{
ThermistorList
[
ThermistorIndex
++
]
=
AdValue
;
}
}
}
/*-------------------------------------------------------------------------
* Function Name : calculate_Thermistor
* Description :
* Input : None
* Output : None
* Return : None
* onther : qitiancun 2018-9-10
--------------------------------------------------------------------------*/
uint16_t
Calculate_Thermistor
(
BL_STATE_PARA
BLFunStatePara
)
{
uint32_t
resistance
=
0u
;
uint32_t
TmpNTCADMax
=
0u
;
ThermistorList
[
ThermistorIndex
]
=
BLFunStatePara
.
BL_User_NTC_AD
;
TmpNTCADMax
=
BLFunStatePara
.
BL_User_NTC_AD_MAX
*
10u
;
ThermistorIndex
++
;
ThermistorIndex
=
(
ThermistorIndex
+
1u
)
%
5u
;
AD_SortShort
(
ThermistorList
,
5u
);
if
((
ThermistorCurValue
>
(
ThermistorList
[
2u
]
+
3u
))
||
((
ThermistorCurValue
+
3u
)
<
ThermistorList
[
2
]))
if
(
ThermistorIndex
>
THERMISTLISTCN
)
{
ThermistorIndex
=
0
;
ThermistorADValue
=
(
ThermistorList
[
0
]
+
ThermistorList
[
1
]
+
ThermistorList
[
2
]
\
+
ThermistorList
[
3
]
+
ThermistorList
[
4
]
+
ThermistorList
[
5
])
/
6
;
if
((
ThermistorCurValue
>
(
ThermistorADValue
+
3
))
||
((
ThermistorCurValue
+
3
)
<
ThermistorADValue
))
{
ThermistorCurValue
=
ThermistorList
[
2
];
ThermistorCurValue
=
ThermistorADValue
;
}
}
/*
ad 10K
...
...
@@ -264,23 +252,24 @@ uint16_t Calculate_Thermistor(BL_STATE_PARA BLFunStatePara)
*/
if
(
ThermistorCurValue
)
{
resistance
=
((
TmpNTCADMax
-
(
10u
*
ThermistorCurValue
))
*
100u
)
/
ThermistorCurValue
;
resistance
=
((
40960
-
(
10u
*
ThermistorCurValue
))
*
100u
)
/
ThermistorCurValue
;
}
else
{
resistance
=
7851u
;
}
return
(
uint16_t
)
resistance
;
return
resistance
;
}
void
BackLightDeal_NTC
(
BL_USER_PARA
BL_FunPara
,
BL_STATE_PARA
BLFunStatePara
)
{
uint16_t
tmpval
;
uint
16
_t
NTCresistance
;
uint
32
_t
NTCresistance
;
uint16_t
BacklightTftDestVal
;
uint32_t
tmpDestVal
;
NTCresistance
=
Calculate_Thermistor
(
BLFunStatePara
);
/* high temprature TFT decrease brightness*/
if
((
NTCresistance
>=
1
607u
)
&&
(
NTCresistance
<=
1712u
))
if
((
NTCresistance
>=
1
507
)
&&
(
NTCresistance
<=
1712u
))
{
CurBacklightLv
=
BACKLIGHT_LV80
;
BackLightDerating
=
1u
;
...
...
source/Application/APP/BackLight/BackLight_APP.c
View file @
b5093ef0
...
...
@@ -13,6 +13,7 @@
#include "Data_Fuel_User.h"
#include "Menu.h"
#include "GUI.h"
#include "Analog_Signals.h"
typedef
struct
{
...
...
@@ -148,8 +149,8 @@ void BL_Management_service(void)
/*得到背光等级 可自己在枚举中定义 在BackGroundLight.c里填表*/
GetBGLLvl
((
BackLightVLv
-
1
),
LED_Pos
);
/*得到热敏电阻电压参数为
100倍电压
值*/
//DNC_NumValue = RTE_Read_NTC_R_Valid
();
/*得到热敏电阻电压参数为
AD数
值*/
DNC_NumValue
=
Common_Get_NTCAD
();
GetBGLNTCVol
((
uint16_t
)
DNC_NumValue
);
/*主函数中调用第一个参数电源状态 1是 ON档 2 off 第二个参数 唤醒条件 1是TTF唤醒 2 是表盘唤醒 3 是表盘和屏都有唤醒,0无唤醒*/
...
...
source/Application/APP/BackLight/BackgroundLight.h
View file @
b5093ef0
...
...
@@ -11,6 +11,8 @@
#define BACKLIGHT_LV100 0u
#define BACKLIGHT_LV80 1u
#define BACKLIGHT_LV40 2u
#define THERMISTLISTCN 120
extern
void
SetBackLightOutput
(
uint8_t
n
,
uint16_t
val
);
extern
void
SetBacklightDestVal
(
uint8_t
n
,
const
uint16_t
val
);
extern
void
SetBacklightCurVal
(
uint8_t
n
,
uint16_t
val
);
...
...
@@ -20,7 +22,5 @@ extern void BackLightDeal(BL_USER_PARA BL_FunPara, BL_STATE_PARA BLFunStatePara
extern
void
SetBacklightMinVal
(
uint8_t
n
,
uint16_t
val
);
/*TFT高温处理函数*/
extern
void
BackLightDeal_NTC
(
BL_USER_PARA
BL_FunPara
,
BL_STATE_PARA
BLFunStatePara
);
extern
void
AD_SwapShort
(
uint16_t
*
pData1
,
uint16_t
*
pData2
);
extern
void
AD_SortShort
(
uint16_t
SortData
[],
uint8_t
len
);
extern
uint16_t
Calculate_Thermistor
(
BL_STATE_PARA
BLFunStatePara
);
extern
uint32_t
Calculate_Thermistor
(
BL_STATE_PARA
BLFunStatePara
);
#endif
\ No newline at end of file
source/Application/RTE/Common_Interface.c
View file @
b5093ef0
...
...
@@ -434,7 +434,7 @@ void Common_Input_Para(void)
{
TPMS_TEST_OFF_TIME
++
;
}
else
else
if
(
User_set_Num
.
User_TpmsStatus
!=
2u
)
{
TPMS_TEST_OFF_TIME
=
0
;
}
...
...
@@ -915,7 +915,7 @@ uint8_t Common_Get_TPMS_TEST_OFF_Time_Sta(void)
ValueSta
=
0u
;
}
return
0u
;
return
ValueSta
;
}
void
Common_Set_Menu_FacDea_Time_Sta
(
uint32_t
Value
)
...
...
source/Driver/Analog_Signals/ADC.h
View file @
b5093ef0
...
...
@@ -5,7 +5,7 @@
#include "r_typedefs.h"
#define ADC_RESOLUTION (409
6
U)
/* 12bit ADC */
#define ADC_RESOLUTION (409
5
U)
/* 12bit ADC */
...
...
source/Driver/Analog_Signals/Analog_Signals.c
View file @
b5093ef0
...
...
@@ -74,7 +74,7 @@ ADC_Data_st_t stADCData[ADC_SIGNAL_CH_NUMBER];
const
uint8_t
u8ADCChList
[
ADC_CONV_CH_NUMBER
]
=
{
0U
,
10U
,
9U
,
7U
,
8U
,
5U
,
11U
,
2
U
,
0U
,
10U
,
9U
,
7U
,
8U
,
5U
,
11U
,
1
U
,
};
const
ADC_Ch_Cfg_st_t
stADCChCfg
[
ADC_SIGNAL_CH_NUMBER
]
=
...
...
@@ -98,7 +98,7 @@ const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] =
{
270000U
,
180000U
,
1000U
,
0U
,},
{
0U
,
2000000U
,
0U
,
0U
,},
{
0U
,
0U
,
47000U
,
0U
,},
{
0U
,
10000
0U
,
100000U
,
0U
,},
{
0U
,
0U
,
100000U
,
0U
,},
};
/* Private function prototypes ----------------------------------------------*/
...
...
@@ -400,3 +400,8 @@ uint16_t ADC_Conv_Single_Channel(uint8_t u8ADCCh)
return
u16Result
;
}
uint16_t
Common_Get_NTCAD
(
void
)
{
return
u16ADCSample
[
ADC_CH_NTC_R
];
}
\ No newline at end of file
source/Driver/Analog_Signals/Analog_Signals.h
View file @
b5093ef0
...
...
@@ -54,7 +54,7 @@ extern void Analog_Signal_Conv_Service(void);
extern
uint16_t
ADC_Read_Signal
(
uint8_t
u8ADCCh
);
extern
uint8_t
ADC_Read_Signal_Valid
(
uint8_t
u8ADCCh
);
extern
uint16_t
ADC_Conv_Single_Channel
(
uint8_t
u8ADCCh
);
uint16_t
Common_Get_NTCAD
(
void
);
/*! @} */
#ifdef __cplusplus
}
...
...
source/Driver/Graphic/han00002ce20.h
View file @
b5093ef0
...
...
@@ -4,7 +4,7 @@ static const HanSansCNFontPos_t Hansans00002ce20[] =
{
//{charid, xpos, ypos, width, height, xoffset, yoffset, xadvance}
{ 0 , 3995 , 552 , 4 , 22 , 0 , 0 , 4 },
#if
1
#if
0
{ 1 , 3995 , 23 , 4 , 22 , 0 , 0 , 4 },
{ 2 , 3995 , 805 , 4 , 22 , 0 , 0 , 4 },
{ 3 , 3995 , 759 , 4 , 22 , 0 , 0 , 4 },
source/System/tasks.c
View file @
b5093ef0
...
...
@@ -238,6 +238,7 @@ void Sys_Run_Mode_50ms_Tasks(void)
Speed_PPK_Processing
();
Sound_Scheduling_Service
();
// BGTask();
BL_Management_service
();
LED_Driver_Scan_Refresh
();
Drive_Info_IC1_STATUS_Rx
();
...
...
@@ -252,7 +253,6 @@ void Sys_Run_Mode_50ms_Tasks(void)
//uint32_t YZHD_Count = 0;
void
Sys_Run_Mode_100ms_Tasks
(
void
)
{
BL_Management_service
();
RTE_RTC_Services_100Ms_Cbk
();
Data_ODO_Processing
();
Data_Trip_Processing
();
...
...
utility/AD/cfg/Analog_Signals_RH850_庆铃重卡.xlsm
View file @
b5093ef0
No preview for this file type
utility/AD/inc/Analog_Signals.h
View file @
b5093ef0
...
...
@@ -4,7 +4,7 @@
* \attention
*
* This file is automatically generated by analog signals configuration tool.
* Date : 202
1/11/25 15:48:30
* Date : 202
3-04-07- 14:14:35
* Cfg Tool Ver : 1.1.0
* Engineer :
* (c) Heilongjiang TYW electronics co., LTD
...
...
utility/AD/src/Analog_Signals.c
View file @
b5093ef0
...
...
@@ -4,7 +4,7 @@
* \attention
*
* This file is automatically generated by analog signals configuration tool.
* Date : 202
1/11/25 15:48:30
* Date : 202
3-04-07- 14:14:35
* Cfg Tool Ver : 1.1.0
* Engineer :
* (c) Heilongjiang TYW electronics co., LTD
...
...
@@ -74,7 +74,7 @@ ADC_Data_st_t stADCData[ADC_SIGNAL_CH_NUMBER];
const
uint8_t
u8ADCChList
[
ADC_CONV_CH_NUMBER
]
=
{
0U
,
10U
,
9U
,
7U
,
8U
,
5U
,
11U
,
2
U
,
0U
,
10U
,
9U
,
7U
,
8U
,
5U
,
11U
,
1
U
,
};
const
ADC_Ch_Cfg_st_t
stADCChCfg
[
ADC_SIGNAL_CH_NUMBER
]
=
...
...
@@ -98,7 +98,7 @@ const ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_NUMBER] =
{
270000U
,
180000U
,
1000U
,
0U
,},
{
0U
,
2000000U
,
0U
,
0U
,},
{
0U
,
0U
,
47000U
,
0U
,},
{
0U
,
10000
0U
,
100000U
,
0U
,},
{
0U
,
0U
,
100000U
,
0U
,},
};
/* Private function prototypes ----------------------------------------------*/
...
...
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