(self)
| 67 | self.vehicle.add_attribute_listener('location', self.location_callback) |
| 68 | |
| 69 | def launch(self): |
| 70 | self._log("Waiting for location...") |
| 71 | while self.vehicle.location.global_frame.lat == 0: |
| 72 | time.sleep(0.1) |
| 73 | self.home_coords = [self.vehicle.location.global_frame.lat, |
| 74 | self.vehicle.location.global_frame.lon] |
| 75 | |
| 76 | self._log("Waiting for ability to arm...") |
| 77 | while not self.vehicle.is_armable: |
| 78 | time.sleep(.1) |
| 79 | |
| 80 | self._log('Running initial boot sequence') |
| 81 | self.change_mode('GUIDED') |
| 82 | self.arm() |
| 83 | self.takeoff() |
| 84 | |
| 85 | if self.webserver_enabled is True: |
| 86 | self._run_server() |
| 87 | |
| 88 | def takeoff(self): |
| 89 | self._log("Taking off") |
no test coverage detected