Commit
d39820dfafbb9ba7110d92e24676ca741950c951
by lamontAdd RequestActiveThrottle() API to ThrustController
This is intended to be used by consumers when they want to
have a "burn" segment which can throttle down, but for RO/RF
the throttle must be kept over the minimum throttle at all
times to not waste an ignition.
The exiting min throttle setting only applies to the throttle
limiters, which limit max throttle (limiting how much the
throttle limiters can limit the throttle). This API sets
a min limit on the requested throttle.
If the minimum throttle is set to zero, or if `allowZero` is
set to true then an explicit request of zero will cut the
throttle (e.g. for stock). It would generally be better
to call `ThrustOff()` explicitly though rather than to use
`RequestActiveThrottle(0, allowZero: true)`.
At some point the codebase should probably have all uses
of `TargetThrottle = 0` changed to `ThrustOff()` and then
all remaining uses of `TargetThrottle = x` changed to
`RequestActiveThrottle(x, enforceMinimum: false)`. Then the
latter could be tweaked as RO/RF bugs are found.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
(commit: d39820d)