Skip to content

Commit

Permalink
Make drone loiter when offboard control messages stop coming.
Browse files Browse the repository at this point in the history
  • Loading branch information
lovettchris committed May 2, 2017
1 parent 7715ff8 commit d48889c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MavLinkCom/src/impl/MavLinkVehicleImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,13 @@ void MavLinkVehicleImpl::requestControl()
// (which is not the default behavior for px4, so we set that here)
MavLinkParameter p;
p.name = "COM_OBL_ACT";
p.value = 1; // loiter (see px4 state_machine_helper.cpp, line 904)
p.value = 1; // loiter (see px4 state_machine_helper.cpp, line 904-ish)
setParameter(p);

p.name = "COM_OBL_RC_ACT";
p.value = 5; // loiter (see px4 state_machine_helper.cpp, line 878-ish)
setParameter(p);

}

// return true if user calls requestControl and has not called releaseControl.
Expand Down

0 comments on commit d48889c

Please sign in to comment.