Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Valentin Platzgummer
qgroundcontrol
Commits
0075f512
Commit
0075f512
authored
May 23, 2012
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced home command with land command.
parent
2cc7c1fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
5 deletions
+18
-5
UAS.cc
src/uas/UAS.cc
+12
-3
UAS.h
src/uas/UAS.h
+3
-1
UASInterface.h
src/uas/UASInterface.h
+2
-0
UASView.cc
src/ui/uas/UASView.cc
+1
-1
No files found.
src/uas/UAS.cc
View file @
0075f512
...
...
@@ -249,9 +249,9 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
switch
(
message
.
compid
)
{
case
MAV_COMP_ID_IMU
_2
:
case
MAV_COMP_ID_IMU
:
// Prefer IMU 2 over IMU 1 (FIXME)
componentID
[
message
.
msgid
]
=
MAV_COMP_ID_IMU
_2
;
componentID
[
message
.
msgid
]
=
MAV_COMP_ID_IMU
;
break
;
default:
// Do nothing
...
...
@@ -2236,7 +2236,7 @@ void UAS::go()
sendMessage
(
msg
);
}
/** Order the robot to return home
/ to land on the runway
**/
/** Order the robot to return home **/
void
UAS
::
home
()
{
mavlink_message_t
msg
;
...
...
@@ -2250,6 +2250,15 @@ void UAS::home()
sendMessage
(
msg
);
}
/** Order the robot to land on the runway **/
void
UAS
::
land
()
{
mavlink_message_t
msg
;
mavlink_msg_command_long_pack
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
msg
,
uasId
,
MAV_COMP_ID_ALL
,
MAV_CMD_NAV_LAND
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
sendMessage
(
msg
);
}
/**
* The MAV starts the emergency landing procedure. The behaviour depends on the onboard implementation
* and might differ between systems.
...
...
src/uas/UAS.h
View file @
0075f512
...
...
@@ -511,8 +511,10 @@ public slots:
//void setWaypoint(Waypoint* wp); FIXME tbd
/** @brief Set currently active waypoint */
//void setWaypointActive(int id); FIXME tbd
/** @brief Order the robot to return home
/ to land on the runway
**/
/** @brief Order the robot to return home **/
void
home
();
/** @brief Order the robot to land **/
void
land
();
void
halt
();
void
go
();
...
...
src/uas/UASInterface.h
View file @
0075f512
...
...
@@ -237,6 +237,8 @@ public slots:
//virtual void setWaypointActive(int wp) = 0;
/** @brief Order the robot to return home / to land on the runway **/
virtual
void
home
()
=
0
;
/** @brief Order the robot to land **/
virtual
void
land
()
=
0
;
/** @brief Halt the system */
virtual
void
halt
()
=
0
;
/** @brief Start/continue the current robot action */
...
...
src/ui/uas/UASView.cc
View file @
0075f512
...
...
@@ -109,7 +109,7 @@ UASView::UASView(UASInterface* uas, QWidget *parent) :
connect
(
m_ui
->
liftoffButton
,
SIGNAL
(
clicked
()),
uas
,
SLOT
(
launch
()));
connect
(
m_ui
->
haltButton
,
SIGNAL
(
clicked
()),
uas
,
SLOT
(
halt
()));
connect
(
m_ui
->
continueButton
,
SIGNAL
(
clicked
()),
uas
,
SLOT
(
go
()));
connect
(
m_ui
->
landButton
,
SIGNAL
(
clicked
()),
uas
,
SLOT
(
home
()));
connect
(
m_ui
->
landButton
,
SIGNAL
(
clicked
()),
uas
,
SLOT
(
land
()));
connect
(
m_ui
->
abortButton
,
SIGNAL
(
clicked
()),
uas
,
SLOT
(
emergencySTOP
()));
connect
(
m_ui
->
killButton
,
SIGNAL
(
clicked
()),
uas
,
SLOT
(
emergencyKILL
()));
connect
(
m_ui
->
shutdownButton
,
SIGNAL
(
clicked
()),
uas
,
SLOT
(
shutdown
()));
...
...
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