Commit Graph

194 Commits

Author SHA1 Message Date
Randy Mackay
90961bb104 Copter: protect against multiple arming messages
Protect against the GCS sending multiple arming messages close together
which disrupts the gyro calibration
2015-02-03 09:46:46 +09:00
Randy Mackay
105e2e19ac Copter: skip pre-arm checks when already armed 2015-01-08 15:17:48 +09:00
Randy Mackay
6b236eb7ea Copter: set pre_arm_gps_check flag 2014-12-26 15:10:34 +09:00
Randy Mackay
6327f4adf1 Copter: allow arming in GUIDED only from GCS
Also changed mode_allows_arming function to accept arming_from_gcs param
Also remove AUTOTUNE from arming list
2014-12-24 14:44:53 +09:00
Jonathan Challinger
c65cb45c07 Copter: move all arm check logic into arm_checks 2014-12-24 14:44:53 +09:00
Jonathan Challinger
7ea5e69f9c Copter: auto-disarm if land complete regardless of mode 2014-12-24 14:44:51 +09:00
Jonathan Challinger
9fc62b5db2 Copter: use ap.throttle_zero instead of rc_3.control_in in auto_disarm_check 2014-12-24 14:44:50 +09:00
Randy Mackay
ddb8796d2c Copter: return false when arming fails 2014-10-29 15:59:54 +09:00
Randy Mackay
683f3a55c4 Copter: re-enable CPU failsafe if arming fails 2014-10-29 15:59:22 +09:00
Randy Mackay
dc3509ef55 Copter: fail to arm if gyro cal fails 2014-10-29 15:45:56 +09:00
Jonathan Challinger
ef0b934b10 Copter: don't stop logging on disarm when LOG_WHEN_DISARMED is set 2014-10-29 15:42:16 +09:00
Randy Mackay
6537432b50 Copter: auto-trim start delays auto-disarm by 15sec
Fixes issue in which user only had 5 seconds after starting auto-trim to
raise the throttle before the auto-disarm would kick-in.
2014-10-09 22:42:47 +09:00
Randy Mackay
eb594775b7 Copter: pre-arm check that gyro cal succeeded 2014-10-09 10:25:47 +09:00
Randy Mackay
d66ffd5b07 Copter: use disparity threshold define for pre-arm checks
There are two duplicate checks, one in the pre-arm checks (i.e. checks
run every 15 seconds or so before the vehicle is armed) and one in the
arming checks (run immediately before arming).  The definition in the
pre-arm checks was still using the old hardcoded value.
2014-09-23 19:33:53 +09:00
Randy Mackay
5f909f1a73 Copter: add land_complete_maybe flag 2014-09-19 22:41:38 +09:00
Randy Mackay
a1ea43461a Copter: typo fix for baro vs inav alt disparity definition 2014-09-19 22:41:28 +09:00
Randy Mackay
b8c74b7363 Copter: define limit for baro vs inav alt disparity 2014-09-19 22:41:25 +09:00
Andre Kjellstrup
be2f308802 Copter: reset battery_fs after dis/rearming 2014-09-19 22:41:20 +09:00
Randy Mackay
cdc4038f27 Copter: pre-arm consistency check of gyros 2014-09-04 15:23:56 +09:00
Randy Mackay
b214b8ba15 Copter: add short delay to arming to allow RC input
The short delay gives time for the RC inputs to be processed which
removes the chance of a false-positive on the "late frame" radio check.
A false positive could lead to an immediate disarm right after arming.
2014-09-04 15:23:51 +09:00
Randy Mackay
8e7b93d1b7 Copter: pre-arm consistency check of accels 2014-09-03 13:52:58 +09:00
Randy Mackay
6c0b9a2cfc Copter: check all gyros and accels in pre-arm check 2014-09-03 11:38:45 +09:00
Randy Mackay
7802c85b5f Copter: pre-arm check of internal vs ext compass 2014-08-26 22:44:20 +09:00
Randy Mackay
4038cd2fbd Copter: remote arming check reference to compass learning 2014-08-26 22:44:18 +09:00
Randy Mackay
7686660c73 Copter: use baro healthy() 2014-08-14 16:03:23 +09:00
Randy Mackay
2c0699c9ed Copter: auto-disarm in Drift, Sport, OF_Loiter 2014-07-31 22:58:43 +09:00
Randy Mackay
c9667131dd Copter: log flight mode after arming 2014-07-29 11:43:47 +09:00
Randy Mackay
71cbcacf50 Copter: fix arming tone to sound before arming
Also fixed bug in which vehicle could appear to be armed (according to
LEDs) but is not.  This could occur if pilot had raised the throttle
very high during the calibration that happens just before arming.
2014-07-25 13:09:07 +09:00
Randy Mackay
7f9cd20377 Copter: set UARTs non-blocking at end of initialisation
Previously we were setting to non-block after arming but this reduce the
chance of bumping into a NuttX USB driver issue that can cause the uart
to become unresponsive and also makes Copter consistent with Plane
2014-07-11 15:27:29 +09:00
Randy Mackay
65e5367619 Copter: rename hybrid to poshold 2014-07-11 14:09:01 +09:00
Randy Mackay
2c085c300d Copter: only save compass offsets when learning is on 2014-07-10 20:25:16 +09:00
Randy Mackay
b799020e25 Copter: pre-arm check uses compass configured method 2014-07-10 20:24:53 +09:00
Jonathan Challinger
cd08ec5a5f Copter: allow auto-disarm in autotune mode 2014-07-06 19:27:27 +09:00
Jonathan Challinger
ff1f54b390 Copter: allow disarm in autotune mode 2014-07-06 19:27:23 +09:00
Randy Mackay
f5f206b055 Copter: set inav alt to zero when arming 2014-06-06 18:42:45 +09:00
Randy Mackay
715e9c0474 Copter: reset mission when disarming 2014-05-15 16:21:32 +09:00
Randy Mackay
b4dcad725c Copter: remove unused servo_write function 2014-05-09 13:48:38 +09:00
Randy Mackay
ae9477600c Copter: add mavlink motor_test
Based on original work by Nils Hogberg
2014-04-29 11:31:45 +09:00
Randy Mackay
d36f137bf8 Copter: allow arming, disarming in Hybrid mode 2014-04-23 14:59:35 +09:00
Emile Castelnuovo
a9bd4e9da1 VRBRAIN: added ignore board voltage check for VRBRAIN boards. 2014-04-08 16:19:20 +10:00
Andrew Tridgell
640b64f5e4 Copter: convert to new GPS API 2014-04-01 06:38:24 +11:00
Kevin Hester
5fb3b031f1 Copter: disambiguate the various causes of "Bad GPS Pos"
I've seen a fair number of user questions where they are confused by
"Bad GPS Pos" on their GCS/not being allowed to arm.  This change splits
the remaining causes of this fault into separate messages.

Hopefully this increases the odds of the user self diagnosing...
2014-03-31 21:59:12 +09:00
Jonathan Challinger
608b8b0a2c Copter: integrate Notify arming failure when using yaw sticks 2014-03-31 20:34:29 +09:00
Andrew Tridgell
3362e42478 Copter: consider health of primary compass in SYS_STATUS, pre-arm and compassmot
this should prevent users from taking off with only secondary compass
2014-03-24 19:52:08 +11:00
Andrew Tridgell
a45d77f893 Copter: set the ahrs.set_armed() flag 2014-02-19 10:53:44 +11:00
Randy Mackay
aab9b30bf6 Copter: replace APM_PI with AC_P
Saves about 90bytes of RAM
2014-02-15 06:09:08 +11:00
Andrew Tridgell
24f2ac20de Copter: removed HIL_MODE_ATTITUDE
this really can't work any more, as AHRS can't support it
2014-02-15 05:29:46 +11:00
Randy Mackay
006cf58b2d Copter: fix merge error for g.angle_max 2014-02-15 05:27:51 +11:00
Randy Mackay
38d5148b99 Copter: remove reset_I_all
Each controller should reset the I terms as needed
2014-02-15 05:27:47 +11:00
Randy Mackay
aec67cd3df Copter: integrate control_autotune 2014-02-15 05:27:44 +11:00