Skip to content
Browse files

Merge branch 'master' of github.com:mavlink/mavlink

  • Loading branch information...
2 parents 5e411aa + bbb6f47 commit dca59ea5567265ee986999726e6f59242416df1a @LorenzMeier LorenzMeier committed Aug 27, 2012
Showing with 21 additions and 0 deletions.
  1. +21 −0 pymavlink/mavutil.py
View
21 pymavlink/mavutil.py
@@ -346,6 +346,27 @@ def set_mode_rtl(self):
MAV_ACTION_RETURN = 3
self.mav.action_send(self.target_system, self.target_component, MAV_ACTION_RETURN)
+ def set_mode_manual(self):
+ '''enter MANUAL mode'''
+ if self.mavlink10():
+ self.mav.command_long_send(self.target_system, self.target_component,
+ mavlink.MAV_CMD_DO_SET_MODE, 0,
+ mavlink.MAV_MODE_MANUAL_ARMED,
+ 0, 0, 0, 0, 0, 0)
+ else:
+ MAV_ACTION_SET_MANUAL = 12
+ self.mav.action_send(self.target_system, self.target_component, MAV_ACTION_SET_MANUAL)
+
+ def set_mode_fbwa(self):
+ '''enter FBWA mode'''
+ if self.mavlink10():
+ self.mav.command_long_send(self.target_system, self.target_component,
+ mavlink.MAV_CMD_DO_SET_MODE, 0,
+ mavlink.MAV_MODE_STABILIZE_ARMED,
+ 0, 0, 0, 0, 0, 0)
+ else:
+ print("Forcing FBWA not supported")
+
def set_mode_loiter(self):
'''enter LOITER mode'''
if self.mavlink10():

0 comments on commit dca59ea

Please sign in to comment.
Something went wrong with that request. Please try again.