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
b13fa235
Commit
b13fa235
authored
May 18, 2025
by
梁百峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:上传
parent
1c9382a7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
106 additions
and
27 deletions
+106
-27
R485_Communication_Matrix.c
...est_bench/source/Appliciation/R485_Communication_Matrix.c
+10
-3
R485_Communication_Matrix.h
...est_bench/source/Appliciation/R485_Communication_Matrix.h
+1
-0
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+51
-5
Task.h
YueJin_test_bench/source/Appliciation/Task.h
+1
-1
api_RS485.c
YueJin_test_bench/source/Appliciation/api_RS485.c
+40
-15
init.c
YueJin_test_bench/source/System/init.c
+3
-3
No files found.
YueJin_test_bench/source/Appliciation/R485_Communication_Matrix.c
View file @
b13fa235
...
...
@@ -709,7 +709,7 @@ uint32_t R485_Send_0x41(void)
uint32_t
R485_Send_0x42
(
void
)
{
LINE_OUT_NEG_09
=
1
;
//
LINE_OUT_NEG_09 = 1;
memset
(
R485_ID42h
.
Msg
,
0xFF
,
64
);
uint32_t
u32sendendflag
=
0
;
R485_ID42h
.
Sig
.
TPower
=
0
;
//T动力状态
...
...
@@ -792,6 +792,9 @@ uint32_t R485_Send_ble0x42(void)
return
u32sendendflag
;
}
uint8_t
R485_zhenduan_Msg
[
64
];
uint32_t
zhenduandowntime
=
0
;
uint8_t
timestart
=
0
;
uint8_t
zhenduancishu
=
0
;
uint32_t
R485_Send_0x47
(
void
)
{
uint8_t
length
;
...
...
@@ -877,7 +880,11 @@ uint32_t R485_Send_0x80(void)
{
uint8_t
length
;
uint32_t
u32sendendflag
=
0
;
memset
(
R485_0x80_msg
,
0xFF
,
sizeof
(
R485_0x80_msg
));
if
(
clearOdoFlag
!=
0
)
{
RS485_TX_finish
=
0
;
}
// memset(R485_0x80_msg,0xFF,sizeof(R485_0x80_msg));
if
(
RS485_TX_finish
==
0
)
{
...
...
@@ -894,7 +901,7 @@ uint32_t R485_Send_0x45(void)
{
uint8_t
length
;
uint32_t
u32sendendflag
=
0
;
memset
(
R485_0x80_msg
,
0xFF
,
sizeof
(
R485_0x80_msg
));
//
memset(R485_0x80_msg,0xFF,sizeof(R485_0x80_msg));
if
(
RS485_TX_finish
==
0
)
{
...
...
YueJin_test_bench/source/Appliciation/R485_Communication_Matrix.h
View file @
b13fa235
...
...
@@ -1146,4 +1146,5 @@ extern uint8_t barcode_Msg[64];
extern
uint8_t
barcode_Msg1
[
64
];
extern
uint8_t
name1
;
extern
uint8_t
name2
;
extern
uint8_t
R485_0x80_msg
[
64
];
#endif
YueJin_test_bench/source/Appliciation/Task.c
View file @
b13fa235
...
...
@@ -78,7 +78,7 @@ void Sys_Run_Mode_5ms_Tasks_Group(void)
10ms����ִ������ ��0��
------------------------------------------------------------------------------*/
// uint8_t testdata[3] = {0,1,2};
uint8_t
Openble
[
11
]
=
{
0
};
uint8_t
Openble
[
20
]
=
{
0
};
uint32_t
clearodotime
;
uint32_t
devicename
=
0
;
uint8_t
sartigon
=
0
;
...
...
@@ -185,8 +185,16 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
Openble
[
6
]
=
name2
;
Openble
[
7
]
=
name1
;
Openble
[
8
]
=
1
;
Openble
[
9
]
=
0x4B
;
Openble
[
10
]
=
0x4A
;
Openble
[
9
]
=
btmac
[
0
];
Openble
[
10
]
=
btmac
[
1
];
Openble
[
11
]
=
btmac
[
2
];
Openble
[
12
]
=
btmac
[
3
];
Openble
[
13
]
=
btmac
[
4
];
Openble
[
14
]
=
btmac
[
5
];
Openble
[
15
]
=
0x4B
;
Openble
[
16
]
=
0x4A
;
// RS485_User_Tx_Data();
if
(
sendflag
==
1
)
...
...
@@ -564,6 +572,7 @@ void Sys_Exact_50us_Tasks(void)
/*==============================================================================
��ȷ��100ms��ʱ���� ��ֹ�������б��е�����
------------------------------------------------------------------------------*/
uint32_t
clearodotime
=
0
;
void
Sys_Exact_100ms_Tasks
(
void
)
{
if
(
connectbleFlag
==
1
)
...
...
@@ -582,10 +591,47 @@ void Sys_Exact_100ms_Tasks(void)
if
(
startIGONtime
<
0xFFFFFFFF
)
{
startIGONtime
++
;
if
(
startIGONtime
%
20
==
0
)
{
if
(
R485_0x80_msg
[
11
]
<
5
)
{
R485_0x80_msg
[
11
]
++
;
}
else
{
R485_0x80_msg
[
11
]
=
0
;
}
}
}
else
{
startIGONtime
=
0
;
}
}
// CHECK_IPK_COUNT( );
if
(
clearodotime
<
0xFFFFFFFF
)
{
clearodotime
++
;
if
(
clearodotime
%
20
==
0
)
{
if
(
R485_0x80_msg
[
11
]
<
5
)
{
R485_0x80_msg
[
11
]
++
;
R485_0x80_msg
[
10
]
++
;
}
else
{
R485_0x80_msg
[
11
]
=
0
;
R485_0x80_msg
[
10
]
=
0
;
}
}
// CHECK_IPK_COUNT( );
}
else
{
clearodotime
=
0
;
}
}
/*============================================================================*/
void
Sys_Enter_Sleep_Mode
(
void
)
...
...
YueJin_test_bench/source/Appliciation/Task.h
View file @
b13fa235
...
...
@@ -9,7 +9,7 @@ extern uint32_t send0x42time;
extern
uint32_t
bleOFFtoONtime
;
extern
uint8_t
startONfalg
;
extern
uint32_t
startIGONtime
;
extern
uint8_t
Openble
[
11
];
extern
uint8_t
Openble
[
20
];
void
Sys_Run_Mode_Pseudo_Real_Time_Tasks
(
void
);
void
Sys_Run_Mode_2ms_Tasks_Group
(
void
);
void
Sys_Run_Mode_5ms_Tasks_Group
(
void
);
...
...
YueJin_test_bench/source/Appliciation/api_RS485.c
View file @
b13fa235
...
...
@@ -344,11 +344,19 @@ void RS485_User_Tx_Data(void)
// {
if
(
MENU_CHECK_STEP
==
16
)
{
if
(
send80time
<
1000
)
// if(send80time < 1000)
// {
// send80time++;
// }
}
if
(
send80time
<
2000
)
{
send80time
++
;
}
}
else
{
}
switch
(
RS485_send_num
)
{
case
RS485_Tx_ID48_Idx
:
...
...
@@ -400,7 +408,8 @@ void RS485_User_Tx_Data(void)
RS485_TX_finish
=
1
;
if
(
RS485_TX_finish
==
1
)
{
if
(
MENU_CHECK_STEP
==
3
||
Get_Display_Type
(
)
==
3
||
MENU_CHECK_STEP
==
16
)
if
((
MENU_CHECK_STEP
==
3
||
Get_Display_Type
(
)
==
3
||
MENU_CHECK_STEP
==
16
||
MENU_CHECK_STEP
==
0
))
// if((MENU_CHECK_STEP == 3 || Get_Display_Type( ) == 3 || MENU_CHECK_STEP == 16 ) && clearOdoFlag != 1)
{
RS485_send_num
++
;
}
...
...
@@ -425,13 +434,21 @@ void RS485_User_Tx_Data(void)
Openble
[
6
]
=
name2
;
Openble
[
7
]
=
name1
;
Openble
[
8
]
=
1
;
Openble
[
9
]
=
0x4B
;
Openble
[
10
]
=
0x4A
;
Openble
[
9
]
=
btmac
[
0
];
Openble
[
10
]
=
btmac
[
1
];
Openble
[
11
]
=
btmac
[
2
];
Openble
[
12
]
=
btmac
[
3
];
Openble
[
13
]
=
btmac
[
4
];
Openble
[
14
]
=
btmac
[
5
];
Openble
[
15
]
=
0x4B
;
Openble
[
16
]
=
0x4A
;
UART_Ch2_Send_Multiple_Byte
(
Openble
,
sizeof
(
Openble
));
if
(
send80time
<
500
)
{
RS485_send_num
++
;
}
//
if(send80time < 500)
//
{
//
RS485_send_num++;
//
}
}
else
{
...
...
@@ -444,12 +461,20 @@ void RS485_User_Tx_Data(void)
Openble
[
6
]
=
name2
;
Openble
[
7
]
=
name1
;
Openble
[
8
]
=
0
;
Openble
[
9
]
=
0x4B
;
Openble
[
10
]
=
0x4A
;
Openble
[
9
]
=
btmac
[
0
];
Openble
[
10
]
=
btmac
[
1
];
Openble
[
11
]
=
btmac
[
2
];
Openble
[
12
]
=
btmac
[
3
];
Openble
[
13
]
=
btmac
[
4
];
Openble
[
14
]
=
btmac
[
5
];
Openble
[
15
]
=
0x4B
;
Openble
[
16
]
=
0x4A
;
UART_Ch2_Send_Multiple_Byte
(
Openble
,
sizeof
(
Openble
));
}
if
(
send80time
>
500
)
{
//
if(send80time > 500)
//
{
sendfinishflag
=
R485_Send_0x80
();
if
(
sendfinishflag
==
0
)
{
...
...
@@ -460,7 +485,7 @@ void RS485_User_Tx_Data(void)
RS485_send_num
++
;
}
}
}
//
}
default:
flag
=
1
;
...
...
@@ -476,7 +501,7 @@ void RS485_User_Tx_Data(void)
}
void
backsend
(
void
)
{
if
(
RS485_send_time
>=
1
0
)
if
(
RS485_send_time
>=
5
0
)
{
RS485_send_time
=
0
;
RS485_TX_finish
=
0
;
...
...
YueJin_test_bench/source/System/init.c
View file @
b13fa235
...
...
@@ -118,11 +118,11 @@ void Sys_Startup_Init(void)
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,打开上面两行的注释即可*/
//
firstpowerflag = 2;
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