Commit Graph

749 Commits

Author SHA1 Message Date
Andy Piper 96a70df75b Copter: address review comments 2024-12-04 07:45:05 +11:00
Andy Piper 3d43f2053f Copter: move RTDT logging to fast path
log after motor output in fast rate thread
2024-12-04 07:45:05 +11:00
Andy Piper dcf25200c6 Copter: correctly set fast rate thread rates 2024-12-04 07:45:05 +11:00
Andy Piper f84c855dd1 Copter: run copter attitude control with separate rate thread
run motors output at rate thread loop rate
allow rate thread to be enabled/disabled at runtime for in-flight impact testing
setup the right PID notch sample rate when using the rate thread the PID notches
 run at a very different sample rate
call update_dynamic_notch_at_specified_rate() in rate thread
log RTDT messages to track rate loop performance
set dt each cycle of the rate loop thread
run rate controller on samples as soon as they are ready
detect overload conditions in both the rate loop and main loop
decimate the rate thread if the CPU appears overloaded
decimate the gyro window inside the IMU
add in gyro drift to attitude rate thread
add fixed-rate thread option
configure rate loop based on AP_INERTIALSENSOR_FAST_SAMPLE_WINDOW_ENABLED
better rate loop thread decimation management
ensure fix rate attitude is enabled on arming
add rate loop timing debug
update backend filters rather than all the backends
provide more options around attitude rates
only log attitude and IMU from main loop
force trigger_groups() and reduce attitude thread priority
migrate fast rate enablement to FSTRATE_ENABLE
remove rate thread logging configuration and choose sensible logging rates
conditionally compile rate thread pieces
allow fast rate decimation to be user throttled
if target rate changes immediately jump to target rate
recover quickly from rate changes
ensure fixed rate always prints the rate on arming and is always up to date
add support for fixed rate attitude that does not change when disarmed
only push to subsystems at main loop rate
add logging and motor timing debug
correctly round gyro decimation rates
set dshot rate when changing attitude rate
fallback to higher dshot rates at lower loop rates
re-factor rate loop rate updates
log rates in systemid mode
reset target modifiers at loop rate
don't compile in support on tradheli
move rate thread into its own compilation unit
add rate loop config abstraction that allows code to be elided on non-copter builds
dynamically enable/disable rate thread correctly
add design comment for the rate thread

Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
2024-12-04 07:45:05 +11:00
Iampete1 1ed57deab6 Copter: return `custom_mode_state` for registered modes 2024-11-26 08:44:31 +09:00
Iampete1 512f620e6e Copter: add support for adding a custom mode from scripting 2024-11-26 08:44:31 +09:00
snktshrma 20aeae1a09 ArduCopter: Enabled external control for takeoff
Co-authored-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
2024-11-23 09:00:27 +09:00
Peter Barker 2c401ccec5 Copter: rename ADVANCED_FAILSAFE to AP_COPTER_ADVANCED_FAILSAFE_ENABLED
to make integration with custom build server work
2024-11-12 12:44:34 +11:00
Peter Barker e4859599cf Copter: stop using global ap variable as bitmask 2024-11-06 16:31:38 +09:00
Gone4Dirt 075ce596d2 Copter: Heli: simplify autorotation mode change and support RSC autorotation state 2024-10-11 09:54:26 +11:00
Randy Mackay 0bcff6cec0 Copter: support set_posvelaccel_offset in auto
Co-authored-by: Leonard Hall <leonardthall@gmail.com>
2024-10-04 09:25:56 +09:00
Iampete1 94944427da Copter: Scripting: add support for `set_target_rate_and_throttle` 2024-09-25 08:47:30 +10:00
Peter Barker 784760342d Copter: remove ENABLE/ENABLED/DISABLE/DISABLED defines 2024-09-06 11:53:09 +10:00
Gone4Dirt aabaa0939a Copter: Move heli logging down into motors 2024-08-14 23:39:01 -04:00
Peter Barker 42cf3aed97 Copter: use HAL_PARACHUTE_ENABLED in place of PARACHUTE_ENABLED 2024-08-07 18:09:23 +10:00
Peter Barker 8f7cde12ab ArduCopter: add logging for land detector 2024-08-06 09:28:37 +10:00
bnsgeyer 0de2d6d482 Copter: ensure force flying with heli inverted flag 2024-07-02 08:39:33 +09:00
Peter Barker f64fcb78d3 ArduCopter: make AP_RANGEFINDER_ENABLED remove more code 2024-07-02 09:17:26 +10:00
Peter Barker 180484e0a6 ArduCopter: add Copter flight option for requiring position to arm
this is not quite the same as requiring a good position to arm.
2024-06-25 11:06:10 +10:00
TsuyoshiKawamura 5f5e0e65e0 Copter: implement get_target_location/update_target_location for lua 2024-06-25 08:29:57 +09:00
Peter Barker 3630e772b1 Copter: add Copter::option_enabled(...) replacing bitops vs copter.g2.flight_options 2024-06-20 10:59:14 +10:00
MattKear ae38c96a04 Copter: use new surface distance library 2024-05-28 09:55:36 +10:00
bnsgeyer d0dfe86a4b Copter: incorporate comment to remove unnecessary function 2024-05-14 23:16:52 -04:00
bnsgeyer 1bf865e4eb Copter: add support for sysid of vel and pos loops 2024-05-14 23:16:52 -04:00
haarshitgarg a13639d9d8 ArduCopter: enabled sending waypoints from a companion computer to ardupilot for copter and rover
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2024-05-02 09:08:34 +09:00
Peter Barker 0c2636c191 ArduCopter: remove far_from_EKF_origin sanity checks
some  flawed implementations, and the extreme-ardupilot project means these checks are no longer required
2024-04-10 17:17:12 +10:00
Peter Barker 5d41125b49 ArduCopter: move handling of DO_SET_HOME up to GCS_MAVLink base class 2024-04-09 09:35:16 +10:00
Iampete1 6c44869c82 Copter: remove runup event logging and in_autorotation flag 2024-03-19 11:01:50 +11:00
Peter Barker cb76ce534b ArduCopter: move AC_Avoidance defines into libraries 2024-03-11 18:07:18 +11:00
Iampete1 73760ea393 Copter: Heli: remove duplicate inverted flight state 2024-03-05 10:24:06 +09:00
Peter Barker f2a9f1516b ArduCopter: move gripper up to AP_Vehicle
also make the singleton return a reference rather than a pointer
2024-02-21 21:05:12 +11:00
Peter Barker 4e97561d5b ArduCopter: move logger object up to AP_Vehicle 2024-02-13 10:54:29 +11: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
Andy Piper 780045ee3a Copter: filter ekf variances for failsafe and vibration checks
add a parameter to control EKF failsafe filtering
2024-02-07 15:10:30 +00:00
Peter Barker eab70e3a1e ArduCopter: move AP_Stats to AP_Vehicle 2024-01-30 11:12:21 +11:00
Peter Barker 7377b3f8f2 ArduCopter: allow compilation with HAL_LOGGING_ENABLED false 2024-01-17 18:25:55 +11:00
Iampete1 60816f4351 Copter: use base class AC_AttitudeControl object 2023-12-05 08:08:09 +09:00
Pierre Kancir d5584fe703 Copter: fix USER_PARAMS_ENABLED includes 2023-11-22 18:16:32 +11:00
Peter Barker 5820a9bc2f Copter: encapsulate PayLoadPlace state and methods into existing struct
... and make it a class
2023-10-27 14:15:53 +11:00
Peter Barker cc799d3d7e Copter: encapsulate auto takeoff into an ojbect
similar to the encapsulation of "user takeoff" into an object
2023-10-18 13:47:11 +11:00
Rhys Mainwaring b585d61809 Copter: remove duplicate friend declaration
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2023-10-09 09:05:19 +09:00
Andrew Tridgell b3954afe52 Copter: add friend for AP_ExternalControl_Copter 2023-08-24 07:46:06 +10:00
Andrew Tridgell c452325de2 Copter: added AP_ExternalControl support
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
Co-authored-by: Andrew Tridgell <tridge60@gmail.com>
2023-08-22 18:21:23 +10:00
Tom Pittenger a88c3a08b0 Copter: is_landing/is_taking_off not to req scripting 2023-07-03 22:44:00 -07:00
Iampete1 678017c577 Copter: implement FLTMODE_GCSBLOCK bitmask 2023-06-28 12:56:25 +01:00
Tatsuya Yamaguchi fdac668782 Copter: implement is_landing and is_taking_off for use by lua 2023-05-26 10:59:09 -07:00
Peter Barker 96fa96936b ArduCopter: AP_Arming ensures mission items present when in auto mode
Co-authored-by: Henry Wurzburg <hwurzburg@yahoo.com>
2023-04-14 07:49:54 +10:00
Peter Barker 3eae095966 ArduCopter: use AP_BEACON_ENABLED instead of BEACON_ENABLED 2023-04-12 09:24:39 +10:00
tzarjakob 97b7e8d1d0 ArduCopter: configuration of Precision Landing for custom build server 2023-03-27 09:04:07 +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