Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rust-mavlink
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Avionics
Software Development
MAVLink
rust-mavlink
Commits
f81f0b41
Commit
f81f0b41
authored
9 months ago
by
pv42
Committed by
Patrick José Pereira
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: fmt
parent
00897019
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mavlink/tests/tcp_loopback_async_tests.rs
+6
-4
6 additions, 4 deletions
mavlink/tests/tcp_loopback_async_tests.rs
mavlink/tests/udp_loopback_async_tests.rs
+6
-3
6 additions, 3 deletions
mavlink/tests/udp_loopback_async_tests.rs
with
12 additions
and
7 deletions
mavlink/tests/tcp_loopback_async_tests.rs
+
6
−
4
View file @
f81f0b41
...
...
@@ -20,8 +20,9 @@ mod test_tcp_connections {
let
server_thread
=
tokio
::
spawn
(
async
move
{
//TODO consider using get_available_port to use a random port
let
mut
server
=
mavlink
::
connect_async
(
"tcpin:0.0.0.0:14551"
)
.await
.expect
(
"Couldn't create server"
);
let
mut
server
=
mavlink
::
connect_async
(
"tcpin:0.0.0.0:14551"
)
.await
.expect
(
"Couldn't create server"
);
#[cfg(feature
=
"signing"
)]
server
.setup_signing
(
Some
(
singing_cfg_server
));
...
...
@@ -53,8 +54,9 @@ mod test_tcp_connections {
tokio
::
spawn
(
async
move
{
let
msg
=
mavlink
::
common
::
MavMessage
::
HEARTBEAT
(
crate
::
test_shared
::
get_heartbeat_msg
());
let
mut
client
=
mavlink
::
connect_async
(
"tcpout:127.0.0.1:14551"
)
.await
.expect
(
"Couldn't create client"
);
let
mut
client
=
mavlink
::
connect_async
(
"tcpout:127.0.0.1:14551"
)
.await
.expect
(
"Couldn't create client"
);
#[cfg(feature
=
"signing"
)]
client
.setup_signing
(
Some
(
singing_cfg_client
));
...
...
This diff is collapsed.
Click to expand it.
mavlink/tests/udp_loopback_async_tests.rs
+
6
−
3
View file @
f81f0b41
...
...
@@ -8,15 +8,18 @@ mod test_udp_connections {
pub
async
fn
test_udp_loopback
()
{
const
RECEIVE_CHECK_COUNT
:
i32
=
3
;
let
server
=
mavlink
::
connect_async
(
"udpin:0.0.0.0:14552"
)
.await
.expect
(
"Couldn't create server"
);
let
server
=
mavlink
::
connect_async
(
"udpin:0.0.0.0:14552"
)
.await
.expect
(
"Couldn't create server"
);
// have the client send one heartbeat per second
tokio
::
spawn
({
async
move
{
let
msg
=
mavlink
::
common
::
MavMessage
::
HEARTBEAT
(
crate
::
test_shared
::
get_heartbeat_msg
());
let
client
=
mavlink
::
connect_async
(
"udpout:127.0.0.1:14552"
)
.await
.expect
(
"Couldn't create client"
);
let
client
=
mavlink
::
connect_async
(
"udpout:127.0.0.1:14552"
)
.await
.expect
(
"Couldn't create client"
);
loop
{
client
.send_default
(
&
msg
)
.await
.ok
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment