MCPcopy Create free account
hub / github.com/dronekit/dronekit-python / __init__

Method __init__

examples/drone_delivery/drone_delivery.py:54–67  ·  view source on GitHub ↗
(self, server_enabled=True)

Source from the content-addressed store, hash-verified

52
53class Drone(object):
54 def __init__(self, server_enabled=True):
55 self.gps_lock = False
56 self.altitude = 30.0
57
58 # Connect to the Vehicle
59 self._log('Connected to vehicle.')
60 self.vehicle = vehicle
61 self.commands = self.vehicle.commands
62 self.current_coords = []
63 self.webserver_enabled = server_enabled
64 self._log("DroneDelivery Start")
65
66 # Register observers
67 self.vehicle.add_attribute_listener('location', self.location_callback)
68
69 def launch(self):
70 self._log("Waiting for location...")

Callers

nothing calls this directly

Calls 2

_logMethod · 0.95

Tested by

no test coverage detected