Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiancetai
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
陈家乐
jiancetai
Commits
f3d02bcc
Commit
f3d02bcc
authored
Mar 10, 2025
by
李梓源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加光控大灯与转向开关电压显示
parent
46706fb5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
26 deletions
+61
-26
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+33
-7
Analog_Signals.c
..._test_bench/source/Driver/Analog_Signals/Analog_Signals.c
+7
-5
Analog_Signals.h
..._test_bench/source/Driver/Analog_Signals/Analog_Signals.h
+6
-5
Analog_Signals.h
YueJin_test_bench/utility/config_Adc/inc/Analog_Signals.h
+7
-5
Analog_Signals.c
YueJin_test_bench/utility/config_Adc/src/Analog_Signals.c
+8
-4
No files found.
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
f3d02bcc
...
...
@@ -4411,19 +4411,24 @@ void Display_Send_ODO(uint8_t fuel)
}
uint8_t
CHECK_Value
=
1
;
uint8_t
DIS_VALUE
=
0
;
const
uint16_t
Volatile
[]
=
{
90
,
80
};
void
Display_Send_Vspead
(
uint8_t
menu
)
{
uint8_t
fuel_val
=
0
;
static
uint8_t
Type_Clear
=
0
;
uint8_t
VSpeed_val
=
0
;
uint16_t
GKDD_Voltage
=
0
;
uint16_t
ZXSW_Voltage
=
0
;
uint16_t
Voltage_left
=
0
;
uint16_t
Voltage_right
=
0
;
// static uint8_t Type_Clear_FLAG = 0;
if
(
(
Type_Clear
!=
menu
))
{
Type_Clear
=
menu
;
Display_TFT_Clear
();
}
if
(
menu
>
0
)
{
//
if(menu > 0)
//
{
switch
(
menu
)
{
...
...
@@ -4491,7 +4496,14 @@ void Display_Send_Vspead(uint8_t menu)
CHECK_Value
=
1
;
break
;
case
5
:
if
(
ZXSW_AD
==
1
)
ZXSW_Voltage
=
ADC_Read_Signal
(
ADC_CH_ZXSW_VOLTAGE
);
Voltage_left
=
ZXSW_Voltage
/
1000
;
Voltage_right
=
(
ZXSW_Voltage
/
10
)
%
10
;
uint8_t
mLRbuff
[
3
]
=
{
0x2E
,
Voltage_right
,
0xff
};
General_Number_Disp
(
mLRbuff
,
175
,
160
);
GUI_General_Digit_Display
(
Voltage_left
,
Num_15
,
2
,
1
,
ODODigitNum09PosX
,
160
);
TFT_LCD_Draw_Bmp
(
210
,
160
,
(
uint8_t
*
)
gImage_Dyy_words_19X224_Y166
);
//单位:V
if
(
ZXSW_Voltage
>=
10000
)
{
CHECK_Value
=
1
;
TFT_LCD_Draw_Bmp
(
51
,
261
,(
uint8_t
*
)
gImage_Alarm_11_Word0X51_Y261
);
...
...
@@ -4502,7 +4514,14 @@ void Display_Send_Vspead(uint8_t menu)
}
break
;
case
6
:
if
(
ZXSW_AD
==
1
)
ZXSW_Voltage
=
ADC_Read_Signal
(
ADC_CH_ZXSW_VOLTAGE
);
Voltage_left
=
ZXSW_Voltage
/
1000
;
Voltage_right
=
(
ZXSW_Voltage
/
10
)
%
10
;
uint8_t
mLRbuff1
[]
=
{
0x2E
,
Voltage_right
,
0xff
};
General_Number_Disp
(
mLRbuff1
,
175
,
160
);
GUI_General_Digit_Display
(
Voltage_left
,
Num_15
,
2
,
1
,
ODODigitNum09PosX
,
160
);
TFT_LCD_Draw_Bmp
(
210
,
160
,
(
uint8_t
*
)
gImage_Dyy_words_19X224_Y166
);
//单位:V
if
(
ZXSW_Voltage
>=
10000
)
{
CHECK_Value
=
1
;
TFT_LCD_Draw_Bmp
(
51
,
261
,(
uint8_t
*
)
gImage_Alarm_11_Word0X51_Y261
);
...
...
@@ -4513,7 +4532,14 @@ void Display_Send_Vspead(uint8_t menu)
}
break
;
case
7
:
if
(
Light_control_headlights
==
1
)
GKDD_Voltage
=
ADC_Read_Signal
(
ADC_CH_GKDD_VOLTAGE
);
Voltage_left
=
GKDD_Voltage
/
1000
;
Voltage_right
=
(
GKDD_Voltage
/
10
)
%
10
;
uint8_t
mLRbuff2
[]
=
{
0x2E
,
Voltage_right
,
0xff
};
General_Number_Disp
(
mLRbuff2
,
175
,
160
);
GUI_General_Digit_Display
(
Voltage_left
,
Num_15
,
2
,
1
,
ODODigitNum09PosX
,
160
);
TFT_LCD_Draw_Bmp
(
210
,
160
,
(
uint8_t
*
)
gImage_Dyy_words_19X224_Y166
);
//单位:V
if
(
GKDD_Voltage
>=
10000
)
{
CHECK_Value
=
1
;
TFT_LCD_Draw_Bmp
(
51
,
261
,(
uint8_t
*
)
gImage_Alarm_06_Word0X51_Y261
);
...
...
@@ -4571,7 +4597,7 @@ void Display_Send_Vspead(uint8_t menu)
}
//
}
...
...
YueJin_test_bench/source/Driver/Analog_Signals/Analog_Signals.c
View file @
f3d02bcc
...
...
@@ -4,7 +4,7 @@
* \attention
*
* This file is automatically generated by analog signals configuration tool.
* Date : 202
2/8/3 23:21:24
* Date : 202
5/3/10 11:57:37
* 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
]
=
{
9U
,
15U
,
1
4U
,
9U
,
15U
,
1
2U
,
13U
,
};
const
ADC_Ch_Cfg_st_t
stADCChCfg
[
ADC_SIGNAL_CH_NUMBER
]
=
...
...
@@ -82,13 +82,15 @@ const ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBER] =
{
0U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit101
,},
{
1U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit101
,},
{
2U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit102
,},
{
3U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit102
,},
};
const
ADC_Res_List_st_t
stADCResList
[
ADC_SIGNAL_CH_NUMBER
]
=
{
{
0U
,
100000U
,
0U
,
0U
,},
{
0U
,
100000U
,
0U
,
0U
,},
{
330000U
,
47000U
,
0U
,
0U
,},
{
3300000U
,
1000000U
,
0U
,
0U
,},
{
3300000U
,
1000000U
,
0U
,
0U
,},
};
/* Private function prototypes ----------------------------------------------*/
...
...
YueJin_test_bench/source/Driver/Analog_Signals/Analog_Signals.h
View file @
f3d02bcc
...
...
@@ -4,7 +4,7 @@
* \attention
*
* This file is automatically generated by analog signals configuration tool.
* Date : 202
2/8/3 23:21:24
* Date : 202
5/3/10 11:57:37
* Cfg Tool Ver : 1.1.0
* Engineer :
* (c) Heilongjiang TYW electronics co., LTD
...
...
@@ -29,12 +29,13 @@ enum ADCChName
{
ADC_CH_KL15_VOLTAGE
=
0
,
ADC_CH_KL30_VOLTAGE
,
ADC_CH_10_VOLTAGE
,
ADC_CH_GKDD_VOLTAGE
,
ADC_CH_ZXSW_VOLTAGE
,
};
/* Exported macro ------------------------------------------------------------*/
#define ADC_TOTAL_CH_NUMBER (
3
U)
#define ADC_SIGNAL_CH_NUMBER (
3
U)
#define ADC_TOTAL_CH_NUMBER (
4
U)
#define ADC_SIGNAL_CH_NUMBER (
4
U)
#define ADC_REF_VOLTAGE u16ADCRefVoltage
/* Exported variables --------------------------------------------------------*/
...
...
YueJin_test_bench/utility/config_Adc/inc/Analog_Signals.h
View file @
f3d02bcc
...
...
@@ -4,7 +4,7 @@
* \attention
*
* This file is automatically generated by analog signals configuration tool.
* Date : 2025/3/
5 20:42:21
* Date : 2025/3/
10 11:57:37
* Cfg Tool Ver : 1.1.0
* Engineer :
* (c) Heilongjiang TYW electronics co., LTD
...
...
@@ -27,13 +27,15 @@ extern {
/* Exported types ------------------------------------------------------------*/
enum
ADCChName
{
ADC_CH_12_VOLTAGE
=
0
,
ADC_CH_13_VOLTAGE
,
ADC_CH_KL15_VOLTAGE
=
0
,
ADC_CH_KL30_VOLTAGE
,
ADC_CH_GKDD_VOLTAGE
,
ADC_CH_ZXSW_VOLTAGE
,
};
/* Exported macro ------------------------------------------------------------*/
#define ADC_TOTAL_CH_NUMBER (
2
U)
#define ADC_SIGNAL_CH_NUMBER (
2
U)
#define ADC_TOTAL_CH_NUMBER (
4
U)
#define ADC_SIGNAL_CH_NUMBER (
4
U)
#define ADC_REF_VOLTAGE u16ADCRefVoltage
/* Exported variables --------------------------------------------------------*/
...
...
YueJin_test_bench/utility/config_Adc/src/Analog_Signals.c
View file @
f3d02bcc
...
...
@@ -4,7 +4,7 @@
* \attention
*
* This file is automatically generated by analog signals configuration tool.
* Date : 2025/3/
5 20:42:21
* Date : 2025/3/
10 11:57:37
* Cfg Tool Ver : 1.1.0
* Engineer :
* (c) Heilongjiang TYW electronics co., LTD
...
...
@@ -74,19 +74,23 @@ ADC_Data_st_t stADCData[ADC_SIGNAL_CH_NUMBER];
const
uint8_t
u8ADCChList
[
ADC_CONV_CH_NUMBER
]
=
{
12U
,
13U
,
9U
,
15U
,
12U
,
13U
,
};
const
ADC_Ch_Cfg_st_t
stADCChCfg
[
ADC_SIGNAL_CH_NUMBER
]
=
{
{
0U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit10
2
,},
{
0U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit10
1
,},
{
1U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit101
,},
{
2U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit102
,},
{
3U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit102
,},
};
const
ADC_Res_List_st_t
stADCResList
[
ADC_SIGNAL_CH_NUMBER
]
=
{
{
0U
,
100000U
,
0U
,
0U
,},
{
0U
,
100000U
,
0U
,
0U
,},
{
3300000U
,
1000000U
,
0U
,
0U
,},
{
3300000U
,
1000000U
,
0U
,
0U
,},
{
3300000U
,
100000U
,
0U
,
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