diff --git a/.gitignore b/.gitignore index 7e78c18..a3a099d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,6 @@ # Compiled Dynamic libraries *.so *.dylib -*.dll # Fortran module files *.mod @@ -34,5 +33,4 @@ # VS temps .vs *.cache -src/kOS.Addons.AtmosphereAutopilot/obj/Debug/kOS.AddOns.AtmosphereAutopilot.csproj.FileListAbsolute.txt -src/kOS.Addons.AtmosphereAutopilot/obj/Release/kOS.AddOns.AtmosphereAutopilot.csproj.FileListAbsolute.txt +src/kOS.Addons.AtmosphereAutopilot/obj \ No newline at end of file diff --git a/src/kOS.Addons.AtmosphereAutopilot/Addon.cs b/src/kOS.Addons.AtmosphereAutopilot/Addon.cs index 8659e8d..c14a1b5 100644 --- a/src/kOS.Addons.AtmosphereAutopilot/Addon.cs +++ b/src/kOS.Addons.AtmosphereAutopilot/Addon.cs @@ -26,6 +26,7 @@ public class Addon : Suffixed.Addon private float AltitudeSetPoint = -1f; private float VertSpeedSetPoint = float.NaN; private Vector3 DirectionSetPoint = Vector3.zero; + private bool PseudoFLC = true; public Addon(SharedObjects shared) : base(shared) { @@ -33,6 +34,7 @@ public Addon(SharedObjects shared) : base(shared) AddSuffix("DIRECTOR", new SetSuffix(() => dcAP != null, SetDirectorActive)); AddSuffix("CRUISE", new SetSuffix(() => ccAP != null, SetCruiseActive)); AddSuffix("SPEEDCONTROL", new SetSuffix(() => speedAP != null && speedAP.spd_control_enabled, SetThrustActive)); + AddSuffix("PSEUDOFLC", new SetSuffix(() => PseudoFLC, SetPseudoFLC)); AddSuffix("SPEED", new SetSuffix(() => SpeedSetPoint, SetSpeedSetPoint)); AddSuffix("HEADING", new SetSuffix(() => HeadingSetPoint, SetHeadingSetPoint)); AddSuffix("ALTITUDE", new SetSuffix(() => AltitudeSetPoint, SetAltitudeSetPoint)); @@ -135,6 +137,7 @@ private void SetCruiseActive(BooleanValue value) ccAP.desired_vertspeed.Value = VertSpeedSetPoint; } ccAP.vertical_control = true; + ccAP.pseudo_flc = PseudoFLC; ResetSpeedControl(); } } @@ -160,6 +163,14 @@ private void SetThrustActive(BooleanValue value) SpeedSetPoint = speedAP.setpoint.mps(); } } + private void SetPseudoFLC(BooleanValue value) + { + PseudoFLC = value; + if (ccAP != null) + { + ccAP.pseudo_flc = PseudoFLC; + } + } private void SetSpeedSetPoint(ScalarValue value) { SpeedSetPoint = value; diff --git a/src/kOS.Addons.AtmosphereAutopilot/bin/Release/kOS.AddOns.AtmosphereAutopilot.dll b/src/kOS.Addons.AtmosphereAutopilot/bin/Release/kOS.AddOns.AtmosphereAutopilot.dll new file mode 100644 index 0000000..ede837c Binary files /dev/null and b/src/kOS.Addons.AtmosphereAutopilot/bin/Release/kOS.AddOns.AtmosphereAutopilot.dll differ diff --git a/src/kOS.Addons.AtmosphereAutopilot/bin/Release/kOS.AddOns.AtmosphereAutopilot.pdb b/src/kOS.Addons.AtmosphereAutopilot/bin/Release/kOS.AddOns.AtmosphereAutopilot.pdb index 57a2283..a3231b8 100644 Binary files a/src/kOS.Addons.AtmosphereAutopilot/bin/Release/kOS.AddOns.AtmosphereAutopilot.pdb and b/src/kOS.Addons.AtmosphereAutopilot/bin/Release/kOS.AddOns.AtmosphereAutopilot.pdb differ