Skip to content

Vehicle.flush() not working as intended #276

@jamesbellaero

Description

@jamesbellaero

There are two issues with the flush method that I have found:

  1. When I add waypoints and call flush(), the entire mission requires about .25 seconds per waypoint to write in lab conditions. If I attempt to set the vehicle to auto or download the waypoints before all of them are written, the Pixhawk will not receive the full mission and 're-request' the waypoints it missed. When flying, this caused the quad to crash since it got set to auto without home being written properly and came down.
    To get around this issue, I call time.sleep(vehicle.commands.count/2) immediately after calling vehicle.flush(). However, if flush() worked properly it would automatically wait until receiving confirmation from the quad that all waypoints had been written before continuing, much like wait_valid() does.
  2. After downloading waypoints from the Pixhawk with vehicle.commands.download() and vehicle.commands.wait_valid(), the Pixhawk no longer has a loaded mission, meaning that I can't set it to auto while armed, etc. To reupload the mission I have to actually change a command in the CommandSequence.
    I would have figured that simply calling flush() would handle the reupload without me having to change anything, but it doesn't.

These are important issues which need to be solved before lots of people start using Dronekit in real applications. Either fix the flush method add new methods to achieve the required functionality.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions