Commit Graph

21 Commits

Author SHA1 Message Date
Iampete1 549dd3875d Plane: add mode ahrs convenience refence 2023-02-21 11:27:24 +11:00
Iampete1 2ffe677d39 Plane: combine per mode arm and pre-arm checks 2023-02-15 19:43:40 +11:00
Peter Barker de4dda2d17 ArduPlane: change namespace of MultiCopter and FixedWing params
this stops the libraries knowing anything about AP_Vehicle
2022-11-09 19:04:37 +11:00
Andrew Tridgell 53a7866ba3 Plane: cope with QGC retrying AUTO mode
QGC tries several times to enter AUTO even when it is refused. We need
to keep refusing
2022-05-19 06:11:57 +10:00
Andrew Tridgell 86c2404654 Plane: increased safety of guided -> auto quadplane takeoff
when we arm in guided mode then enter a special guided_wait_takeoff
state. We keep motors suppressed until one of the following happens

  1) disarm
  2) guided takeoff command
  3) change to AUTO with a takeoff waypoint as first nav waypoint
  4) change to another mode

while in this state we don't go to throttle unlimited, and will refuse
a change to AUTO mode if the first waypoint is not a takeoff. If we
try to switch to RTL then we will instead use QLAND

This state is needed to cope with the takeoff sequence used by QGC on
common controllers such as the MX16, which do this on a "takeoff"
swipe:

  - changes mode to GUIDED
  - arms
  - changes mode to AUTO
2022-05-18 06:43:16 +10:00
Hwurzburg 0efb2f2048 Plane: disable TECS use during NAV_SCRIPT_TIME 2022-02-07 12:34:15 +11:00
Peter Barker 70562021ac ArduPlane: move from ENABLE_SCRIPTING to AP_SCRIPTING_ENABLED 2021-11-15 20:27:40 +11:00
Andrew Tridgell 0c1e576544 Plane: added support for NAV_SCRIPT_TIME 2021-11-08 21:08:52 +11:00
Iampete1 2f4661c52f Plane: use float for set/get output scaled 2021-10-20 18:29:58 +11:00
Peter Barker 3d34e061fe ArduPlane: add and use HAL_QUADPLANE_ENABLED 2021-09-14 11:23:18 +10:00
Peter Barker 6baaf03c8c Plane: move auto_throttle_mode to being a method on each mode 2021-01-10 16:04:30 +11:00
Peter Barker f6cb1b5ad6 Plane: use a method on Mode for auto-navigation-mode
Avoids the state getting stale, which it will with a failed attempt to
go into qautotune, for example.
2021-01-10 16:04:30 +11:00
Peter Barker a1ea1306a1 Plane: use pure-virtual method for allows_throttle_nudging
In place of a state variable which could become stale
2021-01-10 16:04:30 +11:00
Samuel Tabor 10111f92d5 Plane: Rename SOARING_ENABLED to HAL_SOARING_ENABLED and don't compare to ENABLED. 2020-09-24 07:30:48 +10:00
Samuel Tabor 836be4b4b4 Plane: Remove _navigate indirection in Mode. 2020-08-20 13:02:06 +10:00
Samuel Tabor 06eea6ed9f Plane: Move navigation functions into flight mode classes. 2020-08-20 13:02:06 +10:00
Michael du Breuil ee96ec7f0d Plane: Support new AP_Vehicle::set_mode 2019-10-25 08:48:22 +08:00
sas 9405fd6958 Plane: remove unused location argument to control_auto 2019-10-08 10:49:51 +11:00
Andrew Tridgell a7c6e9c007 Plane: restore WP num on watchdog reset 2019-05-15 15:33:48 +10:00
Andrew Tridgell fb061a225a Plane: fixed build with HAL_MINIMIZE_FEATURES enabled
thanks to PompeCukor for noticing
2019-04-08 09:34:15 +10:00
Tom Pittenger 0270c57530 Plane: massive refactor and creation of Mode class 2019-04-02 16:28:52 +11:00