Clear the command list. This command will be sent to the vehicle only after you call :py:func:`upload() `.
(self)
| 2668 | return self._vehicle.wait_ready('commands', **kwargs) |
| 2669 | |
| 2670 | def clear(self): |
| 2671 | ''' |
| 2672 | Clear the command list. |
| 2673 | |
| 2674 | This command will be sent to the vehicle only after you call :py:func:`upload() <Vehicle.commands.upload>`. |
| 2675 | ''' |
| 2676 | |
| 2677 | # Add home point again. |
| 2678 | self.wait_ready() |
| 2679 | home = None |
| 2680 | try: |
| 2681 | home = self._vehicle._wploader.wp(0) |
| 2682 | except: |
| 2683 | pass |
| 2684 | self._vehicle._wploader.clear() |
| 2685 | if home: |
| 2686 | self._vehicle._wploader.add(home, comment='Added by DroneKit') |
| 2687 | self._vehicle._wpts_dirty = True |
| 2688 | |
| 2689 | def add(self, cmd): |
| 2690 | ''' |