Skip to content

Commit

Permalink
Simplify dronekit mode change
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderux authored and LorenzMeier committed Dec 28, 2016
1 parent 05fda0c commit 53be474
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions integrationtests/python_src/px4_it/dronekit/MissionCheck.py
Expand Up @@ -26,7 +26,7 @@
################################################################################################

# Import DroneKit-Python
from dronekit import connect, Command
from dronekit import connect, Command, VehicleMode
from pymavlink import mavutil
import time, sys, argparse

Expand Down Expand Up @@ -227,11 +227,8 @@ def listener(self, name, home_position):
missionlist = upload_mission(import_mission_filename)
time.sleep(2)

# set mission mode the hard way
vehicle._master.mav.command_long_send(vehicle._master.target_system, vehicle._master.target_component,
mavutil.mavlink.MAV_CMD_DO_SET_MODE, 0,
MAV_MODE_AUTO,
0, 0, 0, 0, 0, 0)
# set mission mode
vehicle.mode = VehicleMode("MISSION")
time.sleep(1)


Expand Down

0 comments on commit 53be474

Please sign in to comment.