ardupilot
ardupilot copied to clipboard
Plane: add support for NAV_DELAY if flying auto mission in VTOL mode
NAV_DELAY is currently only supported if the plane is disarmed. This pull request allows for NAV_DELAY to be used if flying an auto mission with a quadplane in VTOL mode.
Could you work up an autotest for this, please?
sure, just added an autotest in quadplane. It performs an auto mission with two NAV_DELAY commands. The first one happens when the aircraft is in VTOL mode (so shouldn't be ignored). The aircraft then transitions to fixed-wing mode before the reaching the second NAV_DELAY command, which should be skipped.
sure, just added an autotest in quadplane. It performs an auto mission with two NAV_DELAY commands. The first one happens when the aircraft is in VTOL mode (so shouldn't be ignored). The aircraft then transitions to fixed-wing mode before the reaching the second NAV_DELAY command, which should be skipped.
Thanks for that!
I've increasingly taken to putting the missions in-line in the test - we have new-ish function to upload simple missions - keeps things a little more cohesive. What you've got is serviceable, however.
@jeff567 need to compile when quadplane is disabled, @jeff567 :-)
Sorry, I'll fix that in a bit. That's to say we should only check plane.quadplane.in_vtol_mode() if HAL_QUADPLANE_ENABLED is true, right?