def setUp(self, mock_bind): self.mgr = shotManager.ShotManager() vehicle = mock.create_autospec(Vehicle) self.mgr.Start(vehicle) self.mgr.buttonManager = Mock() self.mgr.goproManager = Mock() self.mgr.rewindManager = Mock()
def setUp(self, mock_bind): self.mgr = shotManager.ShotManager() v = mock.create_autospec(Vehicle) self.mgr.Start(v) self.sock = Mock() self.channels = [1500, 5, 9, 8, 7, 1, 1, 1] self.value = struct.pack('<dHHHHHHHHH', 2.3, 3, 1500, 5, 9, 8, 7, 1, 1, 1) self.mgr.rcMgr.server.recv = Mock(return_value = self.value)
def setUp(self, mock_bind): self.mgr = shotManager.ShotManager() self.v = mock.create_autospec(Vehicle) self.mgr.Start(self.v) self.mgr.buttonManager = Mock() self.mgr.enterShot = Mock() self.mgr.appMgr.client = Mock() self.mgr.inputs = [self.mgr.appMgr.client]
def setUp(self, mock_bind): self.mgr = shotManager.ShotManager() self.v = mock.create_autospec(Vehicle) self.mgr.Start(self.v) self.mgr.buttonManager = Mock() self.mgr.appMgr.server = Mock() self.client = Mock() address = (3333, ) self.mgr.appMgr.server.accept = Mock(return_value=(self.client, address))
def setUp(self): self.mgr = shotManager.ShotManager() self.mgr.rcMgr = Mock() self.mgr.buttonManager = buttonManager.buttonManager(self.mgr) self.mgr.lastMode = "LOITER" self.mgr.appMgr = Mock() self.mgr.vehicle = mock.create_autospec(Vehicle) self.mgr.vehicle.system_status = 'ACTIVE' self.mgr.sendPacket = Mock() self.mgr.goproManager = Mock() self.mgr.geoFenceManager = GeoFenceManager.GeoFenceManager(self.mgr)
def setUp(self, mock_bind): self.mgr = shotManager.ShotManager() vehicle = mock.create_autospec(Vehicle) vehicle.system_status = 'ACTIVE' self.mgr.Start(vehicle) self.mgr.buttonManager = Mock() self.mgr.appMgr.sendPacket = Mock() self.mgr.rcMgr = Mock() self.mgr.last_ekf_ok = True self.mgr.appMgr = Mock() self.mgr.appMgr.isAppConnected = Mock(return_value=True)
def setUp(self, mock_bind): self.mgr = shotManager.ShotManager() self.v = mock.create_autospec(Vehicle) self.mgr.Start(self.v) self.mgr.appMgr.client = Mock(specs=['recv'])
import os from os import sys, path sys.path.append(os.path.realpath('')) import shotManager from dronekit import connect from dronekit_solo import SoloVehicle from dronekit.mavlink import MAVConnection # First get an instance of the API endpoint vehicle = connect(sys.argv[1], wait_ready=False, vehicle_class=SoloVehicle, source_system=255, use_native=True, heartbeat_timeout=-1) if 'SOLOLINK_SANDBOX' in os.environ: from sim import rc_ipc_shim rc_ipc_shim.pixrc_start() out = MAVConnection(sys.argv[2], source_system=254) vehicle._handler.pipe(out) out.start() mgr = shotManager.ShotManager() mgr.Start(vehicle) mgr.Run()
def setUp(self, mock_bind): self.mgr = shotManager.ShotManager() vehicle = mock.create_autospec(Vehicle) # Make sure EKF is not reported as ok on Startup vehicle.ekf_ok = False self.mgr.Start(vehicle)
def setUp(self, mock_bind): self.mgr = shotManager.ShotManager() vehicle = mock.create_autospec(Vehicle) vehicle.camera_trigger_msg = Mock() self.mgr.Start(vehicle) self.mgr.cameraTLogFile = Mock()
def setUp(self, mock_bind): self.mgr = shotManager.ShotManager() self.v = mock.create_autospec(Vehicle) self.mgr.Start(self.v)
def setUp(self, mock_bind): self.mgr = shotManager.ShotManager() self.v = mock.create_autospec(Vehicle) self.v.system_status = 'ACTIVE' self.mgr.Start(self.v) self.mgr.buttonManager = Mock()