Commit Graph

162 Commits

Author SHA1 Message Date
Randy Mackay
315d9da138 Copter: add ekf alt pre-arm and mode init checks 2020-08-20 12:41:40 +09:00
Siddharth Purohit
9b9954aa46 Copter: move to using CANManager library 2020-08-19 17:31:09 +10:00
Randy Mackay
9e06b78fda Copter: minor formatting fix 2020-08-10 09:34:28 +09:00
Josh Welsh
de9e9b90e5 Copter: Tradheli servo_test fix 2020-08-10 09:16:44 +09:00
Randy Mackay
f607ff28b3 Copter: integrate winch arming checks 2020-08-07 21:55:07 +09:00
murata
c9990cdecc Copter: Change Need 3D Fix message. 2020-07-11 08:33:55 +09:00
mmk0102
c0d7739929 Copter: move check for duplicate auxswitch options up 2020-06-02 09:43:31 +10:00
chobits
8ce27afba0 Copter: fix mode and fence gps check fail message 2020-05-11 10:41:06 +09:00
Tatsuya Yamaguchi
875fa36018 Copter: remove an unnecessary condition 2020-05-05 11:03:38 +10:00
Tatsuya Yamaguchi
9c3a0b863f Copter: use check_failed function for ESTOP arming check 2020-05-05 11:03:38 +10:00
murata
04b0a8a62a Copter: Add expected value to message 2020-04-14 10:09:05 +09:00
murata
f70ab73a1f Copter: Change arming messages 2020-04-08 08:55:17 +09:00
Peter Barker
ce5f23810b ArduCopter: log disarm method 2020-02-22 12:16:29 +11:00
Siddharth Purohit
defc1b5fcb ArduCopter: add arming message for compass not detected but assigned 2020-02-19 13:59:53 +09:00
Randy Mackay
74e3ca75a7 Copter: check_mot_pwm_params arming check returns true on success 2020-01-30 10:13:21 +09:00
ashvath
aecc10fdc3 Copter: Pre-arm check for mot_pwm 2020-01-30 08:29:56 +09:00
Matt Lawrence
d1feb93152 Copter: Add GCS failsafe pre-arm check 2020-01-21 13:48:54 +09:00
Peter Barker
e1b3bd2e42 ArduCopter: move logging of armed/disarm events into AP_Arming base class 2020-01-14 11:39:36 +11:00
Randy Mackay
ea22e888c7 Copter: improve RTL terrain following
RTL_ALT_TYPE replaces TERRAIN_FOLLOW param
return path built using rangefinder or terrain database
pre-arm checks for RTL_ALT_TYPE parameter
pre-arm checks of terrain data only run if RTL might use it
2019-12-17 20:02:01 +09:00
bnsgeyer
74d81e6d50 Copter: Change STAB_COL params to percent 2019-12-14 09:00:31 +09:00
Randy Mackay
2c3beb0f91 Copter: add mandatory gps checks 2019-12-03 08:06:39 +08:00
Randy Mackay
2cfdfb38e7 Copter: pre-arm check for Toshiba ESCs disabled with parameter flag 2019-11-26 11:56:33 +11:00
Peter Barker
e6c6189fe5 Copter: cope with change in namespace of LogEvent enum
Also move Acro Trainer types into an enum class as the global defines
interfere with the Event names.

Also eliminate the Log_Write_Event wrappers.
2019-11-05 08:19:26 +08:00
Randy Mackay
527e76a047 Copter: add pre-arm check that ToshibaCAN ESCs are present 2019-11-01 16:09:52 +08:00
Peter Barker
bfbb482919 Copter: remove bogus ARMING_CHECK_NONE 'bitmask value' 2019-10-08 10:31:07 +11:00
Randy Mackay
6e27d49f24 Copter: add pre-arm check of PILOT_SPEED_UP param 2019-10-03 07:16:35 +09:00
Andrew Tridgell
c40e0ffb6b Copter: fixed EKF threshold for arming
when EKF failsafe is disabled by setting threshold to zero we need to
disable this arming check
2019-09-23 09:48:39 +09:00
Peter Barker
b4537bebd8 Copter: move control_mode_t into being Mode::Number enum class
Fixes this compiler error:

In file included from ../../ArduCopter/sensors.cpp:1:
In file included from ../../ArduCopter/Copter.h:195:
../../ArduCopter/mode.h:1291:9: fatal error: declaration shadows a variable in the global namespace [-Wshadow]
        AUTO,           // after A and B defined, pilot toggle the switch from one side to the other, vehicle flies autonomously
        ^
../../ArduCopter/defines.h:38:5: note: previous declaration is here
    AUTO =          3,  // fully automatic waypoint control using mission commands
    ^
1 error generated.
2019-09-13 13:12:08 +09:00
Randy Mackay
709c874d8b Copter: integrate AP_OAPathPlanner 2019-08-17 09:42:43 +09:00
Randy Mackay
a3bde4f054 Copter: pre-arm check for ToshibaCAN ESC pwm range 2019-08-14 13:29:14 +09:00
Peter Barker
6f4167b85b Copter: pass format string through to check_failed 2019-08-05 14:18:05 +10:00
hoangthien94
6d8a1bbe81 Copter: bypass compass healthy check when ext nav data is available for heading 2019-08-03 08:44:11 +09:00
Peter Barker
bf6f10e448 Copter: Arming: ensure frame class is appropriate for build FRAME_CONFIG 2019-07-04 10:05:01 +09:00
Peter Barker
3e098df65a Copter: move common proximity pre-arm checks up
It will not be possible to arm if a proximity sensor has been configured
but is not working after this patch.

The can't-arm-when-within-60cm-of-something check can still be disabled
with the PARAMETER arming check bit.
2019-06-04 08:45:34 +09:00
Peter Barker
112b153268 Copter: move Arming functions into AP_Arming file 2019-05-30 16:02:10 +09:00
Peter Barker
6dce39cbe1 Copter: use AP_Arming methods to arm and disarm vehicle
Really just changing the namespace of init_arm_motors
2019-05-30 07:37:30 +09:00
Peter Barker
9f9531a790 Copter: AP_Arming: correct overriding of arm_checks method
This makes the arbitrary decision that arming checks always report
failures to the GCS.

Fixes:

In file included from ../../ArduCopter/events.cpp:1:
In file included from ../../ArduCopter/Copter.h:91:
../../ArduCopter/AP_Arming.h:33:69: fatal error: non-virtual member function marked 'override' hides virtual member function
    bool arm_checks(bool display_failure, AP_Arming::Method method) override;
                                                                    ^
../../libraries/AP_Arming/AP_Arming.h:64:18: note: hidden overloaded virtual function 'AP_Arming::arm_checks' declared here: different number of parameters (1 vs 2)
    virtual bool arm_checks(AP_Arming::Method method);
                 ^
1 error generated.
2019-04-30 09:29:59 +10:00
Michael du Breuil
465d6b4dc7 Copter: Remove rangefinder distance prearm check 2019-04-16 11:00:32 +09:00
Michael du Breuil
8290bd4e67 Copter: check all EKF cores for health on arming 2019-04-09 10:53:25 +10:00
Patrick José Pereira
86633e45ff Copter: Use new RC_Channel AUX_FUNC
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2019-04-03 09:53:58 -07:00
Peter Barker
6bac6cd725 Copter: remove redundant compass arming checks
These are already part of prearm checks in the parent class, which must also pass for us to arm
2019-03-28 11:28:44 +11:00
ChristopherOlson
e56c970eb0 Copter:AP_ARMING - remove collective position prearm check for heli 2019-03-28 10:40:54 +11:00
Peter Barker
f189860162 Copter: use enum class for ArmingMethod and ArmingRequired 2019-03-12 19:48:14 +11:00
Peter Barker
7b6fef16aa Copter: remove redundant PreArm: in check_failed calls 2019-03-08 08:57:53 +09:00
Peter Barker
cc8912255e Copter: move checking of fence up 2019-03-08 08:57:27 +09:00
Peter Barker
cac87b8e0b Copter: use attitude and position controller prearm checks 2019-03-06 10:36:32 +09:00
IamPete1
ba3d1bc6c7 Copter: move E-stop state to SRV_Channel 2019-02-27 08:51:24 +09:00
bnsgeyer
07d9e8c224 Copter: Tradheli-removed hard coding of motor interlock to channel 8 2019-01-28 09:44:56 +09:00
murata
77389d9a91 Copter: remove dup return from arming prox check 2018-12-26 13:19:52 +09:00
Peter Barker
a90cfc7db7 Copter: clarify prearm failure messages 2018-10-16 10:31:10 +11:00
Peter Barker
e7e56dde7a Copter: move handling of RC switches into RC_Channel 2018-08-01 12:11:30 +09:00
Peter Barker
df83cb034e Copter: use ArmingMethod enumeration 2018-07-03 15:16:38 +10:00
Peter Barker
a1f29e92d1 Copter: use singletons in AP_Arming 2018-07-03 13:44:11 +10:00
Peter Barker
7785a962dc Copter: fix inconsistent setting of AP_Notify::flags.pre_arm_gps_check 2018-07-03 09:34:43 +10:00
Peter Barker
291102360a Copter: use check_failed function 2018-06-23 15:33:19 +10:00
Andrew Tridgell
b8d47f346e Copter: fixed interlock check on helis
the motors check is always false when disarmed, so can't be used for
arming check
2018-06-01 10:14:20 +09:00
bnsgeyer
86440b20ba Copter: Tradheli - disables inverted flight option for single and dual heli frames 2018-05-22 08:35:03 +10:00
Michael du Breuil
291531e056 Copter: Support new battery failsafes 2018-03-27 22:12:21 +01:00
Dr.-Ing. Amilcar do Carmo Lucas
5f9879fae1 Copter: remove more parameters when ACRO is disabled 2018-03-20 08:13:06 +09:00
Peter Barker
45f2312bfe Copter: move home state into AP_AHRS 2018-03-19 10:32:37 +09:00
Ebin
185f41d5bd Copter arm_checks(): PreArm in error msg changed to Arm 2018-03-16 09:49:54 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
b27c00dc5f Copter: add option to disable ACRO mode 2018-03-15 07:38:14 +09:00
Andrew Tridgell
30572692c4 Copter: added ALLOW_ARM_NO_COMPASS
for skyviper-f412
2018-03-02 12:52:50 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
def098bd8a Copter: obey ADSB_ENABLED == DISABLED 2018-02-21 22:11:34 +09:00
Randy Mackay
0f6762bbd2 Copter: PSC_ACCZ param name shortened 2018-01-31 08:48:21 +09:00
Randy Mackay
8d6f8e4d9c Copter: move pos-control pids to pos-control library 2018-01-23 12:00:43 +09:00
Peter Barker
077b062701 Copter: change pre-arm checks to allow interlock to be enabled
With this change we will continue to tell the user their interlock is
enabled, but we will not fail the pre-arm checks.

This will mean that the blinking-LED indicators will show the vehicle as
armable (flashing green / flashing blue), even if the interlock would
prevent arming.

This has the advantage that you don't need your vehicle in the
"dangerous" state to work out whether arming will work when you attempt
to arm it.

Note that we repeat the interlock switch check in the arming checks, and
it WILL fail if the interlock switch is enabled.
2018-01-09 08:13:06 +09:00
Peter Barker
7b637334f4 Copter: eliminate mode_has_manual_throttle 2017-12-06 10:09:58 +09:00
Peter Barker
ef1489e87a Copter: eliminate mode_requires_gps 2017-12-06 08:24:24 +09:00
Peter Barker
a4859e13c1 Copter: eliminate mode_allows_arming 2017-12-06 08:24:24 +09:00
Peter Barker
527a536b78 Copter: FlightMode - remove function parameters
Use current control_mode in place of parameters

Once conversion is complete these functions will disappear
2017-12-06 08:24:24 +09:00
ChrisBird
1f1bb61bfa Copter: Add PreArm - PID Parameter check
This addresses the enhancement requested in: https://github.com/ArduPilot/ardupilot/issues/2424

It checks various PID values to check if they are zero, if they are and the corresponding rate forward feed is zero then it flags it as PreArm failure.
It has been added to the parameter check, so can be overridden if required.
2017-11-15 21:58:24 +09:00
Peter Barker
3846da5e23 Copter: remove redundant terrain checks
Now taken care of by continuous prearm checks
2017-11-08 19:08:16 +09:00
Peter Barker
d537461934 Copter: remove redundant battery checks
Now taken care of by continuous prearm checks
2017-11-08 19:08:14 +09:00
Peter Barker
b3b1680e11 Copter: remove redundant fence checks
Now checked as part of continuous prearm
2017-11-08 19:08:12 +09:00
Peter Barker
04af1cb331 Copter: remove redundant baro checks
Now checked as part of continuous prearm checks
2017-11-08 19:08:10 +09:00
Peter Barker
b5c907312c Copter: remove redundant gps checks
Now tested as part of continuous pre-arm checks
2017-11-08 19:08:08 +09:00
Peter Barker
d563a9dd5d Copter: remove redundant INS checks
Now checked by continuous prearm checks
2017-11-08 19:08:06 +09:00
Peter Barker
d3b73f8557 Copter: correct notification of pre-arm-gps-check failure 2017-11-08 19:08:03 +09:00
Peter Barker
818faa92d4 Copter: rc calibration checks are called by AP_Arming 2017-11-08 19:07:59 +09:00
Peter Barker
9b52c9b670 Copter: prearm logging checks are called in parent class 2017-11-08 19:07:55 +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
b8802ec5c2 Copter: prearm gps checks are called in parent class 2017-11-08 19:07:51 +09:00
Peter Barker
7c0869fa19 Copter: prearm ins checks are called in parent class 2017-11-08 19:07:49 +09:00
Peter Barker
cb8fa41cb1 Copter: prearm compass checks are called in parent class 2017-11-08 19:07:46 +09:00
Peter Barker
30c1a040d7 Copter: prearm baro checks are called in parent class 2017-11-08 19:07:44 +09:00
Peter Barker
c129445ff6 Copter: call common prearm checks 2017-11-08 19:07:42 +09:00
Peter Barker
7b3e111f85 Copter: continuously run pre-arm checks
Stop "latching" the prearm checks, so if the checks start to fail
the craft becomes non-armable.
2017-11-08 19:02:44 +09:00
Peter Barker
b0c7766197 Copter: continuously reevaluate rc calibration checks
Stop "latching" calibration checks - if an RC radio's calibration
changes after it passes once, these patches allow the rc calibraiton
checks to then fail.
2017-08-21 09:05:31 +09:00
Peter Barker
0a2177de58 Copter: move Copter RC checking code into library 2017-08-14 15:32:25 +09:00
Randy Mackay
167ced1279 Copter: battery arming checks call parent AP_Arming 2017-07-31 17:19:55 +09:00
Randy Mackay
f97e43919b Copter: add gps glitch notification and pre-arm check 2017-07-27 14:16:23 +09:00
Peter Barker
89478d5a28 Copter: ensure logging is working as part of arming checks 2017-07-19 16:37:28 +01:00
Peter Barker
e45efeb829 Copter: move starting of new logs into DataFlash 2017-07-19 16:37:28 +01:00
Peter Barker
cbde87b390 Copter: remove pointless pre_arm_gps_checks function 2017-07-19 16:34:57 +01:00
Peter Barker
baaad8df94 Copter: use common board_voltage_checks code 2017-07-19 16:34:57 +01:00
Peter Barker
a7bc111485 Copter: use common baro arming check function 2017-07-19 16:34:57 +01:00
Peter Barker
592729733e Copter: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +01:00
Tom Pittenger
25b014524a Copter: use send_text method on the GCS singleton 2017-07-09 19:03:26 -04:00
Peter Barker
f60389d4aa Copter: use send_text method on the GCS singleton 2017-07-09 17:17:29 -04:00