Commit Graph

62 Commits

Author SHA1 Message Date
murata 501bd61820 Plane: Initialize a string array 2022-06-22 17:25:56 +10:00
Iampete1 34609d327d Plane: Quadplane: force convertions of Q_M_PMW_* params if invalid and add arming check 2022-06-08 17:08:23 +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
Andrew Tridgell 20f641de99 Plane: refuse arming if we are in a landing sequence
this helps when the aircraft has gone into a landing sequence due to a
failsafe before it is armed. Arming while in the landing sequence is
very unlikely to be what the user wants
2022-05-15 21:17:50 +10:00
Andrew Tridgell 680162cef0 Plane: added a value for RTL_AUTOLAND to disable arming check
set RTL_AUTOLAND=3 to get go-around but not RTL DO_LAND_START usage
2022-03-23 20:22:58 +11:00
Andrew Tridgell a1856c5c22 Plane: added an arming check for Q_ASSIST_SPEED
Q_ASSIST should really be enabled for all non-tailsitter
quadplanes. This arming check will help users remember to configure it
2022-03-16 09:29:14 +11:00
Andrew Tridgell 82937ca778 Plane: check that RTL_AUTOLAND is set if using DO_LAND_START 2022-03-14 09:52:41 +11:00
Andrew Tridgell 8ccf84d9a3 Plane: disallow mavlink disarm while flying
this relies on is_flying(), and we will need to watch for reports of
the heuristics failing
2022-03-09 17:13:45 +11:00
Andrew Tridgell 1c89b7f3a2 Plane: check for VTOL takeoff in AUTO
if the "only arm in Q modes" bit is set in Q_OPTIONS then check that
in AUTO mode we are in a VTOL takeoff WP
2021-12-07 12:51:18 +11:00
Iampete1 5ba2bd675a Plane: move quadplane arming checks to own function and add angle max and tiltrotor / tailsitter checks 2021-11-09 10:45:22 +11:00
Iampete1 b31ce6734a Plane: get throttle input return float 2021-10-20 18:29:58 +11:00
Andrew Tridgell 493d8979d5 Plane: reset target speed on disarm
allows for multiple auto missions with DO_CHANGE_SPEED
2021-10-11 10:47:52 +11:00
Iampete1 cdfda2bd9b Plane: allow arming in quided with only arm in Qmodes Q_OPTION 2021-09-22 18:14:16 +10:00
Iampete1 cc89a8cc48 Plane: remove airmode Q_OPTION 2021-09-21 09:36:24 +10:00
Peter Barker 3d34e061fe ArduPlane: add and use HAL_QUADPLANE_ENABLED 2021-09-14 11:23:18 +10:00
Hwurzburg 327f3a0803 ArduPlane: add option for man throttle center to be TRIM_THROTTLE 2021-09-07 10:02:26 +10:00
Iampete1 4efa9866fa Plane: arming: do not disable asisted flight airmode on disarm 2021-09-01 08:33:24 +10:00
Iampete1 d372907a98 Plane: Quadplane: add Q_OPTION to only allow arming in Qmodes and auto. 2021-08-24 10:39:12 +10:00
Peter Barker 5b7ec1fab4 Plane: do not run any prearm checks if we are armed or arming is not required
Co-authored-by: TunaLobster <unknown>
2021-07-07 18:20:54 +10:00
Andrew Tridgell 8482f9af27 Plane: fixed motor test with DShot VTOL motors
need to arm when running the motor test
2021-07-05 07:36:28 +10:00
Hwurzburg d15e01d390 Plane: fix DO_CHANGE_SPEED airspeed to impact only AUTO and GUIDED modes 2021-03-16 10:09:34 +11:00
James O'Shannessy aae092b88f ArduPlane: Remove all unused geofence capability
ArduPlane: Remove missed geofence logic
2021-03-05 14:52:46 +11:00
Peter Barker b6d0208287 Plane: allow arming in all auto-throttle modes
... except QRTL and QLAND which are now universally denied for arming.
2021-02-03 18:22:10 +11:00
Randy Mackay d487d6152e Plane: ahrs pre-arm always runs position checks 2021-01-26 10:46:49 +11:00
Peter Barker b698546b70 ArduPlane: add do_disarm_checks boolean to disarm call
this creates symmetry between arming and disarming, at least as far as
the top-level arm() and disarm() calls are concerned.
2021-01-12 08:48:44 +09: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 9b2ef4f6f1 Plane: move rudder-arming arm checks into Plane's AP_Arming 2020-12-29 12:55:27 +11:00
Andrew Tridgell cd6ddf7d4f Plane: fixed disable of geofence on quadplane landing
fixes #15917
2020-12-02 18:33:07 +11:00
Andrew Tridgell 52f61c7ac1 Plane: make FENCE_AUTOENABLE an AP_Enum 2020-12-02 18:33:07 +11:00
Randy Mackay 60b4953751 Plane: integrate ahrs.pre_arm_check 2020-10-07 11:53:07 +11:00
Randy Mackay eeaf135cca AP_Arming: integrate ahrs.pre_arm_check 2020-10-07 11:53:07 +11:00
Iampete1 fc67c2c13b Plane: check AP_Motors has init correcly for Quadplanes 2020-09-22 09:12:14 +10:00
Mark Whitehorn 629f2153e0 Plane: move arming delay logic into AP_Arming_Plane 2020-09-08 10:54:42 +10:00
Mark Whitehorn 2b4772269d Plane: tiltrotors: allow vectored yaw motor tilt when disarmed
add disarm tilt delay
add arming delay
add Q_OPTIONS for disarmed motor tilt and delayed arming
add comment explaining arming delay option
eliminate millis() wrap in arming delay
2020-09-08 10:54:42 +10:00
Mark Whitehorn e22d9398d3 Plane: add AirMode RC option for quadplanes
add Q_OPTION for AirMode (auto-enabled if RCx_OPTION ARMDISARM assigned)
    bugfix: manual throttle mix for qacro
    qualify auto airmode on/off
    add Air Mode to Plane RC_OPTION metadata
    restrict airmode to manual throttle modes
    add qhover to manual throttle mix
    move air_mode from Plane to QuadPlane
    add Mode::is_vtol_man_throttle()
2020-08-13 08:47:27 +10:00
Andrew Tridgell 3c705d1c60 Plane: added THR_FAILSAFE=2 option
this allows for RC inputs to be ignored at low throttle, but won't
trigger failsafe. It is meant for users flying BVLOS missions, where
they want GCS failsafe enabled, but don't want RC failsafe, and want
to be sure that RC inputs will be ignored at low RC throttle values

Thanks to suggestion from Pompecukor
2020-08-07 14:01:20 +10:00
Peter Barker 74dbcac40e ArduPlane: log disarm method 2020-02-22 12:16:29 +11:00
Peter Barker a74d754720 Plane: AP_Arming now logs arm/disarm events 2020-01-14 11:39:36 +11:00
Peter Barker fa0d0c6176 Plane: remove bogus ARMING_CHECK_NONE 'bitmask value' 2019-10-08 10:31:07 +11:00
Michael du Breuil 562b155f63 Plane: Remove unused geofence enable reason 2019-09-23 17:31:33 -06:00
Peter Barker 1b36d64794 Plane: correct compilation with GEOFENCE_ENABLED==DISABLED 2019-08-20 23:03:32 -07:00
Peter Barker b7b67f523d Plane: pass format string through to check_failed 2019-08-05 14:18:05 +10:00
Andrew Tridgell 5076058459 Plane: added FENCE_AUTOENABLE=3 option
this enables the fence when arming. If the vehicle is outside the
fence or it can't be enabled then arming fails
2019-06-11 06:58:47 +10:00
Peter Barker 13f7022cec Plane: move Arming functions into AP_Arming file 2019-05-30 16:02:10 +09:00
Peter Barker 92ce75517c Plane: move check for ARMING_CHECK_NONE back into Plane
Plane allows all prearm and arm checks to be bypassed with
ARMING_CHECK_NONE.  Not all vehicles allow this, so move this bypass
back into Plane.
2019-05-30 07:37:30 +09:00
Andrew Tridgell ebbe01bd83 Plane: bypass arming checks for armed watchdog reboot 2019-04-22 16:53:35 +10:00
Michael du Breuil f5511d6119 Plane: Check all EKF cores for health 2019-04-09 10:53:25 +10:00
Tom Pittenger 0270c57530 Plane: massive refactor and creation of Mode class 2019-04-02 16:28:52 +11:00
Peter Barker cf45b54070 Plane: quadplane use prearm checks from Attitude and Position controllers 2019-03-12 10:14:14 +11:00
IamPete1 f24c6785f2 Plane: add E-stop 2019-02-27 08:51:24 +09:00