Try to make the SAS more reliable #2067
Merged
+3
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #1868, hopefully.
From traces, it seems that if
Principia/ksp_plugin_adapter/ksp_plugin_adapter.cs
Lines 657 to 660 in f461845
would then hold, but invoking
active_vessel.OnAutopilotUpdate
would somehow not callOverrideRSASTarget
, thus keeping the stock SAS behaviour (and resulting in #1868).I have no explanation for this behaviour.
The invocation did have the expected effect, however, if the delegate combination occurred with the SAS off, e.g., if the SAS was off during liftoff and turned on later on.
Switching to
OnPreAutopilotUpdate
does not appear to have any unexpected behaviour (and appending to that one is more readable than prepending to the other anyway).