This big PR from Leonard’s gone in: https://github.com/ArduPilot/ardupilot/pull/4299. It’s been SITL tested and flight tested so it should be ok but please be careful if flying master. The changes are listed below.
· Motor's library MOT_THST_HOVER parameter (and related methods) replaces THR_MID and the _throttle_average vehicle variable and learns the vehicle's estimated hover throttle during gentle hovers when the autopilot is controlling the altitude (i.e. AltHold, Loiter, Auto, etc). The estimate is saved when the vehicle disarms so it will persist across flights. This feature can be disabled by setting MOT_HOVER_LEARN to 0.
· MOT_SPIN_ARM replaces MOT_SPIN_ARMED. The purpose of this change is to bring the throttle related parameters into the 0~1 range instead of 0~1000.
· MOT_SPIN_MIN replaces THR_MIN. This is also to bring the range to 0~1.
· battery voltage compensation improvements (ask Leonard to explain!)
· battery current limiting improvement to reduce throttle so that battery voltage doesn't sag below MOT_BAT_VOLT_MIN (should it perhaps be so that it doesn't sag below the battery failsafe voltage?)
· Throttle vs Attitude priorisation moved out of the Motors library and into the attitude control library
· ATC_ANG_LIM_TC parameter added to allow better tuning of the lean-angle-limiting-to-preserve-altitude feature)
· Fixes some bugs in coax and single copter's stability patches
-Randy