MCPcopy
hub / github.com/dronekit/dronekit-python / add

Method add

dronekit/__init__.py:2689–2702  ·  view source on GitHub ↗

Add a new command (waypoint) at the end of the command list. .. note:: Commands are sent to the vehicle only after you call ::py:func:`upload() `. :param Command cmd: The command to be added.

(self, cmd)

Source from the content-addressed store, hash-verified

2687 self._vehicle._wpts_dirty = True
2688
2689 def add(self, cmd):
2690 '''
2691 Add a new command (waypoint) at the end of the command list.
2692
2693 .. note::
2694
2695 Commands are sent to the vehicle only after you call ::py:func:`upload() <Vehicle.commands.upload>`.
2696
2697 :param Command cmd: The command to be added.
2698 ''&#x27;
2699 self.wait_ready()
2700 self._vehicle._handler.fix_targets(cmd)
2701 self._vehicle._wploader.add(cmd, comment='Added by DroneKit')
2702 self._vehicle._wpts_dirty = True
2703
2704 def upload(self):
2705 """

Callers 8

recvMethod · 0.80
listenerMethod · 0.80
clearMethod · 0.80
test_parameterFunction · 0.80
test_227Function · 0.80
flight_replay.pyFile · 0.80
upload_missionFunction · 0.80
adds_square_missionFunction · 0.80

Calls 2

wait_readyMethod · 0.95
fix_targetsMethod · 0.80

Tested by 2

test_parameterFunction · 0.64
test_227Function · 0.64