Commit Graph

72 Commits

Author SHA1 Message Date
Peter Barker
9be4cc65c7 ArduCopter: avoid nullptr dereference on bad rcmap value entry 2024-09-10 22:00:50 +10:00
Peter Barker
11b04b7610 ArduCopter: avoid nullptr dereference on bad rcmap value entry 2024-09-10 22:00:50 +10:00
Peter Barker
784760342d Copter: remove ENABLE/ENABLED/DISABLE/DISABLED defines 2024-09-06 11:53:09 +10:00
Peter Barker
d462756cbc ArduCopter: move RC bits in mavlink to common code
Plane's semantics change to be like Copter. Rover, Sub and Tracker will start reporting the bits
2024-02-10 11:46:44 +11:00
Peter Barker
7377b3f8f2 ArduCopter: allow compilation with HAL_LOGGING_ENABLED false 2024-01-17 18:25:55 +11:00
Peter Barker
9c2d68bcd1 Copter: remove enable_motor_output method
this doesn't actually do what it says it does.  I think the functionality to set the motors armed was split out long ago but this little method and its misleading comments remained
2023-03-25 07:57:48 +09:00
Leonard Hall
ed0921a418 Copter: Support changing update period in Motors 2022-12-13 17:10:06 +11:00
Randy Mackay
dd8fbad653 Copter: integrate RC_Channel's RC_FS_TIMEOUT
timeout is lengthened for regular RC to 1 sec (was 0.5 sec) to be
consistent with other vehicles
2022-11-17 07:42:43 +09:00
Andrew Tridgell
161ab4b330 Copter: fixed use of configured() vs configured_in_storage() 2022-06-06 13:11:50 +10:00
murata
9d1c3a2df0 Copter: Change the process description 2021-11-18 09:26:26 +09:00
Iampete1
12c1b3e8f5 Copter: add MOT_PWM param conversion 2021-10-11 22:19:17 -04:00
Iampete1
f487118ee9 Copter: update_throttle_range don't set_throttle_range 2021-10-11 22:19:17 -04:00
Iampete1
456d57c28f Copter: rename armed_with_switch to armed_with_airmode_switch 2021-09-21 09:36:24 +10:00
Andy Piper
8d2f2443a2 Copter: add air mode aux function 2020-06-16 20:30:26 +10:00
Peter Barker
d5b1f1651e Copter: remove unneeded set_range calls on RC Aux channels
This isn't an exhaustive list of channels used for auxillary input, so
that makes this wrong.

RC_Channel goes off the raw get_radio_in values, so setting these is a
pointless and potentially confusing state change.

Also, Plane and Rover don't do this - so things are more consistent
after this.
2020-01-07 08:41:36 +09:00
Randy Mackay
8724e2f160 Copter: minor comment change 2019-10-22 07:15:48 +08:00
Andrew Tridgell
328fff8585 Copter: fixed RC failsafe handling for no RC receiver
this stops us using uninitialised values in modes like circle which
can operate either with or without RC input. If we didn't have a RC
receiver attached then they would use a maximum yaw rate (which
produces quite a spectacular result for a tuned up racing quad)
2019-09-24 10:00:36 +10:00
Randy Mackay
eb433508f1 Copter: esc cal startup check moved outside rc output init
this ensures we don't accidentally enter esc calibration during motor test
2019-07-22 14:53:36 +09:00
Peter Barker
cd2ec1f57f Copter: remove set_default_dead_zone statement with no effect
This is immediately undone in the unconditional code below the #if
2019-07-08 09:26:02 +09:00
Peter Barker
3b33f4ca4d Copter: add floating-point-constant designators 2019-04-05 23:04:17 -07:00
Peter Barker
c7e21d95ef Copter: move Log_Write_Error into library 2019-03-27 12:36:40 +11:00
IamPete1
ba3d1bc6c7 Copter: move E-stop state to SRV_Channel 2019-02-27 08:51:24 +09:00
Randy Mackay
f5208b1664 Copter: minor format fix 2018-12-05 20:12:34 +09:00
Peter Barker
450052aa80 Copter: rewrite read_radio for clarity 2018-09-05 11:54:32 +10:00
Peter Barker
a30cdf6806 Copter: eliminate failsafe.rc_override_active
Use RC_Channels::has_active_overrides() instead
2018-09-05 11:54:32 +10:00
Peter Barker
ec6c59faa3 Copter: move handling of disable-gcs-rc-overrides-channel-option up 2018-09-05 11:54:32 +10:00
Peter Barker
e7e56dde7a Copter: move handling of RC switches into RC_Channel 2018-08-01 12:11:30 +09:00
Michael du Breuil
5825222818 Copter: Remove redundant throttle channel setting 2018-08-01 09:19:20 +10:00
Andrew Tridgell
2425c65e74 Copter: implement 'air-mode' for copter
this implements what betaflight calls 'air-mode'. This gives attitude
control when throttle is at zero, allowing for zero-throttle maneuvers,
plus keeping the copter level on the ground.

This was already implemented if an interlock switch was setup, but it
should also work with an arming switch. If using an arming switch then
throttle should not be considered zero as long as the arming switch
hasn't gone low.
2018-05-29 10:27:14 +09:00
Michael du Breuil
91a48a5040 Copter: Support new RC_Channels::read_input() 2018-04-26 08:00:09 +10:00
Michael du Breuil
d96919ed21 Copter: Use RC_Channels instead of hal.rcin 2018-04-11 21:47:07 +01:00
Pierre Kancir
50c3ed1460 Copter : allow rc_override input at start
found by chobitsfan
2018-03-02 16:23:11 +00:00
Andrew Tridgell
af4f0c29ba Copter: enable TMODE (ToyMode) support
this is for the skyviper button based transmitter control
2018-02-08 17:36:33 +11:00
Andrew Tridgell
0d0f1d264b Copter: fixed order of motor setup 2017-10-22 15:52:50 +11:00
Andrew Tridgell
c4b0d7bc35 Copter: removed calls to motors->enable() 2017-10-22 15:52:50 +11:00
Andrew Tridgell
8cf8f3a288 Copter: fixed collective input with H_SV_MAN=1 for heli
when H_SV_MAN=1 we do direct pass-thru so the user can test swash
range. The problem is that it uses norm_input() for throttle, which
depends on RC3_TRIM. Nowhere else in heli or copter do we depend on
RC3_TRIM, so the user gets a misleading idea of behaviour when testing
their swash.
2017-09-21 08:52:50 +10:00
Randy Mackay
010dc103be Copter: increase RC input deadzones for roll pitch and yaw
Copter-3.5 testing resulted in a significant number of users reporting various issues like poshold and autotune were not functioning because their RC inputs were straying out of the deadzones
2017-06-01 10:10:57 +09:00
Pierre Kancir
436d0f8c84 ArduCopter: radio fix passthrough range on heli/coax/single 2017-05-13 10:19:20 +09:00
Randy Mackay
caa2148e45 Copter: move esc calibration startup check to after servo function initialisation 2017-05-11 11:30:05 +09:00
Andrew Tridgell
2ba6e7af35 Copter: fixed aux servos in RC failsafe
we should always output to channels
2017-05-01 14:32:18 +10:00
Randy Mackay
032bfad79f Copter: move rc input check to esc_calibration_startup_check
No functional change
2017-04-18 09:29:55 +09:00
Randy Mackay
1bfbf0d43f Copter: enable motors at end of initialisation 2017-04-18 09:29:51 +09:00
Lucas De Marchi
a589a84e32 ArduCopter: just call set_throttle_range()
Now set_throttle_range in AP_Motors does the right thing, calling out
the RCOutput method.
2017-02-26 13:38:24 +11:00
Randy Mackay
a25f51c893 Copter: delay up to 2sec for first radio pulse
Pixracer boards can take 1 second (or possibly longer) to start reading RC input.  This ensure we see the user's high throttle to indicate the user wants to perform the ESC calibration
2017-01-27 12:14:56 +09:00
Peter Barker
ab13b3beaf Copter: make rc checks verbose on failure 2017-01-20 13:02:53 +09:00
Peter Barker
bd6ffc025e Copter: start conversion to AP_Arming_Copter 2017-01-17 11:45:08 +09:00
Andrew Tridgell
0f6d0c5ba9 Copter: combined tri, single, coax and multicopter into a single build
this allows copter to be just 2 builds, one for heli, and one for
everything else
2017-01-12 17:39:37 +11:00
Andrew Tridgell
5a87ae3f01 Copter: use new SRV_Channels API 2017-01-12 17:39:37 +11:00
Randy Mackay
12d024e0c6 Copter: rename FRAME to FRAME_TYPE
This unifies the plane and copter parameter names
2016-12-31 10:55:23 +09:00
Randy Mackay
217757fdc8 Copter: default FRAME_CLASS 2016-12-31 10:55:23 +09:00