{"action":"created","issue":{"url":"https://api.github.com/repos/dronekit/dronekit-python/issues/276","labels_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/276/comments","events_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/276/events","html_url":"https://github.com/dronekit/dronekit-python/issues/276","id":99724890,"number":276,"title":"Vehicle.flush() not working as intended","user":{"login":"jamesbellaero","id":13239498,"avatar_url":"https://avatars.githubusercontent.com/u/13239498?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesbellaero","html_url":"https://github.com/jamesbellaero","followers_url":"https://api.github.com/users/jamesbellaero/followers","following_url":"https://api.github.com/users/jamesbellaero/following{/other_user}","gists_url":"https://api.github.com/users/jamesbellaero/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesbellaero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesbellaero/subscriptions","organizations_url":"https://api.github.com/users/jamesbellaero/orgs","repos_url":"https://api.github.com/users/jamesbellaero/repos","events_url":"https://api.github.com/users/jamesbellaero/events{/privacy}","received_events_url":"https://api.github.com/users/jamesbellaero/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dronekit/dronekit-python/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/dronekit/dronekit-python/labels/duplicate","name":"duplicate","color":"cccccc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/dronekit/dronekit-python/milestones/5","html_url":"https://github.com/dronekit/dronekit-python/milestones/v2.0.0","labels_url":"https://api.github.com/repos/dronekit/dronekit-python/milestones/5/labels","id":1199266,"number":5,"title":"v2.0.0","description":"Major release (as needed)","creator":{"login":"tcr3dr","id":12703357,"avatar_url":"https://avatars.githubusercontent.com/u/12703357?v=3","gravatar_id":"","url":"https://api.github.com/users/tcr3dr","html_url":"https://github.com/tcr3dr","followers_url":"https://api.github.com/users/tcr3dr/followers","following_url":"https://api.github.com/users/tcr3dr/following{/other_user}","gists_url":"https://api.github.com/users/tcr3dr/gists{/gist_id}","starred_url":"https://api.github.com/users/tcr3dr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcr3dr/subscriptions","organizations_url":"https://api.github.com/users/tcr3dr/orgs","repos_url":"https://api.github.com/users/tcr3dr/repos","events_url":"https://api.github.com/users/tcr3dr/events{/privacy}","received_events_url":"https://api.github.com/users/tcr3dr/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":17,"state":"open","created_at":"2015-07-08T18:43:46Z","updated_at":"2015-11-10T00:41:24Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-08-07T20:25:23Z","updated_at":"2015-11-10T04:38:38Z","closed_at":null,"body":"There are two issues with the flush method that I have found:\r\n\r\n1. 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. \r\nTo 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. \r\n\r\n2. 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. \r\nI would have figured that simply calling flush() would handle the reupload without me having to change anything, but it doesn't.\r\n\r\nThese 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.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dronekit/dronekit-python/issues/comments/155285459","html_url":"https://github.com/dronekit/dronekit-python/issues/276#issuecomment-155285459","issue_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/276","id":155285459,"user":{"login":"jamesbellaero","id":13239498,"avatar_url":"https://avatars.githubusercontent.com/u/13239498?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesbellaero","html_url":"https://github.com/jamesbellaero","followers_url":"https://api.github.com/users/jamesbellaero/followers","following_url":"https://api.github.com/users/jamesbellaero/following{/other_user}","gists_url":"https://api.github.com/users/jamesbellaero/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesbellaero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesbellaero/subscriptions","organizations_url":"https://api.github.com/users/jamesbellaero/orgs","repos_url":"https://api.github.com/users/jamesbellaero/repos","events_url":"https://api.github.com/users/jamesbellaero/events{/privacy}","received_events_url":"https://api.github.com/users/jamesbellaero/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T04:38:38Z","updated_at":"2015-11-10T04:38:38Z","body":"I'm not currently in the position to do so as I'm back in school from my\ninternship. Once we get our test setup completed in my student group I'll\nlet you know.\nOn Nov 9, 2015 8:26 PM, \"Hamish Willee\" <notifications@github.com> wrote:\n\n> @jamesbellaero <https://github.com/jamesbellaero> As @tcr3dr\n> <https://github.com/tcr3dr> says above, we think this is fixed in\n> dkpy2.0. Can you please confirm?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/dronekit/dronekit-python/issues/276#issuecomment-155263110>\n> .\n>\n"}}