Skip to content

Commit

Permalink
Merge pull request mavlink#984 from julianoes/fix_hil_jmavsim
Browse files Browse the repository at this point in the history
Set mode compatibility with jMAVSim
  • Loading branch information
thomasgubler committed Nov 19, 2014
2 parents 30cfe7e + 08d06d2 commit ca0bc68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/uas/UAS.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,10 @@ class UAS : public UASInterface
bool isAuto();
/** @brief Check if vehicle is armed */
bool isArmed() const { return systemIsArmed; }
/** @brief Check if vehicle is in HIL mode */
/** @brief Check if vehicle is supposed to be in HIL mode by the GS */
bool isHilEnabled() const { return hilEnabled; }
/** @brief Check if vehicle is in HIL mode */
bool isHilActive() const { return base_mode & MAV_MODE_FLAG_HIL_ENABLED; }

/** @brief Get reference to the waypoint manager **/
UASWaypointManager* getWaypointManager() {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/uas/UASControlWidget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void UASControlWidget::transmitMode()

UAS* uas = dynamic_cast<UAS*>(uas_iface);

if (uas->isHilEnabled()) {
if (uas->isHilEnabled() || uas->isHilActive()) {
mode.baseMode |= MAV_MODE_FLAG_HIL_ENABLED;
} else {
mode.baseMode &= ~MAV_MODE_FLAG_HIL_ENABLED;
Expand Down

0 comments on commit ca0bc68

Please sign in to comment.