The previous scaling function used in scaleMotor could end up with
output values below the neutral point.
This patch adds a new scaling mode that will try to scale the output
proportionally while still keep all outputs within neutral and max.
The user can select three different modes:
1) NoScaling - Only cap the output values between neutral and max.
2) AddAndSubtract - The previous output scaling method, which moves the
output values directly proportionally to the amount the max/min motor
is out of the limits.
3) ElevateAndCompress - The new mode, which elevates all motor values by
the percentage needed to bring the min motor to neutral, and then
compress all motor values by the percentage needed to bring the max
motor down to max.
The motor scaling mode can be selected by setting the
FlightModeSettings.MotorScalingMode UAVO field.
The new setting will work this way:
- Input (knob) value is used straight as roll or pitch P term;
- P term is mutliplied by two configurable factors and used as D and I terms;
- (Optionally) Yaw P term is calculated from a mean of roll and pitch P terms multiplied by a configurable factor.
- yaw P term is multiplied by other two configurable factors and used as yaw D and I terms.
1. Forced disarm via guidance alarm critical on disarm state
2. Continue to zero stabi including yaw during disarm state just in case it doesn't actually disarm.
1. Fix autoyaw to 0 attitude on takeoff post launch.
2. An error condition abort now properly disarms and continues to contrain thrust and stabi during disarmed state.
3. Increase thrustdown time from 2 to 5 seconds on an error condition (e.g. if 3 m deviation from takeoff position on NE).
I decided to not check throttle when re-enabling stabii control. It can feel as though the mode is defective. I would rather someone have immediate always-there ability to overridwe gps hold.
Replace PositionRoam with VelocityRoam
Make VelocityRoam an explicit flight mode to simplify access
Disable PositionRoam as not supported and not suitable to retain.