Commit Graph

345 Commits

Author SHA1 Message Date
Peter Barker 6ab9089fff AP_Arming: add accessor to retrieve last disarm method 2020-08-05 16:26:19 +09:00
Mark Whitehorn 58463e67c5 AP_Arming: default throttle pre-arm check to enabled 2020-08-04 10:26:45 +10:00
murata dbb19dd402 AP_Arming: Shorten the distinguished name.
AP_Arming: AP_Arming: Shorten the distinguished name.
2020-07-28 09:09:27 +09:00
Mark Whitehorn 285f16e829 AP_Arming: add pre-arm check for VTOL manual forward throttle 2020-07-07 08:37:46 +10:00
Peter Barker fce9046dcf AP_Arming: add generator checks 2020-07-03 08:21:42 +09:00
Henry Wurzburg 9d86a3e2ef AP_Arming: fix parameters appearing in wiki param list erroneously 2020-06-30 16:24:19 +10:00
Michael du Breuil e02145efa0 AP_Arming: Use control_in rather then in_trim_dz() to cope with override only vehicles 2020-06-23 09:33:30 +10:00
Peter Barker 8fd50dd66e AP_Arming: rename 'enum aux_switch_pos_t' to 'enum class AuxSwitchPos' 2020-06-12 08:11:46 +10:00
mmk0102 22d052b711 AP_Arming: check for duplicate auxswitch options 2020-06-02 09:43:31 +10:00
Andy Piper fab8168f5c AP_Arming: allow FFT to report failure reason. allow FFT check to be disabled.
document FFT arming check and make sure the appropriate side effect happens regardless
2020-05-24 07:43:34 +10:00
Peter Barker 70a9abfaff AP_InternalError: emit stringification of internal errors 2020-05-06 13:23:15 +10:00
Peter Barker 75514dfdfe AP_Arming: emit stringification of internal errors 2020-05-06 13:23:15 +10:00
Peter Barker b38d2c6194 AP_Arming: regularise CAN pre-arm failure messages
AP_Arming tacks on the sub-system bit.

Remove PiccoloCAN's silly nullptr check

Require the library to supply the failure message (no default message)

Remove default cases so authors know to think about places they should
add things.
2020-05-05 11:27:53 +10:00
Tatsuya Yamaguchi de854a2ffe AP_Arming: pre-arm check for disarm aux switch 2020-05-05 10:09:30 +09:00
Peter Barker 119eef9954 AP_Arming: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Tatsuya Yamaguchi c4fe6fce1c AP_Arming: make RC check message clearer 2020-04-24 10:52:33 +09:00
murata 2af70f5e60 AP_Arming: Display mag field value 2020-04-21 10:51:48 +09:00
Randy Mackay 1b1687f43d AP_Arming: integrate visual odometry pre_arm_check 2020-04-09 19:41:08 +09:00
Michael du Breuil 73c5c2e1bb AP_Arming: Check that sticks are neutral 2020-04-07 14:01:12 -07:00
Siddharth Purohit 575ac9224e AP_Arming: fix error unannotated fall-through between switch labels 2020-04-01 17:10:36 +11:00
Peter Barker a32e54ea17 AP_Arming: correct toymode compilation for recent disarm-reason changes 2020-03-03 21:56:33 +09:00
Randy Mackay 05a8e34d5c AP_Arming: support auxiliary authorisation 2020-02-25 19:55:54 +09:00
Randy Mackay df8bf27a7f AP_Arming: get_enabled_checks returns uint32_t 2020-02-25 19:55:54 +09:00
Peter Barker 4d0c61970d ArduSub: log disarm method 2020-02-22 12:16:29 +11:00
Peter Barker 7b9cdd6d06 AP_Arming: log disarm method 2020-02-22 12:16:29 +11:00
Andy Piper 7663c67eec AP_Arming: gyrofft arming checks 2020-02-22 11:15:37 +11:00
Siddharth Purohit 7da331535c AP_Arming: add arming message for compass not detected but assigned 2020-02-19 13:59:53 +09:00
Siddharth Purohit 653fad44d4 AP_Arming: Primary Compass is always at serial# 0 2020-02-19 13:59:53 +09:00
Peter Barker 62c0078d5f AP_Arming: move logging of armed/disarm events into AP_Arming base class 2020-01-14 11:39:36 +11:00
Peter Barker 3b8a2fb262 AP_Arming: log arming 2020-01-14 11:39:36 +11:00
Andy Piper c16c60a761 AP_Arming: add camera arming checks 2019-12-30 13:02:04 +11:00
Oliver Walters 2e0d2e2db0 AP_Arming: added support for Piccolo CAN ESCs 2019-12-22 09:48:40 +11:00
Peter Barker b3f87768e2 AP_Arming: tpyo fix in parameter documentation 2019-12-05 12:17:06 +08:00
Randy Mackay 356ece6682 AP_Arming: add pre-arm system check that scripting init succeeded 2019-12-03 12:48:32 +08:00
Randy Mackay 4bcf66481f AP_Arming: add mandatory_checks
These are checks that can never be bypassed
2019-12-03 08:06:39 +08:00
Randy Mackay f71e55e368 AP_Arming: add mission and rangefinder to param desc 2019-11-19 10:16:25 +11:00
Randy Mackay b796ac93f0 AP_Arming: add terrain init check to system checks 2019-11-19 10:16:25 +11:00
Peter Barker 64281eee60 AC_Arming: adjust for proximity status namespace change 2019-10-31 11:58:15 +08:00
Peter Barker f4433773be AP_Arming: adjust for rename of AP_UAVCAN_Server to AP_UAVCAN_DNA_Server 2019-10-25 20:24:54 +11:00
Siddharth Purohit 9b2c060cc5 AP_Arming: add support for reporting UAVCAN Server errors 2019-10-19 09:55:38 +11:00
Peter Barker 5428d13502 AP_Arming: remove bogus ARMING_CHECK_NONE 'bitmask value'
This looks like a bitmask value, but if you treat it like one (and
people have in the past!) by using logical operations then you get the
incorrect result.

Places which were checking for equivalence to ARMING_CHECK_NONE now
simply check the bitmask to see if it is all-empty.
2019-10-08 10:31:07 +11:00
Michael du Breuil d8bce8295e AP_Arming: Directly include needed headers 2019-08-28 13:13:03 +10:00
Randy Mackay 2bfc26621a AP_Arming: resolve check_failed compiler warning 2019-08-08 12:53:51 +09:00
Peter Barker 95b8c12454 AP_Arming: mark check_failed as taking a format string 2019-08-05 14:18:05 +10:00
Michael du Breuil 4396540a22 AP_Arming: Add rangefinder checks 2019-07-30 10:42:16 +10:00
Michael du Breuil 4b2cb45ac0 AP_Arming: Cope with new AP_GPS::first_unconfigured_gps 2019-07-30 10:12:43 +10:00
Michael du Breuil 5d3cfcb59c AP_Arming: Add scripting method 2019-07-23 10:05:29 +09:00
Peter Barker bca411b2c4 AP_Arming: reduce length of internal errors errorstring prefix
MissionPlanner's HUD requires a short string for this to be useful
2019-07-12 18:39:06 +10:00
Peter Barker 84eff51539 AP_Arming: remove stray comment on removed parameter
Almost certainly a rebase issue
2019-07-02 10:03:41 +10:00
Michael du Breuil eeca59d1ef AP_Arming: Include needed AP_Baro.h 2019-06-27 14:56:21 +10:00
Andrew Tridgell 8fc8bc4d84 AP_Arming: notify logging system of an arming failure 2019-06-21 11:40:53 +10:00
Michael du Breuil c70107cabb AP_Arming: Fix AP_GPS.h include 2019-06-18 10:02:05 +10:00
Peter Barker bb14ec1a2c AP_Arming: make proximity sensor checks common 2019-06-04 08:45:34 +09:00
Peter Barker 1c4b5b0d73 AP_Arming: move arm status statustext messages back into vehicles
Not all vehicle maintainers like having these emitted as part of normal
operations.
2019-05-30 07:37:30 +09:00
Peter Barker 61a2be1470 AP_Arming: change arm and disarm to account for Copter now using them 2019-05-30 07:37:30 +09:00
Peter Barker 84b16ea3dd AP_Arming: move check for ARMING_CHECK_NONE back into relevant vehicles
Plane and Rover allow all prearm and arm checks to be bypassed with
ARMING_CHECK_NONE.  Not all vehicles allow this, so move this bypass
back into Plane and Rover.
2019-05-30 07:37:30 +09:00
Peter Barker aff6cb424f AP_Arming: move Log_Write_Arm_Disarm in, make disarm virtual 2019-05-30 07:37:30 +09:00
Peter Barker d384827291 AP_Arming: add singleton 2019-05-30 07:37:30 +09:00
Peter Barker 776c111d3c AP_Arming: do not permit arming if any internal errors have occured 2019-04-25 13:05:18 +10:00
Peter Barker 45ebbf2877 AP_Arming: correct check against ARMING_CHECK_NONE
As opposed to all of the other ARMING_CHECK values this one isn't
actually a mask
2019-04-25 13:05:18 +10:00
Andrew Tridgell 9c6c4101c9 AP_Arming: make arm_checks() virtual
# Conflicts:
#	libraries/AP_Arming/AP_Arming.h
2019-04-22 16:53:35 +10:00
Pierre Kancir 6397cb0c0e AP_Arming: use get_distance instead of location_diff 2019-04-08 08:00:52 -07:00
Michael du Breuil 63fcd23f7b AP_Arming: Include AP_Logger directly 2019-04-05 20:12:53 +11:00
Tom Pittenger 4178ef98ba AP_Arming: rename dataflash to logger 2019-03-28 16:40:57 +11:00
Peter Barker 0dacf78c12 AP_Arming: use enum class for ArmingMethod and ArmingRequired 2019-03-12 19:48:14 +11:00
Peter Barker 7bdd2eb755 AP_Arming: move checking of fence up 2019-03-08 08:57:27 +09:00
Peter Barker 12981b1f07 AP_Arming: correct use of failure messages as format strings
This is important as if the returned string happens to contain
substitutions (%s in particular), we can attempt to pull random data
off the stack and incorporate it in the string.

This sort of bug is rather famous for serious explots in sendmail.

This could be bad if your stack is relatively full and the memory after
it is inaccessible.
2019-03-07 14:44:26 +11:00
Randy Mackay 26fd334882 AP_Arming: provide better feedback on attitude check 2019-03-07 09:34:39 +09:00
Randy Mackay b805c40bf7 AP_Arming: add ahrs attitude check 2019-02-22 13:00:07 +09:00
Randy Mackay 72fabb5cd3 AP_Arming: always run compass calibration checks 2019-02-22 13:00:07 +09:00
Tom Pittenger 13f0ad8a1c AP_Arming: unify singleton naming to _singleton and get_singleton() 2019-02-10 19:09:58 -07:00
Nigel Williams b2c5d7f04a AP_Arming: Make logging check consider "turned off" as valid
When ARMING_CHECKS has ARMING_CHECK_LOGGING, consider having no
logging backend to be valid.
2019-01-30 19:12:01 +11:00
Michael du Breuil 1b2b7385a2 AP_Arming: Reduce header scope, remove width specifier 2019-01-25 09:47:17 +09:00
Peter Barker 6fc76a32af GLOBAL: use AP::logger() and strip redundant Log_ from methods 2019-01-18 18:08:20 +11:00
Peter Barker b47733142f GLOBAL: rename DataFlash_Class to AP_Logger 2019-01-18 18:08:20 +11:00
Francisco Ferreira de1d02d697
AP_Arming: support KDECAN 2019-01-18 00:57:33 +00:00
Michael du Breuil c4ff1f4307 AP_Arming: Allow disarming to force the safety switch 2019-01-15 08:59:25 +11:00
Pierre Kancir 1bd9b61bf6 AP_Arming: const correctness 2019-01-11 08:38:53 +09:00
Pierre Kancir dd2798d099 AP_Arming: remove unused parameter and variable 2019-01-11 08:38:53 +09:00
Pierre Kancir 0800f72377 AP_Arming: untangle header inclusion 2019-01-11 08:38:53 +09:00
Michael du Breuil c3de3cc923 AP_Arming: Add checks that the mission contains expected items 2019-01-08 10:39:50 +11:00
Michael du Breuil ad01d345d1 AP_Arming: Fix badly formatter airspeed message 2018-12-18 10:11:22 +11:00
Randy Mackay e702ca7202 AP_Arming: resolve compiler warning 2018-11-14 20:40:46 +09:00
Michael du Breuil e56f12b68e AP_Arming: Add servo voltage check, paramertise the Vcc check 2018-11-12 23:29:04 +00:00
Andrew Tridgell 8d5b9521ad AP_Arming: added IOMCU health check 2018-11-07 07:35:45 +11:00
Peter Barker 21eacc5e31 AP_Arming: account for snprintf now null-terminating strings 2018-10-21 07:54:30 +11:00
Andrew Tridgell b1928d959b AP_Arming: fixed build warnings 2018-10-17 12:54:22 +11:00
Michael du Breuil a8741f62f9 AP_Arming: Use AP_BattMonitor's arming checks for the battery 2018-10-09 00:44:46 +01:00
Randy Mackay 7a7533724a AP_Arming: rename rudder_arming to get_rudder_arming_type 2018-09-11 19:34:39 +10:00
Randy Mackay f039c6d5f4 AP_Arming: minor format fix 2018-09-11 19:34:39 +10:00
Randy Mackay ba2b9f3d47 AP_Arming: add RUDDER parameter 2018-09-11 19:34:39 +10:00
Peter Barker f258a25138 AP_Arming: remove double PreArm: in battery prearm report
Also use check_failed throughout
2018-08-27 11:12:52 +09:00
Francisco Ferreira 62a4f08e12 AP_Arming: fix system check 2018-08-14 10:17:38 +10:00
Peter Barker eaefdcfac2 AP_Arming: remove min-max-configured pre-arm checks 2018-08-07 09:45:09 +10:00
Peter Barker 1eacd685e3 AP_Arming: use rc() method to get rc singleton 2018-08-01 12:11:30 +09:00
Andrew Tridgell 787493277e AP_Arming: only check trim on valid channel count 2018-07-24 19:44:03 +10:00
Andrew Tridgell 9ca2c11333 AP_Arming: use check_enabled() in storage check 2018-07-10 15:41:44 +10:00
Andrew Tridgell bf1bca6820 AP_Arming: added arming check for storage health 2018-07-10 15:41:44 +10:00
Peter Barker e400a0e351 AP_Arming: use ArmingMethod enumeration 2018-07-03 15:16:38 +10:00
Peter Barker 6979f0d3a0 AP_Arming: remove unused arming_method member 2018-07-03 15:16:38 +10:00
Peter Barker 598f82a2fe AP_Arming: use singletons in AP_Arming 2018-07-03 13:44:11 +10:00
Peter Barker 5d1d435451 AP_Arming: add type-correctness for is-armed check
Also, correct the constant we're testing against
2018-06-28 12:48:31 +10:00
Peter Barker 72d7181e0d AP_Arming: remove pointless initialisations
These are part of a static object
2018-06-28 12:48:31 +10:00
Peter Barker e3dc408295 AP_Arming: move copter-specific code into Copter subclass 2018-06-28 12:48:31 +10:00
Michael du Breuil d977ca091a AP_Arming: Correct an edge case that would not run compass checks 2018-06-26 09:26:29 +10:00
Peter Barker cba61598b1 AP_Arming: a check_failed function 2018-06-23 15:33:19 +10:00
Peter Barker 997a527c1b AP_Arming: cache results of get_gyro_count and get_accel_count 2018-06-21 16:25:29 +01:00
Peter Barker 4055256878 AP_Arming: cache AP_HAL_millis 2018-06-21 16:25:29 +01:00
Peter Barker 410e72f83c AP_Arming: break out a gyros-consistent method 2018-06-21 16:25:29 +01:00
Peter Barker d2b8ea4bb0 AP_Arming: break out an accels-consistent method 2018-06-21 16:25:29 +01:00
Peter Barker d8128ba69a AP_Arming: option to force arm, bypassing checks 2018-06-20 11:43:38 +10:00
Michael du Breuil 81e453dee3 AP_Arming: Restrict GPS/AHRS difference to a 2D solution 2018-05-12 09:11:05 +09:00
Michael du Breuil 7830dab0a8 AP_Arming: Add a servo check that (<= min trim max) for all channels 2018-04-24 01:16:26 +01:00
Michael du Breuil 1b18a78d1d AP_Arming: Add a RC check that (<= min trim max) for all channels 2018-04-24 01:16:26 +01:00
Jacob Walser 2212532028 AP_Arming: Clarify/bring commonality to RC Channels check description 2018-04-12 14:20:49 +09:00
Jacob Walser 409ff66231 AP_Arming: correct parameter description 2018-04-12 14:20:49 +09:00
Peter Barker cc5af90d1a AP_Arming: home state has moved to AP_AHRS 2018-03-19 10:32:37 +09:00
Peter Barker f0d06e7a9c AP_Arming: use ins singleton 2018-03-16 00:37:35 -07:00
Peter Barker 8d8f2208c0 AP_Arming: use baro singleton 2018-03-08 21:20:05 -08:00
Andrew Tridgell 8bb0ad7f3a AP_Arming: check all airspeed sensors are healthy 2018-01-16 07:14:20 +11:00
Peter Barker 738377c089 AP_Arming: remove airspeed arming check bits from non-plane vehicles 2017-12-16 11:08:35 +11:00
Peter Barker a8aa6a7822 AP_Arming: use gps singleton 2017-11-15 13:43:03 +00:00
Peter Barker 25a0e6378e AP_Arming: manual transmitter checks call rc calibration checks 2017-11-08 19:07:57 +09:00
Peter Barker 49dd5f4f80 Copter: prearm board voltage checks are called in parent class 2017-11-08 19:07:53 +09:00
Peter Barker 30c1a040d7 Copter: prearm baro checks are called in parent class 2017-11-08 19:07:44 +09:00
Michael du Breuil ef0b52e017 AP_Arming: Run extra GPS checks when arming 2017-11-06 01:33:57 +00:00
John deVere 951c947bec AP_Arming: update param description for VOLT_MIN 2017-10-30 09:46:51 +09:00
Lucas De Marchi 39aee74b29 AP_Arming: make constructor protected 2017-09-26 03:01:21 +01:00
Randy Mackay f029303d96 AP_Arming: check ahrs and gps differ by less than 10m 2017-09-19 10:30:15 +09:00
Michael du Breuil bde1b6e886 AP_Arming: Collapse GPS checks into the same branch 2017-09-13 13:36:40 +01:00
Michael du Breuil 3ab9b75df0 AP_Arming: Check GPS update rate as part of the GPS checks 2017-09-13 13:36:40 +01:00
Jacob Walser b8e7d23cc4 AP_Arming: Add bool check_min_max parameter for Copter/Sub RC checks 2017-08-16 11:37:46 -04:00
Peter Barker 7173025b43 AP_Arming: warn about uncalibrated throttle but do not fail check
We can tighten this check up later, and will allow us to use
this common function for Plane and Rover in the future
2017-08-14 15:32:25 +09:00
Peter Barker b2459c67d5 AP_Arming: move Copter RC checking code into library 2017-08-14 15:32:25 +09:00
Randy Mackay f5f6ec5238 AP_Arming: rename _MIN_VOLT to _VOLT_MIN
Also _MIN_VOLT2 to _VOLT2_MIN
2017-07-31 17:19:55 +09:00
Randy Mackay 2f3a57e0aa AP_Arming: minor variable type change
no functional change
2017-07-31 17:19:55 +09:00
Randy Mackay 330a6065ca AP_Arming: Copter gets MIN_VOLT parameters 2017-07-31 17:19:55 +09:00
Michael du Breuil 126296b61d AP_Arming: Compass calibration running is a pre arm failure, rather then an arming failure 2017-07-21 13:38:50 +09:00
Peter Barker 954eda990a AP_Arming: prepare log for arming and check it is ready
Also add comment that this should be the last check to be made
2017-07-19 16:37:28 +01:00
Peter Barker 999a5e6cda AP_Arming: correct bit used to indicate blended-gps-checking 2017-07-19 16:34:57 +01:00
Peter Barker b8ddf8a289 AP_Arming: use HAL_HAVE_BOARD_VOLTAGE rather than magic-0 2017-07-19 16:34:57 +01:00
Peter Barker 9e76223c34 AP_Arming: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas 9941e910ee AP_Arming: Use SI units conventions in parameter units
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
Dr.-Ing. Amilcar Do Carmo Lucas 95b09bc19e AP_Arming: fix a spell error in a parameter description
fix { indentation
2017-05-16 20:29:16 +09:00
Andrew Tridgell fafd940dd5 AP_Arming: use compass get_offsets_max() 2017-04-04 00:49:34 +01:00
Randy Mackay 69925d8b27 AP_Arming: shorten Accels failure message
This allow the message to fit on the MP HUD
2017-03-25 10:50:58 +09:00
Randy Mackay f340c118d4 AP_Arming: GPS blending health check renamed 2017-03-13 11:31:51 +11:00
Randy Mackay 4f0333892d AP_Arming: clarify GPS inconsistency message 2017-03-13 11:31:51 +11:00
Randy Mackay e398bb5c68 AP_Arming: make gps-checks virtual
Copter's GPS checks will override this
2017-03-13 11:31:51 +11:00
Randy Mackay 9f21649dc0 AP_Arming: add gps consistency and blend health check 2017-03-13 11:31:51 +11:00