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
302a192b
Commit
302a192b
authored
Mar 06, 2025
by
梁百峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:版本号对比、光感值显示
parent
dc1aa1bb
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
159 additions
and
37 deletions
+159
-37
Barcode_Scanner.c
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
+2
-0
Barcode_Scanner.h
YueJin_test_bench/source/Appliciation/Barcode_Scanner.h
+1
-0
Check_Ctrl.c
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
+26
-2
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+60
-18
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+1
-0
R485_Communication_Matrix.c
...est_bench/source/Appliciation/R485_Communication_Matrix.c
+14
-1
RTE_GPIO.c
YueJin_test_bench/source/Appliciation/RTE_GPIO.c
+11
-1
RTE_GPIO.h
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
+2
-2
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+15
-9
api_RS485.c
YueJin_test_bench/source/Appliciation/api_RS485.c
+23
-1
init.c
YueJin_test_bench/source/System/init.c
+4
-3
No files found.
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
View file @
302a192b
...
...
@@ -48,6 +48,7 @@ uint8_t get_num_buf[34];
uint8_t
comparestart
;
uint8_t
blename
[
5
];
uint8_t
firstpowerflag
=
0
;
uint16_t
lightnumber
=
0
;
void
get_key
(
void
)
{
key_array
[
0
]
=
seed_value
[
0
]
|
seed_value
[
3
];
...
...
@@ -124,6 +125,7 @@ void datacheck(void)
blename
[
2
]
=
RS485_data
[
8
];
blename
[
3
]
=
RS485_data
[
9
];
blename
[
4
]
=
0xff
;
lightnumber
=
(
RS485_data
[
11
]
<<
8
)
+
RS485_data
[
10
];
recvflag111
=
1
;
RS485_TX_finish
=
0
;
// General_Number_Disp(blename, 3, 165);
...
...
YueJin_test_bench/source/Appliciation/Barcode_Scanner.h
View file @
302a192b
...
...
@@ -34,4 +34,5 @@ extern uint8_t get_num_buf[34];
extern
uint8_t
blename
[
5
];
extern
uint8_t
recvflag111
;
extern
uint8_t
firstpowerflag
;
extern
uint16_t
lightnumber
;
#endif
\ No newline at end of file
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
View file @
302a192b
...
...
@@ -71,7 +71,8 @@ void Function_Check_Ctrl(uint32_t cmd);
void
MENU_CHECK_STEP_ADD
(
void
)
{
MENU_CHECK_STEP
++
;
if
(
MENU_CHECK_STEP
>
13
)
if
(
MENU_CHECK_STEP
>
15
)
{
MENU_CHECK_STEP
=
0
;
}
...
...
@@ -274,6 +275,10 @@ uint8_t yibiaoshuju[34];
loc_Type_back
=
0
;
}
if
((
R485_ID4Dh
.
Sig
.
ESP322
==
0
)
&&
(
R485_ID4Dh
.
Sig
.
G0312
==
0
))
{
MENU_CHECK_STEP
=
0
;
}
Function_Check_Ctrl
(
1
);
//Excel表格发报文。硬线信号
Diag_Info_Init
(
);
Display_Init
(
);
...
...
@@ -290,7 +295,7 @@ uint8_t yibiaoshuju[34];
if
(
recvflag111
==
1
)
{
General_Number_Disp
(
blename
,
3
,
165
);
recvflag111
=
0
;
recvflag111
=
0
;
}
// POWER_CTRL_KL30 = 0u; //B+
...
...
@@ -775,6 +780,25 @@ void Function_Check_Ctrl(uint32_t cmd)
LINE_OUT_NEG_04
=
0
;
break
;
}
case
14
:
{
LED3
=
0
;
//右转
LED4
=
0
;
LINE_OUT_NEG_05
=
0
;
LINE_OUT_NEG_06
=
1
;
LINE_jinguang
=
0
;
POWER_CTRL_KL30_Current
=
0
;
if
(
Auto_ONOFF
==
0
)
{
LINE_OUT_NEG_01
=
0
;
}
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
LINE_OUT_NEG_04
=
1
;
POWER_CTRL_KL30
=
0
;
break
;
}
// case 21:
// {
// LINE_OUT_POS_01 = 1;
...
...
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
302a192b
...
...
@@ -3608,6 +3608,9 @@ void Check_PWM(void)
}
uint32_t
leftvoltage
;
uint32_t
rightvoltage
;
uint8_t
firstclearflag
=
0
;
uint8_t
nowbanbenhao
=
2
;
uint8_t
nowbanbenhaohoumian
=
22
;
const
uint16_t
banebenhao1
[]
=
{
35
,
25
};
const
uint16_t
banebenhao2
[]
=
{
190
,
180
};
const
uint16_t
banebenhao3
[]
=
{
105
,
95
};
...
...
@@ -3669,23 +3672,41 @@ void Display_Version_Info(uint32_t ON_OFF)
// {
// wuliao[i] = barcode_Msg[i];
// }
wuliao
[
0
]
=
0x33
;
wuliao
[
1
]
=
0x37
;
wuliao
[
2
]
=
0x31
;
wuliao
[
3
]
=
0x30
;
wuliao
[
4
]
=
0x30
;
wuliao
[
5
]
=
0x2D
;
wuliao
[
6
]
=
0x43
;
wuliao
[
7
]
=
0x30
;
wuliao
[
8
]
=
0x34
;
wuliao
[
9
]
=
0x37
;
wuliao
[
10
]
=
0x2D
;
wuliao
[
11
]
=
0x30
;
wuliao
[
12
]
=
0x32
;
wuliao
[
13
]
=
0x30
;
wuliao
[
14
]
=
0x30
;
wuliao
[
0
]
=
R485_ID4Dh
.
Sig
.
MaterialCode01
;
wuliao
[
1
]
=
R485_ID4Dh
.
Sig
.
MaterialCode02
;
wuliao
[
2
]
=
R485_ID4Dh
.
Sig
.
MaterialCode03
;
wuliao
[
3
]
=
R485_ID4Dh
.
Sig
.
MaterialCode04
;
wuliao
[
4
]
=
R485_ID4Dh
.
Sig
.
MaterialCode05
;
wuliao
[
5
]
=
R485_ID4Dh
.
Sig
.
MaterialCode06
;
wuliao
[
6
]
=
R485_ID4Dh
.
Sig
.
MaterialCode07
;
wuliao
[
7
]
=
R485_ID4Dh
.
Sig
.
MaterialCode08
;
wuliao
[
8
]
=
R485_ID4Dh
.
Sig
.
MaterialCode09
;
wuliao
[
9
]
=
R485_ID4Dh
.
Sig
.
MaterialCode10
;
wuliao
[
10
]
=
R485_ID4Dh
.
Sig
.
MaterialCode11
;
wuliao
[
11
]
=
R485_ID4Dh
.
Sig
.
MaterialCode12
;
wuliao
[
12
]
=
R485_ID4Dh
.
Sig
.
MaterialCode13
;
wuliao
[
13
]
=
R485_ID4Dh
.
Sig
.
MaterialCode14
;
wuliao
[
14
]
=
R485_ID4Dh
.
Sig
.
MaterialCode15
;
wuliao
[
15
]
=
0xFF
;
General_Number_Disp
(
wuliao
,
3
,
90
+
30
);
if
(
R485_ID4Dh
.
Sig
.
MaterialCode07
==
0x47
)
{
nowbanbenhao
=
1
;
nowbanbenhaohoumian
=
1
;
}
else
if
(
R485_ID4Dh
.
Sig
.
MaterialCode07
==
0x43
)
{
nowbanbenhao
=
2
;
nowbanbenhaohoumian
=
22
;
}
else
{
;
}
if
(
wuliao
[
0
]
!=
0
)
{
General_Number_Disp
(
wuliao
,
3
,
90
+
30
);
}
TFT_LCD_Draw_Bmp
(
3
,
50
+
30
,
(
uint8_t
*
)
gImage_Dyy_words_2X6_Y46
);
//硬件版本号
TFT_LCD_Draw_Bmp
(
0
,
70
+
30
,
(
uint8_t
*
)
gImage_Dyy_words_3X6_Y75
);
//零件号
TFT_LCD_Draw_Bmp
(
3
,
90
+
30
+
30
,
(
uint8_t
*
)
gImage_gImage_dianyuanwaifX6_Y165
);
//仪表电电源检测外发对比检验
...
...
@@ -3724,7 +3745,24 @@ void Display_Version_Info(uint32_t ON_OFF)
}
TFT_LCD_Draw_Bmp
(
3
,
90
+
25
+
25
+
30
+
30
+
30
,
(
uint8_t
*
)
gImage_gImage_LEDwaif1X6_Y16
);
//硬线指示灯外发对比
TFT_LCD_Draw_Bmp
(
3
,
90
+
25
+
25
+
30
+
25
+
30
+
30
,
(
uint8_t
*
)
gImage_gImage_SV1X6_Y16
);
//软件版本号对比
TFT_LCD_Draw_Bmp
(
200
,
90
+
25
+
25
+
30
+
25
+
30
+
30
,
(
uint8_t
*
)
gImage_dui
);
//软件版本号对比 对
if
((
R485_ID4Dh
.
Sig
.
ESP322
!=
0
)
&&
(
R485_ID4Dh
.
Sig
.
G0312
!=
0
))
{
if
((
nowbanbenhao
==
R485_ID4Dh
.
Sig
.
ESP322
)
&&
(
nowbanbenhaohoumian
==
R485_ID4Dh
.
Sig
.
ESP321
)
&&
(
nowbanbenhao
==
R485_ID4Dh
.
Sig
.
G0312
)
&&
(
nowbanbenhaohoumian
==
R485_ID4Dh
.
Sig
.
G0311
))
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
25
+
25
+
30
+
25
+
30
+
30
,
(
uint8_t
*
)
gImage_dui
);
//软件版本号对比 对
firstpowerflag
=
2
;
}
else
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
25
+
25
+
30
+
25
+
30
+
30
,
(
uint8_t
*
)
gImage_cuo
);
//软件版本号对比 错
firstpowerflag
=
3
;
MENU_CHECK_STEP
=
0
;
}
}
else
{
MENU_CHECK_STEP
=
0
;
}
// TFT_LCD_Draw_Bmp(200, 90+25+25+30+25+25, ( uint8_t * )gImage_cuo ); //软件版本号对比 错
// TFT_LCD_Draw_Bmp(3, 90+25+25+25+25+25, ( uint8_t * )gImage_gImage_SV1X6_Y16 ); //支持扫码功能个
// TFT_LCD_Draw_Bmp(3, 130, ( uint8_t * )gImage_Dyy_words_4X6_Y107); //供应商编码
...
...
@@ -3742,7 +3780,7 @@ void Display_Version_Info(uint32_t ON_OFF)
// TFT_LCD_Draw_Bmp(3, 160, ( uint8_t * )gImage_Alarm_12_WordX6_Y165); //24脚输出占空比
// TFT_LCD_Draw_Bmp(210, 160, ( uint8_t * )gImage_Alarm_13_ImageX222_Y166); //%
TFT_LCD_Draw_Bmp
(
3
,
290
,
(
uint8_t
*
)
gImage_gImage_checkVX6_Y165
);
//检测台版本号
uint8_t
mbuff
[
4
]
=
{
1
,
0
,
2
,
0xff
};
uint8_t
mbuff
[
4
]
=
{
1
,
0
,
3
,
0xff
};
General_Number_Disp
(
mbuff
,
160
,
290
);
}
...
...
@@ -4309,6 +4347,8 @@ void Display_Send_Vspead(uint8_t menu)
TFT_LCD_Draw_Bmp
(
140
+
18
+
18
+
18
+
18
,
40
+
25
+
25
+
25
+
25
+
25
,
(
uint8_t
*
)
NO_2
);
// GUI_Display_Version_Code_Service(3, 40+25+25+25+25, "Color", Letter_Num_11, PCodeText_Space_size);
//光感值先注释掉
// GUI_General_Digit_Display(lightnumber, Num_15, 6, 5, ODODigitNum09PosX, 40+25+25+25+25+25+25+25+25+25);
if
(
Light_Out
==
0
)
{
// TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_AutoX6_Y165);
...
...
@@ -4501,6 +4541,8 @@ void Display_Send_Vspead(uint8_t menu)
//Send_ODO_Init();
HW_Static_Current_Check
(
1
);
break
;
case
14
:
break
;
default:
MENU_CHECK_STEP
=
0
;
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
302a192b
...
...
@@ -381,6 +381,7 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
bleOFFtoONtime
=
0
;
startONfalg
=
0
;
startIGONtime
=
0
;
recvflag111
=
0
;
}
}
}
...
...
YueJin_test_bench/source/Appliciation/R485_Communication_Matrix.c
View file @
302a192b
...
...
@@ -217,7 +217,7 @@ uint32_t R485_Send_0x41(void)
R485_ID41h
.
Sig
.
CruiseMode
=
0x0
;
//巡航
R485_ID41h
.
Sig
.
ICMCalculatesVehicleSpeed
=
0x
300
;
//速度 = (X * 0.512 * 3.14 * 1.05) / 30 22km
R485_ID41h
.
Sig
.
ICMCalculatesVehicleSpeed
=
0x
FFFE
;
//速度 = (X * 0.512 * 3.14 * 1.05) / 30 22km
R485_ID41h
.
Sig
.
TotalBatterySOC
=
0x2C
;
//电量
R485_ID41h
.
Sig
.
VehicleStatus
=
0x3
;
//整车状态
R485_ID41h
.
Sig
.
SpeedGear
=
0x1
;
//挡位
...
...
@@ -754,6 +754,19 @@ uint32_t R485_Send_0x42(void)
break
;
case
9
:
break
;
case
10
:
break
;
case
11
:
break
;
case
12
:
break
;
case
13
:
break
;
case
14
:
R485_ID42h
.
Sig
.
PasswordUnlockCommand
=
0x1
;
R485_ID42h
.
Sig
.
PasswordCanbeEnter
=
0x2
;
break
;
default:
break
;
}
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.c
View file @
302a192b
...
...
@@ -74,7 +74,13 @@ void RTE_GPIO_Init(void)
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_AP0
;
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_14
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_PORT
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_IN
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_OUT
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
GPIO_Config
(
&
gpio_temp
);
//Pin0-14 LJS 电压采集 正控7
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_AP0
;
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_13
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_PORT
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_OUT
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
GPIO_Config
(
&
gpio_temp
);
//Pin0-14 LJS 电压采集 正控7
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_0
;
...
...
@@ -108,6 +114,10 @@ void RTE_GPIO_Init(void)
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
GPIO_Config
(
&
gpio_temp
);
queren
=
0
;
LINE_OUT_POS_06
=
0
;
LINE_OUT_POS_07
=
0
;
LINE_OUT_NEG_01
=
1
;
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
View file @
302a192b
...
...
@@ -18,8 +18,8 @@
#define LED6 GPIO_OUT_PORT10_PIN06
#define LED7 GPIO_OUT_PORT10_PIN06
#define LCDAL GPIO_IN_APORT00_PIN13
#define LCDAR GPIO_IN_APORT00_PIN14
//
#define LCDAL GPIO_IN_APORT00_PIN13
//
#define LCDAR GPIO_IN_APORT00_PIN14
#define SW1 GPIO_IN_APORT00_PIN00
#define SW2 GPIO_IN_PORT10_PIN05
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
302a192b
...
...
@@ -178,8 +178,12 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
LINE_OUT_NEG_04
=
1
;
R485_Send_0x80
();
blename
[
4
]
=
0xFF
;
if
(
startIGONtime
>=
100
)
{
R485_Send_0x80
();
blename
[
4
]
=
0xFF
;
}
}
}
...
...
@@ -374,7 +378,7 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
}
if
(
Auto_ONOFF
==
1
)
{
if
(
ONOFFtime
<=
42
0
)
if
(
ONOFFtime
<=
20
0
)
{
ONOFFtime
++
;
}
...
...
@@ -384,11 +388,13 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
if
(
LINE_OUT_NEG_01
==
1
)
{
LINE_OUT_NEG_01
=
0
;
LINE_OUT_NEG_04
=
0
;
ONOFFtime
=
0
;
}
else
{
LINE_OUT_NEG_01
=
1
;
LINE_OUT_NEG_04
=
1
;
ONOFFtime
=
0
;
}
}
...
...
@@ -442,13 +448,13 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
}
flashtime
=
0
;
}
if
(
recvflag111
==
1
)
{
blename
[
4
]
=
0xff
;
General_Number_Disp
(
blename
,
3
,
165
);
recvflag111
=
0
;
//
if(recvflag111 == 1)
//
{
//
blename[4] = 0xff;
//
General_Number_Disp(blename, 3, 165);
//
recvflag111 = 0;
}
//
}
}
if
(
firstpowerflag
==
1
)
...
...
YueJin_test_bench/source/Appliciation/api_RS485.c
View file @
302a192b
...
...
@@ -330,6 +330,7 @@ uint32_t R485_Send(const uint16_t cmdID, const uint8_t* pData, uint8_t len)
uint8_t
sendmsgAll
[
8
];
uint32_t
sendnum
=
1
;
uint8_t
getbanbenhaoflag
=
0
;
void
RS485_User_Tx_Data
(
void
)
{
...
...
@@ -443,6 +444,7 @@ void RS485_User_Tx_Data(void)
}
#endif
// #if(getbanbenhaoflag == 0)
#if(1)
uint8_t
flag
=
0
;
uint32_t
sendfinishflag
=
0
;
...
...
@@ -500,14 +502,34 @@ void RS485_User_Tx_Data(void)
RS485_TX_finish
=
1
;
if
(
RS485_TX_finish
==
1
)
{
RS485_send_num
=
0
;
// if(MENU_CHECK_STEP == 3)
// {
// RS485_send_num += 2;
// }
// else
// {
RS485_send_num
=
0
;
// }
}
}
break
;
case
4
:
sendfinishflag
=
R485_Send_0x80
();
if
(
sendfinishflag
==
0
)
{
RS485_send_time
=
0
;
RS485_TX_finish
=
1
;
if
(
RS485_TX_finish
==
1
)
{
RS485_send_num
++
;
}
}
default:
flag
=
1
;
RS485_send_time
=
0
;
RS485_send_num
=
0
;
getbanbenhaoflag
=
1
;
break
;
}
...
...
YueJin_test_bench/source/System/init.c
View file @
302a192b
...
...
@@ -94,7 +94,7 @@ void Sys_Startup_Init(void)
loc_config
.
pfnUARTErrHandleCallBack
=
0
;
loc_config
.
pfnUARTReadMsgCallBack
=
UART_Put
;
firstIGON
=
1
;
UART_Init
(
UART_RLIN30
,
&
loc_config
);
UART_Init
(
UART_RLIN30
,
&
loc_config
);
loc_config
.
enUARTLINMode
=
MODE_UART
;
loc_config
.
u32UARTbps
=
9600
;
loc_config
.
enUARTOrder
=
UART_LSB
;
...
...
@@ -108,8 +108,9 @@ void Sys_Startup_Init(void)
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
LINE_OUT_NEG_04
=
1
;
Display_TFT_Clear
();
GUI_Display_Version_Code_Service
(
25
,
20
,
"Please Scan The Code "
,
Letter_Num_11
,
PCodeText_Space_size
);
// Display_TFT_Clear();
// GUI_Display_Version_Code_Service(25, 20, "Please Scan The Code ", Letter_Num_11, PCodeText_Space_size);
firstpowerflag
=
2
;
}
/***********************************************************************
...
...
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