From 76992b51284bd228f06d6c8fce79f7f2d9654928 Mon Sep 17 00:00:00 2001 From: Richard Crockford <40358880+RCrockford@users.noreply.github.com> Date: Thu, 30 Apr 2020 12:45:45 +0100 Subject: [PATCH] Added pseudoflc toggle --- .gitignore | 4 +--- src/kOS.Addons.AtmosphereAutopilot/Addon.cs | 11 +++++++++++ .../kOS.AddOns.AtmosphereAutopilot.dll | Bin 0 -> 11776 bytes .../kOS.AddOns.AtmosphereAutopilot.pdb | Bin 2308 -> 2396 bytes 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 src/kOS.Addons.AtmosphereAutopilot/bin/Release/kOS.AddOns.AtmosphereAutopilot.dll 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 0000000000000000000000000000000000000000..ede837c9cdd8182d0610a8db10265cccc744955e GIT binary patch literal 11776 zcmeHN4RBo5bw2m)?$b(^Wou>2*cez_HpsHP$ddnr`LU#xY+=iiy^@WKu>7?9BtKZ~ zTfet!dy$n2Q<(99O=xkO;xYq)(wfp~njr(ULkcOw#3`Nv<2FN63Zx~i(~uOVrAa5j z{m#8_|16u5nRYtU@}xcQo}YW}Ip>~x?tO2!?^nJ|J|gntbKwHf3%K*ONy5(t(_q(J z^Cva*T;6}e=Iyvc=u2y;o1nj{oL3`)W|`&_?jlF2JPidL>n&VeHI=rm@cJ)z_*mhM>6K&4Dd&m z0)Qud_3Q>FuQ05NIIa^1CT-h?20MB!J|)*COjpD)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8uwYO#bmzQiau zUg1UvDx^#uNnRb*R6`W)GomImeYOG!-}8!&=T*oCtB?&I<7A#C8_YTh4?@{W(zMX@ zoA}q^?esCNssj3zyM7%;`ok0&sty;3a5yZqI;wW83Z?d#W#8u9gsRjq5s##XHvUERKF!&qC(s&#AE z$JdRux3sNaZ{mjqf+|`ftMPUi-R27NVPL76)e|0F7e}^t4;Idy&EA3MCcIEyA8Ca< zHS-G0sO92;Cbu1D)Op-1T;PPIw4W8@MUU3eL3EX%D=y)gI*!P}zjx@$-yzXAz(HAz zu0P#`&r->ffVJUOH1Vsod7bzyBib2@#$NcrlXDthN_RZ5@%(Rn`rvbj5mDC-!$U64 z!oxeQIQFx|aMX_DNjQ~phc{c9E!ojw_`T{9_6*~98qDJp++`+X*dD!e7zbk0aLv5v zAy*#CG0_$@vWez`GSJ`~p@A}stF zbe7wK&u#mNUdMMI`RjEbew0AFuuqQw@}3>TKF+6s5xKkfpv~7y{-1oxhYHruSN@K# zvE}6l)Vy~77DWT!Fkt6)aEjnv+l0;(c5PdVER*lm2EjEzb-_2Vi(BBPJQZK_H^Wu| zn=+8HKp($^rl6E*f#2$H4Ng;t0WCsLfwK#r5GF8o3R>isVc;z-;icvHIrxlMM3Bp0 zWB5Ks6vm5!gCn@KBVA^vI%Vx0FP`5GvQGy_a%GJ8*&v6A{#X5Y&c3+* Vk49jV`pxK<@f))*uK#}#_)ju72?GEC literal 0 HcmV?d00001 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 57a228326e961451663ec3dfd7dc7b04a750a64c..a3231b8988bdcebdc4b97f36d823ed58bd729b8f 100644 GIT binary patch delta 731 zcmYk4OK1~O6o${-%w$HLF`1aDk)&zU)EJ{SEtNJRSW;U4Z6bc1ac~fL~VNtq1$|!ArAauIRJ= zEYf21(%GhMhB1R^uQUzm(5q6ij#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