Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT200T_ESP32
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
RT200T
RT200T_ESP32
Commits
8b38084d
Commit
8b38084d
authored
Jun 08, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改串口发送胎压值为不变不发,
parent
130280ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
4 deletions
+41
-4
Protocol_User.c
RT200T_2_ESP32/main/Protocol_User.c
+41
-4
No files found.
RT200T_2_ESP32/main/Protocol_User.c
View file @
8b38084d
...
...
@@ -332,8 +332,23 @@ void Uart_Send_Id12_Pro(void )//收到底板回复的0x20后,发送蓝牙类型
Protocol_Send
(
0x12
,
ID12
,
3
);
}
// 函数定义
uint8_t
arraysEqual
(
uint8_t
arr1
[],
uint8_t
arr2
[],
uint8_t
size
);
uint8_t
arraysEqual
(
uint8_t
arr1
[],
uint8_t
arr2
[],
uint8_t
size
)
{
for
(
uint8_t
i
=
0
;
i
<
size
;
i
++
)
{
if
(
arr1
[
i
]
!=
arr2
[
i
])
{
return
0
;
// 不相等,返回0(或false)
}
}
return
1
;
// 相等,返回1(或true)
}
extern
uint8_t
ID01
[
64
];
extern
uint8_t
ID01_Len
;
uint8_t
ID01_Backup
[
64
]
=
{
0
};
void
Uart_Send_Id01_Pro
(
void
)
{
uint8_t
i
=
0
;
...
...
@@ -363,18 +378,40 @@ void Uart_Send_Id01_Pro(void)
// //
// }
if
((
ID01
[
24
]
==
0x28
)
&&
(
ID01
[
25
]
==
0xA8
))
if
(
arraysEqual
(
ID01_Backup
,
ID01
,
64
)
==
1
)
//相等
{
//printf("send 相等 \r\n");
}
else
{
Protocol_Send
(
0x01
,
ID01
,
ID01_Len
);
memcpy
(
ID01_Backup
,
ID01
,
64
);
}
}
}
extern
uint8_t
Iphone_Num
[
20
];
extern
uint8_t
number_length
;
void
Uart_Send_Id02_Pro
(
void
)
{
uint8_t
ID02
[
1
]
=
{
0x00
};
uint8_t
ID02
[
22
]
=
{
0x00
};
uint8_t
i
=
0
;
ID02
[
0
]
=
BT_User
.
Call_Sts
;
Protocol_Send
(
0x02
,
ID02
,
1
);
//给底板发送电话状态,用这个标志位显示电话号
ID02
[
1
]
=
number_length
;
for
(
i
=
0
;
i
<
number_length
;
i
++
)
{
ID02
[
i
+
2
]
=
Iphone_Num
[
i
]
-
0x30
;
}
Protocol_Send
(
0x02
,
ID02
,
number_length
+
2
);
//给底板发送电话状态,用这个标志位显示电话号
//printf("电话长度:%x \r\n",number_length);
}
...
...
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