Commit Graph

413 Commits

Author SHA1 Message Date
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
Peter Barker 6ee1d94ec7 Copter: reorder initialisation of member variables to make -Werror=reorder work 2024-11-13 06:40:37 +11: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 784760342d Copter: remove ENABLE/ENABLED/DISABLE/DISABLED defines 2024-09-06 11:53:09 +10:00
Peter Barker f64fcb78d3 ArduCopter: make AP_RANGEFINDER_ENABLED remove more code 2024-07-02 09:17:26 +10:00
Peter Barker cb76ce534b ArduCopter: move AC_Avoidance defines into libraries 2024-03-11 18:07:18 +11:00
Leonard Hall bc6d965bbc Copter: Payload Place: Change PLDP_RNG_MIN to PLDP_RNG_MAX 2024-03-06 15:16:16 +11:00
Peter Barker b913ea292b ArduCopter: move serial_manager parameters up to base class 2024-02-29 12:12:19 +11: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
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 78e3719835 Copter: move scripting up to AP_Vehicle 2024-02-07 18:24:12 +11:00
Peter Barker eab70e3a1e ArduCopter: move AP_Stats to AP_Vehicle 2024-01-30 11:12:21 +11:00
JanMaciuk 511659e6ee Copter: Throw mode check altitude within params 2024-01-09 11:29:00 +09:00
Pierre Kancir d5584fe703 Copter: fix USER_PARAMS_ENABLED includes 2023-11-22 18:16:32 +11:00
Peter Barker 75f1459fa6 ArduCopter: add and use AP_TEMPCALIBRATION_ENABLED 2023-11-07 07:46:24 +11:00
Michael du Breuil 04b16d1a79 Copter: Support checking max rpm in the takeoff check 2023-05-02 10:23:55 +10:00
Peter Barker 3eae095966 ArduCopter: use AP_BEACON_ENABLED instead of BEACON_ENABLED 2023-04-12 09:24:39 +10:00
Leonard Hall 6d5bc17c8e Copter: Add TKOFF_TH_MAX 2023-03-21 19:51:03 +09:00
Leonard Hall 7978347044 Copter: Add support for terrain altitude time constant 2023-03-07 13:41:35 +11:00
Peter Barker ade654b251 Copter: use AP_WINCH_ENABLED in place of WINCH_ENABLED 2023-03-03 20:59:06 +11:00
murata 7a7f84adee Copter: Clarify the exclusion determination in the ENUM definition
Co-authored-by: Pierre Kancir <pierre.kancir.emn@gmail.com>
Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
2023-02-07 08:20:01 +09:00
Iampete1 13818eac99 ArduCopter: use shared param info defines 2023-01-11 18:41:34 +11:00
Leonard Hall dbe6a1e319 Copter: Payload Place enhancements 2022-12-31 12:29:31 +09:00
Gone4Dirt 66a4ba6256 Copter: add yaw weathevaneing mode 2022-12-14 16:08:20 -05:00
Peter Barker d04f4d8178 Copter: correct defines gating flowhold mode
We have an explicit define for this mode now
2022-10-19 21:56:14 +11:00
Peter Barker be93d8212c ArduCopter: add AP_GRIPPER_ENABLED 2022-10-04 10:58:34 +11:00
Iampete1 ee31f2322e Copter: takeoff rpm: define out if no ESC telem 2022-09-07 17:03:03 +01:00
Randy Mackay 3f96423795 Copter: add takeoff RPM check 2022-09-07 17:03:03 +01:00
Leonard Hall 4b20a2d5f1 Copter: Add control over throttle ramp time during take-off 2022-08-31 19:19:04 -04:00
esaldiran cbadf77652 ArduCopter: support custom controller 2022-08-30 13:10:09 +10:00
Iampete1 b988391455 Copter: Fence moved to vehicle 2022-07-27 19:04:56 +10:00
Bill Geyer 1358b7aa06 Copter: delete unused param variable declarations 2022-06-28 07:56:12 +09:00
Bill Geyer 4fde394395 Copter: add support for command model class 2022-06-28 07:56:12 +09:00
Joshua Henderson 13d1b8632b Copter: remove param docs for ACRO_RP_P and _YAW_RP 2022-06-16 09:09:55 +09:00
Randy Mackay b60d6348ed Copter: add dead reckon failsafe 2022-05-25 20:05:21 +09:00
Peter Barker 285d752143 ArduCopter: create and use AP_OPTICALFLOW_ENABLED
Including a define for each backend.
2021-12-29 18:12:03 +11:00
Peter Barker 238a6e4016 ArduCopter: move from ENABLE_SCRIPTING to AP_SCRIPTING_ENABLED 2021-11-15 20:27:40 +11:00
Peter Barker ee9aef25fc ArduCopter: ensure ENABLE_SCRIPTING is always defined 2021-11-15 20:27:40 +11:00
Shiv Tyagi e1ded4e3f6 Copter : add SURFTRAK_MODE parameter
Added a parameter which will be used to set the surface to be tracked in surface tracking.

Co-Authored-By: Peter Hall <33176108+IamPete1@users.noreply.github.com>
2021-11-13 11:52:38 +09:00
Tatsuya Yamaguchi 918218bdd4 Copter: fix compilation when ACRO, SPORT and DRIFT modes are disabled 2021-10-12 09:01:14 +11:00
Leonard Hall 5d5ccc8c78 Copter: Update ACRO to use rate parameters and update expo function 2021-09-23 20:03:53 +09:00
Randy Mackay 1d7d5d23f7 Copter: add acro and pilot yaw rate and expo 2021-09-23 20:03:53 +09:00
Josh Henderson 24b6f024ea Copter: convert RTL_ALT to int32 2021-09-15 16:17:08 +09:00
Leonard Hall 97decc4c21 Copter: Remove parameter RNGFND_GAIN 2021-09-06 16:00:19 +09:00
Peter Barker 3a3433cad2 ArduCopter: add and use HAL_BUTTON_ENABLE 2021-08-25 19:03:42 +10:00
Randy Mackay d39581f996 Copter: replace use of TERRAIN_MARGIN with WPNAV_TER_MARGIN 2021-07-21 16:03:44 +09:00
Peter Barker 5f039ba06d Copter: fix build for lack of AC_TERRAIN define 2021-07-12 21:14:40 +10:00
Randy Mackay 7dcc5dd7ac Copter: add TERRAIN_MARGIN parameter 2021-07-10 20:25:05 +09:00
Randy Mackay 50d0592962 Copter: add GUID_TIMEOUT for guided mode vel, accel and angle control 2021-07-10 20:25:05 +09:00
Randy Mackay 1cafbe1e65 Copter: add configurable rangefinder filter 2021-06-16 18:54:13 +10:00