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
de38e49b
Commit
de38e49b
authored
Apr 27, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #623 from julianoes/hil_cmds
include HIL bit, this makes HIL without RC working again
parents
113ee261
144dcddd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
UAS.h
src/uas/UAS.h
+2
-0
UASControlWidget.cc
src/ui/uas/UASControlWidget.cc
+10
-2
No files found.
src/uas/UAS.h
View file @
de38e49b
...
...
@@ -539,6 +539,8 @@ public:
bool
isAuto
();
/** @brief Check if vehicle is armed */
bool
isArmed
()
const
{
return
systemIsArmed
;
}
/** @brief Check if vehicle is in HIL mode */
bool
isHilEnabled
()
const
{
return
hilEnabled
;
}
/** @brief Get reference to the waypoint manager **/
UASWaypointManager
*
getWaypointManager
()
{
...
...
src/ui/uas/UASControlWidget.cc
View file @
de38e49b
...
...
@@ -230,8 +230,8 @@ void UASControlWidget::setMode(int mode)
void
UASControlWidget
::
transmitMode
()
{
UASInterface
*
uas
=
UASManager
::
instance
()
->
getUASForId
(
this
->
uasID
);
if
(
uas
)
{
UASInterface
*
uas
_iface
=
UASManager
::
instance
()
->
getUASForId
(
this
->
uasID
);
if
(
uas
_iface
)
{
if
(
modeIdx
>=
0
&&
modeIdx
<
modesNum
)
{
struct
full_mode_s
mode
=
modesList
[
modeIdx
];
// include armed state
...
...
@@ -241,6 +241,14 @@ void UASControlWidget::transmitMode()
mode
.
baseMode
&=
~
MAV_MODE_FLAG_SAFETY_ARMED
;
}
UAS
*
uas
=
dynamic_cast
<
UAS
*>
(
uas_iface
);
if
(
uas
->
isHilEnabled
())
{
mode
.
baseMode
|=
MAV_MODE_FLAG_HIL_ENABLED
;
}
else
{
mode
.
baseMode
&=
~
MAV_MODE_FLAG_HIL_ENABLED
;
}
uas
->
setMode
(
mode
.
baseMode
,
mode
.
customMode
);
QString
modeText
=
ui
.
modeComboBox
->
currentText
();
...
...
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