Previously we added the rally-point altitude to the calculated return altitude on the final line of this function meaning the fence's altitude check was not performed on the final value. This change adds the rally-point altitude as the first step so it is included before the fence altitude check.
This change also converts the return alt to an alt-above-home so that it can correctly be compared to the fence (previously a terrain-altitude might have been compared to an alt-above home)
This definition has been false for over a year and we have not heard of any users wanting to delay the disarming until the pilot's throttle goes to zero. Removing this feature removes a small bit of complexity from the code.
This modifies sport mode to be structured like althold and loiter flight modes so that ongoing maintenance of the modes is hopefully easier.
Also changes throttle feedback to occur from mid-stick
throttle_avg_max is the total average throttle level (expressed as a number from 0 to 1) that the motors can safely be raised to in order to maintain attitude control. This level can be higher than the pilot's or autopilot provided throttle level.
Previously passing in a negative throttle_in could result in a negative throttle_avg_max being returned.
Add a new "Basic use" section so people don't get overhauled with build
instructions. They can read about the more advanced commands once they
are able to use the basic ones.
While at it, update the instructions to use the waf wrapper.
Simple wrapper to be extended later so people don't have to type the
huge "./modules/waf/waf-light" command. It has a very primitive way to
try to checkout waf submodule if it isn't there.