Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
de38e49b
Commit
de38e49b
authored
Apr 27, 2014
by
Lorenz Meier
Browse files
Merge pull request #623 from julianoes/hil_cmds
include HIL bit, this makes HIL without RC working again
parents
113ee261
144dcddd
Changes
2
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment