Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Philippe Gaussier
Drone FlyMonitor2
Commits
b12787d8
Commit
b12787d8
authored
Jul 22, 2021
by
Amine AIT-GANI
Browse files
Mise jour des fonctions de test
parent
4956c927
Pipeline
#1451
failed with stage
in 1 minute and 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Com_server/test/TestDroneRemoteControl.cpp
View file @
b12787d8
...
...
@@ -105,7 +105,14 @@ void command_loop()
drone1.command_up(0);
}
*/
else
if
(
buffer_command
==
"o"
)
{
cout
<<
"right
\n
"
;
drone1
.
move_to
(
1
,
0
,
0
);
}
else
if
(
buffer_command
==
"r"
)
{
cout
<<
"right
\n
"
;
...
...
@@ -126,23 +133,41 @@ void command_loop()
{
drone1
.
command_kill
(
0
);
}
else
if
(
buffer_command
==
"z"
)
{
cout
<<
"motor 1
\n
"
;
drone1
.
command_directControl
(
1000
,
0
,
1000
,
0
);
drone1
.
command_directControl
(
1000
,
0
,
0
,
0
);
}
else
if
(
buffer_command
==
"s"
)
{
cout
<<
"motor 1
\n
"
;
drone1
.
command_directControl
(
-
1000
,
0
,
0
,
0
);
}
else
if
(
buffer_command
==
"d"
)
{
drone1
.
command_directControl
(
0
,
1000
,
100
0
,
0
);
drone1
.
command_directControl
(
0
,
1000
,
0
,
0
);
}
else
if
(
buffer_command
==
"q"
)
{
drone1
.
command_directControl
(
-
1000
,
0
,
1000
,
0
);
drone1
.
command_directControl
(
0
,
-
1000
,
0
,
0
);
}
else
if
(
buffer_command
==
"s"
)
else
if
(
buffer_command
==
"w"
)
{
drone1
.
command_directControl
(
0
,
0
,
1000
,
0
);
}
else
if
(
buffer_command
==
"x"
)
{
drone1
.
command_directControl
(
0
,
0
,
-
1000
,
0
);
}
else
if
(
buffer_command
==
"c"
)
{
drone1
.
command_directControl
(
0
,
0
,
0
,
1000
);
}
else
if
(
buffer_command
==
"v"
)
{
drone1
.
command_directControl
(
0
,
0
,
0
,
-
1000
);
}
else
if
(
buffer_command
==
"!m"
)
{
drone1
.
command_directControl
(
0
,
0
,
0
,
0
);
...
...
@@ -154,6 +179,14 @@ void command_loop()
mavlink_msg_play_tune_pack
(
255
,
drone1
.
component_id
,
&
message
,
1
,
1
,
"AAAA"
,
""
);
drone1
.
write_message
(
message
);
}
else
if
(
buffer_command
==
"g"
)
{
drone1
.
command_setModeGuided
(
1
);
}
else
if
(
buffer_command
==
"!g"
)
{
drone1
.
command_setModeGuided
(
0
);
}
else
{
cout
<<
"command not recognized
\n
"
;
...
...
Write
Preview
Supports
Markdown
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