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
61bd4142
Commit
61bd4142
authored
Feb 03, 2026
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:265检测与光感
parent
062173ea
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
166 additions
and
117 deletions
+166
-117
Barcode_Scanner.c
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
+7
-18
Barcode_Scanner.h
YueJin_test_bench/source/Appliciation/Barcode_Scanner.h
+10
-1
Check_Ctrl.c
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
+8
-8
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+111
-3
R485_Communication_Matrix.c
...est_bench/source/Appliciation/R485_Communication_Matrix.c
+8
-3
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+1
-63
api_RS485.c
YueJin_test_bench/source/Appliciation/api_RS485.c
+16
-17
api_RS485.h
YueJin_test_bench/source/Appliciation/api_RS485.h
+1
-0
init.c
YueJin_test_bench/source/System/init.c
+4
-4
No files found.
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
View file @
61bd4142
...
@@ -47,7 +47,6 @@ uint8_t line_stdio = 2;
...
@@ -47,7 +47,6 @@ uint8_t line_stdio = 2;
uint8_t
powerstdio
=
0
;
uint8_t
powerstdio
=
0
;
uint8_t
get_num_buf
[
34
];
uint8_t
get_num_buf
[
34
];
uint8_t
mimaread
[
35
];
uint8_t
mimaread
[
35
];
uint8_t
comparestart
;
uint8_t
blename
[
5
];
uint8_t
blename
[
5
];
uint8_t
btmac
[
6
];
uint8_t
btmac
[
6
];
uint8_t
firstpowerflag
=
0
;
uint8_t
firstpowerflag
=
0
;
...
@@ -438,12 +437,19 @@ void datacheck(void)
...
@@ -438,12 +437,19 @@ void datacheck(void)
}
}
}
}
uint8_t
cmpresult
=
3
;
uint8_t
cmpresult
=
3
;
uint8_t
Vehicle_Type
;
uint8_t
entertime
=
0
;
void
BarCodeDataGet
(
void
)
void
BarCodeDataGet
(
void
)
{
{
if
((
mDataBufPtr1
[
0
]
==
0x59
)
&&
(
mDataBufPtr1
[
1
]
==
0x59
)
&&
(
mDataBufPtr1
[
39
]
!=
0x0
))
if
((
mDataBufPtr1
[
0
]
==
0x59
)
&&
(
mDataBufPtr1
[
1
]
==
0x59
)
&&
(
mDataBufPtr1
[
39
]
!=
0x0
))
{
{
memcpy
(
barcode_Msg
,
&
mDataBufPtr1
[
6
],
34
);
memcpy
(
barcode_Msg
,
&
mDataBufPtr1
[
6
],
34
);
memcpy
(
barcode_Msg1
,
&
mDataBufPtr1
[
6
],
34
);
memcpy
(
barcode_Msg1
,
&
mDataBufPtr1
[
6
],
34
);
if
((
mDataBufPtr1
[
12
]
==
0x41
)
&&
(
mDataBufPtr1
[
13
]
==
0x32
)
&&
(
mDataBufPtr1
[
14
]
==
0x36
)
&&
(
mDataBufPtr1
[
15
]
==
0x35
))
{
Vehicle_Type
=
TFT_A265
;
}
}
}
else
else
{
{
...
@@ -455,23 +461,6 @@ void BarCodeDataGet(void)
...
@@ -455,23 +461,6 @@ void BarCodeDataGet(void)
uint8_t
GetDataCompare
(
void
)
uint8_t
GetDataCompare
(
void
)
{
{
for
(
int
i
=
0
;
i
<
34
;
i
++
)
{
if
(
get_num_buf
[
i
]
==
barcode_Msg1
[
i
]
)
{
cmpresult
=
0
;
// u8compareresult = 0;
}
else
{
cmpresult
=
1
;
return
cmpresult
;
// u8compareresult = 1;
}
}
return
cmpresult
;
}
}
void
UART_Put
(
uint32_t
Value
)
void
UART_Put
(
uint32_t
Value
)
{
{
...
...
YueJin_test_bench/source/Appliciation/Barcode_Scanner.h
View file @
61bd4142
...
@@ -4,6 +4,14 @@
...
@@ -4,6 +4,14 @@
#include "TYW_stdint.h"
#include "TYW_stdint.h"
#include "api_RS485.h"
#include "api_RS485.h"
#include "R485_Communication_Matrix.h"
#include "R485_Communication_Matrix.h"
typedef
enum
{
TFT_G389
=
0
,
TFT_A265
,
}
VehicleType
;
void
UART_Put
(
uint32_t
Value
);
void
UART_Put
(
uint32_t
Value
);
void
UART_Put1
(
uint32_t
Value
);
void
UART_Put1
(
uint32_t
Value
);
void
UART_Put2
(
uint32_t
Value
);
void
UART_Put2
(
uint32_t
Value
);
...
@@ -32,7 +40,6 @@ extern uint8_t line_stdio;
...
@@ -32,7 +40,6 @@ extern uint8_t line_stdio;
extern
uint8_t
checknumwrong
;
extern
uint8_t
checknumwrong
;
extern
uint8_t
powerstdio
;
extern
uint8_t
powerstdio
;
extern
uint8_t
Auto_ONOFF
;
extern
uint8_t
Auto_ONOFF
;
extern
uint8_t
comparestart
;
extern
uint8_t
connectbleFlag
;
extern
uint8_t
connectbleFlag
;
extern
uint8_t
get_num_buf
[
34
];
extern
uint8_t
get_num_buf
[
34
];
extern
uint8_t
blename
[
5
];
extern
uint8_t
blename
[
5
];
...
@@ -43,4 +50,6 @@ extern uint8_t btmac[6];
...
@@ -43,4 +50,6 @@ extern uint8_t btmac[6];
extern
uint8_t
writeflag
;
extern
uint8_t
writeflag
;
extern
uint8_t
saomafinish
;
extern
uint8_t
saomafinish
;
extern
uint8_t
mimaread
[
35
];
extern
uint8_t
mimaread
[
35
];
extern
uint8_t
Vehicle_Type
;
extern
uint8_t
entertime
;
#endif
#endif
\ No newline at end of file
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
View file @
61bd4142
...
@@ -73,16 +73,17 @@ void MENU_CHECK_STEP_ADD(void)
...
@@ -73,16 +73,17 @@ void MENU_CHECK_STEP_ADD(void)
{
{
if
(
jiaoyan
==
1
)
if
(
jiaoyan
==
1
)
{
{
MENU_CHECK_STEP
++
;
if
(
guangganflag
==
3
)
//光感锁
{
if
(
MENU_CHECK_STEP
>
14
)
MENU_CHECK_STEP
++
;
}
if
(
MENU_CHECK_STEP
>
9
)
//循环
{
{
MENU_CHECK_STEP
=
0
;
MENU_CHECK_STEP
=
0
;
guangganflag
=
0
;
}
}
// if((guangganflag == 2 || guangganflag == 1 ) && guangganflag != 3)
// {
// MENU_CHECK_STEP = 3;
// }
if
(
CurrentWrong
==
1
)
if
(
CurrentWrong
==
1
)
{
{
MENU_CHECK_STEP
=
1
;
MENU_CHECK_STEP
=
1
;
...
@@ -363,7 +364,6 @@ uint8_t yibiaoshuju[34];
...
@@ -363,7 +364,6 @@ uint8_t yibiaoshuju[34];
// yibiaoshuju[34] = 0xFF;
// yibiaoshuju[34] = 0xFF;
// General_Number_Disp(yibiaoshuju, 3, 165);
// General_Number_Disp(yibiaoshuju, 3, 165);
// zhenduanflag = 3;
// zhenduanflag = 3;
// comparestart = 1;
break
;
break
;
case
2
:
case
2
:
// POWER_CTRL_KL30 = 0u; //B+
// POWER_CTRL_KL30 = 0u; //B+
...
...
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
61bd4142
...
@@ -25,6 +25,92 @@ const unsigned char gImage_cuo11[] = {24, 24,0X00,0X00,0X00,0X00,0X30,0X70,0XE0,
...
@@ -25,6 +25,92 @@ const unsigned char gImage_cuo11[] = {24, 24,0X00,0X00,0X00,0X00,0X30,0X70,0XE0,
const unsigned char gImage_dui11[] = {24, 24,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X80,0XC0,0XE0,0X40,0X00,0X00,0X00,0X00,0X08,0X18,0X30,0X70,0XC0,0X80,0X00,0X00,0X80,0XC0,0XE0,0X70,0X38,0X1C,0X0E,0X07,0X03,0X01,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0X03,0X07,0X03,0X01,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,};
const unsigned char gImage_dui11[] = {24, 24,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X80,0XC0,0XE0,0X40,0X00,0X00,0X00,0X00,0X08,0X18,0X30,0X70,0XC0,0X80,0X00,0X00,0X80,0XC0,0XE0,0X70,0X38,0X1C,0X0E,0X07,0X03,0X01,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0X03,0X07,0X03,0X01,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,};
const uint16_t ODODigitNum09PosXlight [] = {220,210,200,190,180,170};
const uint16_t ODODigitNum09PosXlight [] = {220,210,200,190,180,170};
//const uint16_t BackLightDigitNum09PosX[] = {30*9, 30*8, 30*7, 30*6, 30*5, 30*4, 30*3, 30*2, 30*1, 30*0};
//const uint16_t BackLightDigitNum09PosX[] = {30*9, 30*8, 30*7, 30*6, 30*5, 30*4, 30*3, 30*2, 30*1, 30*0};
//光感输出检测
const unsigned char gImage_YedeaX0_Y0_1[]={/*Byte Size392*/
130U,24U,
0X00U,0X00U,0X10U,0X20U,0Xc0U,0X00U,0X00U,0X00U,0X00U,0Xf8U,0X00U,0X00U,0X00U,0X00U,0X00U,0Xc0U,
0X38U,0X10U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0Xf0U,0X90U,0X90U,0X90U,0X90U,0X90U,0X90U,0X90U,
0X90U,0X10U,0X3eU,0Xd0U,0X14U,0X14U,0X14U,0Xd8U,0X50U,0X10U,0X00U,0X00U,0X20U,0X20U,0Xe0U,0X3cU,
0X20U,0X20U,0X20U,0X00U,0X80U,0Xc0U,0X40U,0X20U,0X18U,0X18U,0X20U,0X40U,0X40U,0X80U,0X80U,0X00U,
0X00U,0X00U,0X00U,0X00U,0X00U,0Xe0U,0X00U,0X00U,0X00U,0X00U,0X00U,0Xf8U,0X00U,0X00U,0X00U,0X00U,
0X00U,0X00U,0Xe0U,0X00U,0X00U,0X00U,0X00U,0X00U,0X80U,0X80U,0X80U,0Xf8U,0X80U,0X80U,0X80U,0X00U,
0X00U,0X00U,0X80U,0X60U,0X10U,0X18U,0X60U,0X80U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0X08U,
0X18U,0X10U,0X20U,0X00U,0Xf0U,0X10U,0X10U,0X90U,0X10U,0X10U,0Xf0U,0X00U,0X00U,0Xe0U,0X00U,0X00U,
0Xf8U,0X00U,0X08U,0X08U,0X08U,0X08U,0X0bU,0X09U,0Xf8U,0X08U,0X08U,0X0fU,0X08U,0X08U,0Xf8U,0X0aU,
0X0bU,0X08U,0X08U,0X08U,0X08U,0X08U,0X00U,0X00U,0X40U,0Xb0U,0X0fU,0X00U,0X00U,0X7cU,0X44U,0X44U,
0X44U,0X44U,0X7cU,0X80U,0X80U,0X47U,0X38U,0X68U,0X46U,0X81U,0X80U,0X70U,0X00U,0X00U,0X10U,0X1cU,
0X13U,0X10U,0XffU,0X10U,0X91U,0X01U,0Xf8U,0X49U,0X49U,0X49U,0Xf9U,0X01U,0X01U,0Xf9U,0X01U,0X01U,
0XfcU,0X01U,0X01U,0X00U,0X00U,0X00U,0Xe0U,0X0fU,0X08U,0X08U,0X08U,0X08U,0X08U,0XffU,0X08U,0X08U,
0X08U,0X08U,0X08U,0X08U,0X0fU,0Xe0U,0X00U,0X00U,0X00U,0X00U,0X80U,0X60U,0X18U,0XffU,0X08U,0X30U,
0X2cU,0X06U,0X63U,0X85U,0X04U,0X04U,0X24U,0Xc4U,0X04U,0X04U,0X85U,0X63U,0X26U,0X04U,0X00U,0X00U,
0X02U,0X06U,0X04U,0X88U,0X88U,0X00U,0XffU,0X00U,0X00U,0XffU,0X00U,0X00U,0XffU,0X00U,0X00U,0XffU,
0X00U,0X00U,0XffU,0X00U,0X20U,0X20U,0X10U,0X18U,0X0cU,0X03U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,
0X1fU,0X20U,0X20U,0X20U,0X20U,0X20U,0X20U,0X1eU,0X00U,0X00U,0X40U,0X60U,0X18U,0X04U,0X00U,0X3eU,
0X40U,0X40U,0X41U,0X43U,0X44U,0X58U,0X48U,0X40U,0X40U,0X38U,0X02U,0X0cU,0X30U,0X20U,0X00U,0X00U,
0X02U,0X02U,0X02U,0X03U,0X3fU,0X01U,0X01U,0X00U,0X7fU,0X02U,0X42U,0X42U,0X3fU,0X00U,0X00U,0X27U,
0X20U,0X20U,0X1fU,0X00U,0X00U,0X00U,0X00U,0X00U,0X1fU,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X1fU,
0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X3fU,0X00U,0X00U,0X00U,0X00U,0X03U,0X00U,0X00U,0X3fU,
0X00U,0X00U,0X10U,0X10U,0X10U,0X13U,0X10U,0X10U,0X10U,0X13U,0X18U,0X16U,0X11U,0X10U,0X10U,0X00U,
0X00U,0X00U,0X00U,0X60U,0X1cU,0X03U,0X00U,0X40U,0X23U,0X10U,0X0cU,0X03U,0X08U,0X10U,0X63U,0X40U,
0X00U,0X43U,0X40U,0X40U,0X3fU,0X00U,};
//光感输出异常
const unsigned char gImage_YedeaX0_Y0_2[]={/*Byte Size392*/
130U,24U,
0X00U,0X00U,0X10U,0X20U,0Xc0U,0X00U,0X00U,0X00U,0X00U,0Xf8U,0X00U,0X00U,0X00U,0X00U,0X00U,0Xc0U,
0X38U,0X10U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0Xf0U,0X90U,0X90U,0X90U,0X90U,0X90U,0X90U,0X90U,
0X90U,0X10U,0X3eU,0Xd0U,0X14U,0X14U,0X14U,0Xd8U,0X50U,0X10U,0X00U,0X00U,0X20U,0X20U,0Xe0U,0X3cU,
0X20U,0X20U,0X20U,0X00U,0X80U,0Xc0U,0X40U,0X20U,0X18U,0X18U,0X20U,0X40U,0X40U,0X80U,0X80U,0X00U,
0X00U,0X00U,0X00U,0X00U,0X00U,0Xe0U,0X00U,0X00U,0X00U,0X00U,0X00U,0Xf8U,0X00U,0X00U,0X00U,0X00U,
0X00U,0X00U,0Xe0U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0Xf0U,0X10U,0X10U,0X10U,0X10U,0X10U,
0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0Xf0U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,
0Xc0U,0X48U,0X58U,0X60U,0X40U,0X40U,0X40U,0X40U,0X7cU,0X40U,0X40U,0X40U,0X40U,0X70U,0X48U,0X48U,
0Xc0U,0X00U,0X08U,0X08U,0X08U,0X08U,0X0bU,0X09U,0Xf8U,0X08U,0X08U,0X0fU,0X08U,0X08U,0Xf8U,0X0aU,
0X0bU,0X08U,0X08U,0X08U,0X08U,0X08U,0X00U,0X00U,0X40U,0Xb0U,0X0fU,0X00U,0X00U,0X7cU,0X44U,0X44U,
0X44U,0X44U,0X7cU,0X80U,0X80U,0X47U,0X38U,0X68U,0X46U,0X81U,0X80U,0X70U,0X00U,0X00U,0X10U,0X1cU,
0X13U,0X10U,0XffU,0X10U,0X91U,0X01U,0Xf8U,0X49U,0X49U,0X49U,0Xf9U,0X01U,0X01U,0Xf9U,0X01U,0X01U,
0XfcU,0X01U,0X01U,0X00U,0X00U,0X00U,0Xe0U,0X0fU,0X08U,0X08U,0X08U,0X08U,0X08U,0XffU,0X08U,0X08U,
0X08U,0X08U,0X08U,0X08U,0X0fU,0Xe0U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0X0fU,0X11U,0X11U,0Xd1U,
0X11U,0X11U,0X11U,0X11U,0X11U,0X11U,0X11U,0X11U,0Xd1U,0X11U,0X11U,0X10U,0X0cU,0X00U,0X00U,0X00U,
0X00U,0X00U,0X01U,0X00U,0X00U,0X1fU,0X11U,0X11U,0X11U,0X11U,0Xf1U,0X11U,0X11U,0X11U,0X11U,0X1fU,
0X00U,0X00U,0X01U,0X00U,0X20U,0X20U,0X10U,0X18U,0X0cU,0X03U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,
0X1fU,0X20U,0X20U,0X20U,0X20U,0X20U,0X20U,0X1eU,0X00U,0X00U,0X40U,0X60U,0X18U,0X04U,0X00U,0X3eU,
0X40U,0X40U,0X41U,0X43U,0X44U,0X58U,0X48U,0X40U,0X40U,0X38U,0X02U,0X0cU,0X30U,0X20U,0X00U,0X00U,
0X02U,0X02U,0X02U,0X03U,0X3fU,0X01U,0X01U,0X00U,0X7fU,0X02U,0X42U,0X42U,0X3fU,0X00U,0X00U,0X27U,
0X20U,0X20U,0X1fU,0X00U,0X00U,0X00U,0X00U,0X00U,0X1fU,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X1fU,
0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X3fU,0X00U,0X00U,0X00U,0X00U,0X42U,0X42U,0X22U,0X12U,
0X0eU,0X03U,0X02U,0X02U,0X02U,0X02U,0X02U,0X02U,0X02U,0X02U,0X7fU,0X02U,0X02U,0X02U,0X02U,0X02U,
0X00U,0X00U,0X00U,0X00U,0X00U,0X3fU,0X01U,0X01U,0X01U,0X01U,0X01U,0X01U,0X7fU,0X01U,0X01U,0X21U,
0X21U,0X21U,0X21U,0X1fU,0X00U,0X00U,};
//光感输出正常
const unsigned char gImage_YedeaX0_Y0_3[]={/*Byte Size392*/
130U,24U,
0X00U,0X00U,0X10U,0X20U,0Xc0U,0X00U,0X00U,0X00U,0X00U,0Xf8U,0X00U,0X00U,0X00U,0X00U,0X00U,0Xc0U,
0X38U,0X10U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0Xf0U,0X90U,0X90U,0X90U,0X90U,0X90U,0X90U,0X90U,
0X90U,0X10U,0X3eU,0Xd0U,0X14U,0X14U,0X14U,0Xd8U,0X50U,0X10U,0X00U,0X00U,0X20U,0X20U,0Xe0U,0X3cU,
0X20U,0X20U,0X20U,0X00U,0X80U,0Xc0U,0X40U,0X20U,0X18U,0X18U,0X20U,0X40U,0X40U,0X80U,0X80U,0X00U,
0X00U,0X00U,0X00U,0X00U,0X00U,0Xe0U,0X00U,0X00U,0X00U,0X00U,0X00U,0Xf8U,0X00U,0X00U,0X00U,0X00U,
0X00U,0X00U,0Xe0U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,
0X10U,0X10U,0Xf0U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X00U,0X00U,0X00U,0X00U,0X00U,
0Xc0U,0X48U,0X58U,0X60U,0X40U,0X40U,0X40U,0X40U,0X7cU,0X40U,0X40U,0X40U,0X40U,0X70U,0X48U,0X48U,
0Xc0U,0X00U,0X08U,0X08U,0X08U,0X08U,0X0bU,0X09U,0Xf8U,0X08U,0X08U,0X0fU,0X08U,0X08U,0Xf8U,0X0aU,
0X0bU,0X08U,0X08U,0X08U,0X08U,0X08U,0X00U,0X00U,0X40U,0Xb0U,0X0fU,0X00U,0X00U,0X7cU,0X44U,0X44U,
0X44U,0X44U,0X7cU,0X80U,0X80U,0X47U,0X38U,0X68U,0X46U,0X81U,0X80U,0X70U,0X00U,0X00U,0X10U,0X1cU,
0X13U,0X10U,0XffU,0X10U,0X91U,0X01U,0Xf8U,0X49U,0X49U,0X49U,0Xf9U,0X01U,0X01U,0Xf9U,0X01U,0X01U,
0XfcU,0X01U,0X01U,0X00U,0X00U,0X00U,0Xe0U,0X0fU,0X08U,0X08U,0X08U,0X08U,0X08U,0XffU,0X08U,0X08U,
0X08U,0X08U,0X08U,0X08U,0X0fU,0Xe0U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,0XfcU,0X00U,0X00U,
0X00U,0X00U,0X00U,0X00U,0XffU,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X00U,0X00U,0X00U,0X00U,
0X00U,0X00U,0X01U,0X00U,0X00U,0X1fU,0X11U,0X11U,0X11U,0X11U,0Xf1U,0X11U,0X11U,0X11U,0X11U,0X1fU,
0X00U,0X00U,0X01U,0X00U,0X20U,0X20U,0X10U,0X18U,0X0cU,0X03U,0X00U,0X00U,0X00U,0X00U,0X00U,0X00U,
0X1fU,0X20U,0X20U,0X20U,0X20U,0X20U,0X20U,0X1eU,0X00U,0X00U,0X40U,0X60U,0X18U,0X04U,0X00U,0X3eU,
0X40U,0X40U,0X41U,0X43U,0X44U,0X58U,0X48U,0X40U,0X40U,0X38U,0X02U,0X0cU,0X30U,0X20U,0X00U,0X00U,
0X02U,0X02U,0X02U,0X03U,0X3fU,0X01U,0X01U,0X00U,0X7fU,0X02U,0X42U,0X42U,0X3fU,0X00U,0X00U,0X27U,
0X20U,0X20U,0X1fU,0X00U,0X00U,0X00U,0X00U,0X00U,0X1fU,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X1fU,
0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X3fU,0X00U,0X00U,0X00U,0X00U,0X10U,0X10U,0X10U,0X1fU,
0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X1fU,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,0X10U,
0X00U,0X00U,0X00U,0X00U,0X00U,0X3fU,0X01U,0X01U,0X01U,0X01U,0X01U,0X01U,0X7fU,0X01U,0X01U,0X21U,
0X21U,0X21U,0X21U,0X1fU,0X00U,0X00U,};
//坐垫感应功能开启
//坐垫感应功能开启
const unsigned char gImage_icon_01X16_Y16[]={/*Byte Size834*/
const unsigned char gImage_icon_01X16_Y16[]={/*Byte Size834*/
208U,32U,
208U,32U,
...
@@ -4846,15 +4932,37 @@ void Display_Version_Info(uint32_t ON_OFF)
...
@@ -4846,15 +4932,37 @@ void Display_Version_Info(uint32_t ON_OFF)
TFT_LCD_Draw_Bmp(3, 50+30, ( uint8_t * )gImage_Dyy_words_2X6_Y46 ); //硬件版本号
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(0, 70+30, ( uint8_t * )gImage_Dyy_words_3X6_Y75 ); //零件号
TFT_LCD_Draw_Bmp(3, 90+30+30, ( uint8_t * )gImage_
gImage_dianyuanwaifX6_Y165 ); //仪表电电源检测外发对比检验
TFT_LCD_Draw_Bmp(3, 90+30+30, ( uint8_t * )gImage_
YedeaX0_Y0_1 ); //光感输出检测
if(
powerstdio
== 1)
if(
Light_Out
== 1)
{
{
if(guangganflag == 0)
{
guangganflag = 1;
}
else if(guangganflag == 2)
{
guangganflag = 3;
}
TFT_LCD_Draw_Bmp(200, 90+40+30, ( uint8_t * )gImage_cuo ); //仪表电电源检测外发对比检验 错
TFT_LCD_Draw_Bmp(200, 90+40+30, ( uint8_t * )gImage_cuo ); //仪表电电源检测外发对比检验 错
}
}
else
else
{
{
TFT_LCD_Draw_Bmp(200, 90+40+30, ( uint8_t * )gImage_dui ); //仪表电电源检测外发对比检验 对
TFT_LCD_Draw_Bmp(200, 90+40+30, ( uint8_t * )gImage_dui ); //仪表电电源检测外发对比检验 对
if(guangganflag == 1)
{
guangganflag = 2;
}
}
if(guangganflag == 3)
{
TFT_LCD_Draw_Bmp(3, 90+30+30+30, ( uint8_t * )gImage_YedeaX0_Y0_3); //光感输出正常
}
}
else
{
TFT_LCD_Draw_Bmp(3, 90+30+30+30, ( uint8_t * )gImage_YedeaX0_Y0_2); //光感输出异常
}
TFT_LCD_Draw_Bmp(3, 90+25+25+35+30, ( uint8_t * )gImage_gImage_yibiaowaif1X6_Y16 ); //仪表外发对比检验
TFT_LCD_Draw_Bmp(3, 90+25+25+35+30, ( uint8_t * )gImage_gImage_yibiaowaif1X6_Y16 ); //仪表外发对比检验
if(checknumwrong == 1)
if(checknumwrong == 1)
{
{
...
@@ -4925,7 +5033,7 @@ void Display_Version_Info(uint32_t ON_OFF)
...
@@ -4925,7 +5033,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(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(210, 160, ( uint8_t * )gImage_Alarm_13_ImageX222_Y166); //%
TFT_LCD_Draw_Bmp(3, 290, ( uint8_t * )gImage_gImage_checkVX6_Y165 ); //检测台版本号
TFT_LCD_Draw_Bmp(3, 290, ( uint8_t * )gImage_gImage_checkVX6_Y165 ); //检测台版本号
uint8_t mbuff [7] = {2,6,0,
1,1,5
,0xff};
uint8_t mbuff [7] = {2,6,0,
2,0,3
,0xff};
General_Number_Disp(mbuff, 160, 290);
General_Number_Disp(mbuff, 160, 290);
}
}
...
...
YueJin_test_bench/source/Appliciation/R485_Communication_Matrix.c
View file @
61bd4142
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
#include "string.h"
#include "string.h"
#include "Key.h"
#include "Key.h"
#include "Display_Info.h"
#include "Display_Info.h"
#include "Barcode_Scanner.h"
uint8_t
barcode_Msg
[
64
];
uint8_t
barcode_Msg
[
64
];
uint8_t
barcode_Msg1
[
64
];
uint8_t
barcode_Msg1
[
64
];
uint8_t
name1
=
0
;
uint8_t
name1
=
0
;
...
@@ -698,12 +700,15 @@ uint32_t R485_Send_0xA4(void)
...
@@ -698,12 +700,15 @@ uint32_t R485_Send_0xA4(void)
uint32_t
R485_Send_0xC4
(
void
)
//菜单设置收发
uint32_t
R485_Send_0xC4
(
void
)
//菜单设置收发
{
{
memset
(
R485_ID
C4h
.
Msg
,
0xFF
,
1
);
memset
(
R485_ID
B2h
.
Msg
,
0xFF
,
RS485_RX_ID0XB2_DATA_LEN
);
R485_IDC4h
.
Sig
.
Invalid_characterssecond
=
0x01
;
if
(
Vehicle_Type
==
TFT_A265
)
{
R485_IDB2h
.
Sig
.
VehicleType
=
0x00
;
}
uint32_t
u32sendendflag
=
0
;
uint32_t
u32sendendflag
=
0
;
u32sendendflag
=
R485_Send
(
0x
C4
,
R485_IDC4h
.
Msg
,
sizeof
(
R485_IDC4
h
.
Msg
));
u32sendendflag
=
R485_Send
(
0x
B2
,
R485_IDB2h
.
Msg
,
sizeof
(
R485_IDB2
h
.
Msg
));
return
u32sendendflag
;
return
u32sendendflag
;
}
}
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
61bd4142
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
------------------------------------------------------------------------------*/
------------------------------------------------------------------------------*/
uint8_t
AutoFlag
=
0
;
uint8_t
AutoFlag
=
0
;
uint8_t
compareresult
;
const
unsigned
char
gImage_cuo1
[]
=
{
24
,
24
,
0X00
,
0X00
,
0X00
,
0X00
,
0X30
,
0X70
,
0XE0
,
0XC0
,
0X80
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X80
,
0XC0
,
0X70
,
0X30
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X83
,
0XC7
,
0X66
,
0X38
,
0X38
,
0X7C
,
0XE6
,
0XC3
,
0X81
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X0C
,
0X0C
,
0X06
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X03
,
0X07
,
0X0E
,
0X0C
,
0X00
,
0X00
,
0X00
,
0X00
,};
const
unsigned
char
gImage_cuo1
[]
=
{
24
,
24
,
0X00
,
0X00
,
0X00
,
0X00
,
0X30
,
0X70
,
0XE0
,
0XC0
,
0X80
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X80
,
0XC0
,
0X70
,
0X30
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X83
,
0XC7
,
0X66
,
0X38
,
0X38
,
0X7C
,
0XE6
,
0XC3
,
0X81
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X0C
,
0X0C
,
0X06
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X03
,
0X07
,
0X0E
,
0X0C
,
0X00
,
0X00
,
0X00
,
0X00
,};
const
unsigned
char
gImage_dui1
[]
=
{
24
,
24
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X40
,
0X00
,
0X00
,
0X00
,
0X00
,
0X08
,
0X18
,
0X30
,
0X70
,
0XC0
,
0X80
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X70
,
0X38
,
0X1C
,
0X0E
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X03
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,};
const
unsigned
char
gImage_dui1
[]
=
{
24
,
24
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X40
,
0X00
,
0X00
,
0X00
,
0X00
,
0X08
,
0X18
,
0X30
,
0X70
,
0XC0
,
0X80
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X70
,
0X38
,
0X1C
,
0X0E
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X03
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,};
void
Sys_Run_Mode_Pseudo_Real_Time_Tasks
(
void
)
void
Sys_Run_Mode_Pseudo_Real_Time_Tasks
(
void
)
...
@@ -212,38 +211,7 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
...
@@ -212,38 +211,7 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
}
}
else
else
{
{
if
(
comparestart
==
1
)
Total_Check
(
);
{
compareresult
=
GetDataCompare
();
if
(
compareresult
==
1
)
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
40
,
(
uint8_t
*
)
gImage_cuo1
);
}
else
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
40
,
(
uint8_t
*
)
gImage_dui1
);
}
comparestart
=
0
;
}
else
if
(
comparestart
==
0
)
{
Total_Check
(
);
if
(
zhenduanflag
==
3
)
{
if
(
compareresult
==
1
)
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
40
,
(
uint8_t
*
)
gImage_cuo1
);
}
else
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
40
,
(
uint8_t
*
)
gImage_dui1
);
}
}
}
else
{
Total_Check
();
}
flashtime
=
0
;
flashtime
=
0
;
}
}
}
}
...
@@ -254,37 +222,7 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
...
@@ -254,37 +222,7 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
Total_Check
();
Total_Check
();
firstpowerflag
=
2
;
firstpowerflag
=
2
;
Display_TFT_Clear
();
Display_TFT_Clear
();
if
(
compareresult
==
1
&&
comparestart
==
0
)
{
if
(
compareresult
==
1
)
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
40
,
(
uint8_t
*
)
gImage_cuo1
);
}
else
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
40
,
(
uint8_t
*
)
gImage_dui1
);
}
Total_Check
();
firstpowerflag
=
3
;
}
}
}
else
{
if
(
compareresult
==
1
)
{
Total_Check
();
firstpowerflag
=
3
;
zhenduanflag
=
Data_Mode_Read
;
if
(
compareresult
==
1
)
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
40
,
(
uint8_t
*
)
gImage_cuo1
);
}
else
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
40
,
(
uint8_t
*
)
gImage_dui1
);
}
}
}
}
}
/*=================================================================*/
/*=================================================================*/
...
...
YueJin_test_bench/source/Appliciation/api_RS485.c
View file @
61bd4142
...
@@ -524,23 +524,22 @@ uint8_t RS485_User_Tx_Data(void)
...
@@ -524,23 +524,22 @@ uint8_t RS485_User_Tx_Data(void)
}
}
break
;
break
;
// case RS485_Tx_IDC4_Idx:
case
RS485_Tx_IDB2_Idx
:
// if(MENU_CHECK_STEP == 0)
if
(
MENU_CHECK_STEP
==
0
)
// {
{
// sendfinishflag = R485_Send_0xC4();
sendfinishflag
=
R485_Send_0xC4
();
// RS485_TX_finish = 1;
RS485_TX_finish
=
1
;
// if(sendfinishflag == 0)
if
(
sendfinishflag
==
0
)
// {
{
// RS485_send_time = 0;
RS485_send_time
=
0
;
// RS485_TxControl.sendIndex ++;
RS485_TxControl
.
sendIndex
++
;
// }
}
// }
}
// else
else
// {
{
// RS485_TxControl.sendIndex ++;
RS485_TxControl
.
sendIndex
++
;
// }
}
// break;
break
;
case
RS485_Tx_IDD0_Idx
:
case
RS485_Tx_IDD0_Idx
:
sendfinishflag
=
R485_Send_0xD0
();
sendfinishflag
=
R485_Send_0xD0
();
...
...
YueJin_test_bench/source/Appliciation/api_RS485.h
View file @
61bd4142
...
@@ -26,6 +26,7 @@ typedef enum
...
@@ -26,6 +26,7 @@ typedef enum
// RS485_Tx_ID04_Idx = 0,
// RS485_Tx_ID04_Idx = 0,
RS485_Tx_ID80_Idx
=
0
,
RS485_Tx_ID80_Idx
=
0
,
RS485_Tx_IDA4_Idx
,
RS485_Tx_IDA4_Idx
,
RS485_Tx_IDB2_Idx
,
RS485_Tx_IDD0_Idx
,
RS485_Tx_IDD0_Idx
,
RS485_Tx_IDD1_Idx
,
RS485_Tx_IDD1_Idx
,
RS485_Tx_IDD2_Idx
,
RS485_Tx_IDD2_Idx
,
...
...
YueJin_test_bench/source/System/init.c
View file @
61bd4142
...
@@ -126,12 +126,12 @@ void Sys_Startup_Init(void)
...
@@ -126,12 +126,12 @@ void Sys_Startup_Init(void)
EN_5V_CUT_ENABLE
=
1
;
EN_5V_CUT_ENABLE
=
1
;
//
Display_TFT_Clear();
Display_TFT_Clear
();
//
GUI_Display_Version_Code_Service(25, 20, "Please Scan The Code ", Letter_Num_11, PCodeText_Space_size);
GUI_Display_Version_Code_Service
(
25
,
20
,
"Please Scan The Code "
,
Letter_Num_11
,
PCodeText_Space_size
);
/*上电扫码校验功能如果需要扫码校验注释掉firstpowerflag = 2,saomafinish = 3;打开上面两行的注释即可*/
/*上电扫码校验功能如果需要扫码校验注释掉firstpowerflag = 2,saomafinish = 3;打开上面两行的注释即可*/
firstpowerflag
=
2
;
//
firstpowerflag = 2;
saomafinish
=
4
;
//
saomafinish = 4;
}
}
/***********************************************************************
/***********************************************************************
...
...
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