Jump to content

[1.9-1.10] Throttle Controlled Avionics


Recommended Posts

Quote

 

That's the culprit. Thanks!

Without automated testing (and the lack of several human slaves at my disposal) I'm doomed to miss these bugs 

 

 

Thats my Job. i'm a technical QA in real life ;-) (not a slave:lol:)

Link to post
Share on other sites
On 4/28/2020 at 6:17 PM, GoAHead said:

there might be an issue with the controls UI when going to flight mode a second time.  only the modules and main UI is showing up but the controls UI not. there is also an error in the console which states something with an error on redrawing. anyone   with the same issue?

 

Log:

[EXC 23:42:21.769] ArgumentException: Getting control 0's position in a group with only 0 controls when doing repaint
Aborting
    UnityEngine.GUILayoutGroup.GetNext () (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUILayout.BeginVertical (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUILayout.BeginVertical (UnityEngine.GUILayoutOption[] options) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    ThrottleControlledAvionics.TCAGui.DrawMainWindow (System.Int32 windowID) (at <e689ed1085464a36ab2516ad57c1a974>:0)
    UnityEngine.GUILayout+LayoutedWindow.DoWindow (System.Int32 windowID) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

 

Also found a second exception. i do not know if related

[EXC 00:14:41.952] NullReferenceException: Object reference not set to an instance of an object
    AT_Utils.UIBundle+<LoadAsset>d__10.MoveNext () (at <488b8abd490d4610a99c7b87ac625952>:0)
    AT_Utils.UIWindowBase`1+<Show>d__16[T].MoveNext () (at <488b8abd490d4610a99c7b87ac625952>:0)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
 

Getting this exact situation as well.  

Link to post
Share on other sites
12 hours ago, MaxPeck said:

Getting this exact situation as well.  

Fixed it. Want to do a few more things before release. Probably in a day or two.

Link to post
Share on other sites
On 3/8/2020 at 8:18 PM, ss8913 said:

one thing that I think is unrelated but, if you're in there anyway - I see in the config window that you can uncheck RCS translation and RCS rotation -it'd be nice if, when unchecked but RCS is still on, TCA wouldn't block manual RCS inputs.

@allista As quoted above from @ss8913, after the update this still looks to be an issue - or it could be as designed - I'm not sure.  To reiterate the quote, RCS translation and rotation both off, RCS on, when control input is entered for RCS, TCA zeros the thrust limiter of the RCS in the direction of the input.  One major use case here is docking of ships on the surface (one sitting on the ground), letting TCA hold an altitude or slowly descend above the target, while guiding the horizontal translation to the docking port with RCS and a docking aid like docking port alignment indicator.  Thoughts?

Link to post
Share on other sites
1 hour ago, SkyPunch said:

@allista As quoted above from @ss8913, after the update this still looks to be an issue - or it could be as designed - I'm not sure.  To reiterate the quote, RCS translation and rotation both off, RCS on, when control input is entered for RCS, TCA zeros the thrust limiter of the RCS in the direction of the input.  One major use case here is docking of ships on the surface (one sitting on the ground), letting TCA hold an altitude or slowly descend above the target, while guiding the horizontal translation to the docking port with RCS and a docking aid like docking port alignment indicator.  Thoughts?

Hm, I need to test it, but by design nothing should prevent using translational keyboard controls, wether the "Translation" and "Rotation" options are On or Off.

I've docked a ship using RCS only many times with TCA enabled (albeit in space).

The "RCS Translation" option tells TCA if it itself is allowed to use translational controls for small course corrections, instead of conventional rotate-and-burn operation.

The "RCS Rotation", on the other hand, when disabled, effectively disables RCS when only rotational controls are used.

So both options do nothing to prevent using the translational controls by yourself. What could cause the described behavior is there RCS balancing itself, which, when you use only translational controls, modifiers limiters to keep generated torque at zero. In an unbalanced craft this could lead to effectively disabled RCS.

Link to post
Share on other sites
On 4/28/2020 at 12:21 PM, Dessix said:

Woo, thanks @allista!

Also, that CargoAccelerators mod looks like something I've been looking for for a while. Excited to use them both :)

Here you are. Still just a toy, though.

 

Link to post
Share on other sites

I still get this one error in my log when i open the tca menu at launch

 

[EXC 17:51:53.452] ArgumentException: Getting control 0's position in a group with only 0 controls when doing repaint
Aborting
    UnityEngine.GUILayoutGroup.GetNext () (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUILayout.BeginVertical (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUILayout.BeginVertical (UnityEngine.GUILayoutOption[] options) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    ThrottleControlledAvionics.TCAGui.DrawMainWindow (System.Int32 windowID) (at <cc197bb611564a70862493f5aba261ee>:0)
    UnityEngine.GUILayout+LayoutedWindow.DoWindow (System.Int32 windowID) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

Link to post
Share on other sites
18 hours ago, The Space Man said:

I still get this one error in my log when i open the tca menu at launch

 

[EXC 17:51:53.452] ArgumentException: Getting control 0's position in a group with only 0 controls when doing repaint
Aborting
    UnityEngine.GUILayoutGroup.GetNext () (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUILayout.BeginVertical (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUILayout.BeginVertical (UnityEngine.GUILayoutOption[] options) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    ThrottleControlledAvionics.TCAGui.DrawMainWindow (System.Int32 windowID) (at <cc197bb611564a70862493f5aba261ee>:0)
    UnityEngine.GUILayout+LayoutedWindow.DoWindow (System.Int32 windowID) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

Yea, it's old and actually harmless. It will go away when all the TCA UI will be converted to uGUI.

Link to post
Share on other sites
  • 2 weeks later...
Posted (edited)

hi there

i'm experiencing some issues when switching from VAB to flight Mode. I'm setting up TCA with engine Profiles  in VAB but until i'm going to flightmode TCA doesn't load up (stays blue) and the following exceptions are throwing

[EXC 09:53:53.362] NullReferenceException: Object reference not set to an instance of an object
	ThrottleControlledAvionics.OnPlanetProps.AddGear (PartModule pm) (at <cc197bb611564a70862493f5aba261ee>:0)
	ThrottleControlledAvionics.VesselWrapper.UpdateParts () (at <cc197bb611564a70862493f5aba261ee>:0)
	ThrottleControlledAvionics.VesselWrapper..ctor (ThrottleControlledAvionics.ModuleTCA tca) (at <cc197bb611564a70862493f5aba261ee>:0)
	ThrottleControlledAvionics.ModuleTCA.init () (at <cc197bb611564a70862493f5aba261ee>:0)
	ThrottleControlledAvionics.ModuleTCA+<delayed_init>d__62.MoveNext () (at <cc197bb611564a70862493f5aba261ee>:0)
	UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[LOG 09:53:53.364] FF: situation change for flag
[LOG 09:53:53.364] FF: situation change for flag
[LOG 09:53:53.365] FF: situation change for flag
[LOG 09:53:53.365] FF: situation change for flag
[LOG 09:53:53.365] FF: situation change for flag
[LOG 09:53:53.366] FF: situation change for flag
[LOG 09:53:53.506] [RemoteTech] ModuleRTDataTransmitter::OnLoad
[LOG 09:53:53.506] [RemoteTech] ModuleRTAntennaPassive: Find TRANSMITTER success.
[LOG 09:53:53.506] [RemoteTech] ModuleRTAntennaPassive: Add TRANSMITTER success.
[LOG 09:53:53.507] [RemoteTech] ModuleRTDataTransmitter::OnLoad
[LOG 09:53:53.507] [RemoteTech] ModuleRTAntennaPassive: Find TRANSMITTER success.
[LOG 09:53:53.507] [RemoteTech] ModuleRTAntennaPassive: Add TRANSMITTER success.
[LOG 09:53:53.507] [RemoteTech] ModuleRTDataTransmitter::OnLoad
[LOG 09:53:53.508] [RemoteTech] ModuleRTAntenna: Find TRANSMITTER success.
[LOG 09:53:53.508] [RemoteTech] ModuleRTAntenna: Add TRANSMITTER success.
[ERR 09:53:53.587] Exception handling event onVesselWasModified in class ModuleTCA:System.NullReferenceException: Object reference not set to an instance of an object
  at ThrottleControlledAvionics.OnPlanetProps.AddGear (PartModule pm) [0x0004a] in <cc197bb611564a70862493f5aba261ee>:0 
  at ThrottleControlledAvionics.VesselWrapper.UpdateParts () [0x0011e] in <cc197bb611564a70862493f5aba261ee>:0 
  at ThrottleControlledAvionics.VesselWrapper..ctor (ThrottleControlledAvionics.ModuleTCA tca) [0x00093] in <cc197bb611564a70862493f5aba261ee>:0 
  at ThrottleControlledAvionics.ModuleTCA.init () [0x0000f] in <cc197bb611564a70862493f5aba261ee>:0 
  at ThrottleControlledAvionics.ModuleTCA.onVesselModify (Vessel vsl) [0x000c3] in <cc197bb611564a70862493f5aba261ee>:0 
  at EventData`1[T].Fire (T data) [0x000b0] in <55ba45dc3a43403382024deac8dcd0be>:0 

[EXC 09:53:53.588] NullReferenceException: Object reference not set to an instance of an object
	ThrottleControlledAvionics.OnPlanetProps.AddGear (PartModule pm) (at <cc197bb611564a70862493f5aba261ee>:0)
	ThrottleControlledAvionics.VesselWrapper.UpdateParts () (at <cc197bb611564a70862493f5aba261ee>:0)
	ThrottleControlledAvionics.VesselWrapper..ctor (ThrottleControlledAvionics.ModuleTCA tca) (at <cc197bb611564a70862493f5aba261ee>:0)
	ThrottleControlledAvionics.ModuleTCA.init () (at <cc197bb611564a70862493f5aba261ee>:0)
	ThrottleControlledAvionics.ModuleTCA.onVesselModify (Vessel vsl) (at <cc197bb611564a70862493f5aba261ee>:0)
	EventData`1[T].Fire (T data) (at <55ba45dc3a43403382024deac8dcd0be>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:LogException(Exception)
	EventData`1:Fire(Vessel)
	RemoteTech.Modules.ModuleRTAntenna:AddTransmitter()
	RemoteTech.Modules.ModuleRTAntenna:SetState(Boolean)
	RemoteTech.Modules.ModuleRTAntenna:OnConnectionRefresh()
	RemoteTech.VesselSatellite:OnConnectionRefresh(List`1)
	RemoteTech.NetworkManager:FindPath(ISatellite, IEnumerable`1)
	RemoteTech.NetworkManager:OnPhysicsUpdate()
	RemoteTech.RTCore:FixedUpdate()
[LOG 09:53:53.592] [RemoteTech] ModuleRTDataTransmitter::OnLoad
[LOG 09:53:53.593] [RemoteTech] ModuleRTAntenna: Find TRANSMITTER success.
[LOG 09:53:53.593] [RemoteTech] ModuleRTAntenna: Add TRANSMITTER success.
[ERR 09:53:53.624] Exception handling event onVesselWasModified in class ModuleTCA:System.NullReferenceException: Object reference not set to an instance of an object
  at ThrottleControlledAvionics.OnPlanetProps.AddGear (PartModule pm) [0x0004a] in <cc197bb611564a70862493f5aba261ee>:0 
  at ThrottleControlledAvionics.VesselWrapper.UpdateParts () [0x0011e] in <cc197bb611564a70862493f5aba261ee>:0 
  at ThrottleControlledAvionics.VesselWrapper..ctor (ThrottleControlledAvionics.ModuleTCA tca) [0x00093] in <cc197bb611564a70862493f5aba261ee>:0 
  at ThrottleControlledAvionics.ModuleTCA.init () [0x0000f] in <cc197bb611564a70862493f5aba261ee>:0 
  at ThrottleControlledAvionics.ModuleTCA.onVesselModify (Vessel vsl) [0x000c3] in <cc197bb611564a70862493f5aba261ee>:0 
  at EventData`1[T].Fire (T data) [0x000b0] in <55ba45dc3a43403382024deac8dcd0be>:0 

any idea what  this means? building up a complete new Vessel works. but something goes wrong with  my big  Ship.
thx in advance

 

OK it was the     #LOC_M2X_LandingLeg_title = SPL Heavy-Duty landing System from the MK2 Extension.:confused:

Edited by GoAHead
Link to post
Share on other sites

This mod is massively helpful. Thank you! 

However, one thing does make it a lot harder to use. A lot of UI elements show whether they are disabled or enabled by displaying either a pale yellow, or a pale yellowish green, which are almost impossible for me to tell apart. I _am_ partly red/green colourblind, so this may not be the case for everyone, but I suppose it's something to be aware of.

Link to post
Share on other sites
1 hour ago, Tokamak said:

This mod is massively helpful. Thank you! 

However, one thing does make it a lot harder to use. A lot of UI elements show whether they are disabled or enabled by displaying either a pale yellow, or a pale yellowish green, which are almost impossible for me to tell apart. I _am_ partly red/green colourblind, so this may not be the case for everyone, but I suppose it's something to be aware of.

you can change the color as you wish. rightclick the TCA modul Icon

Link to post
Share on other sites
10 hours ago, Tokamak said:

This mod is massively helpful. Thank you! 

However, one thing does make it a lot harder to use. A lot of UI elements show whether they are disabled or enabled by displaying either a pale yellow, or a pale yellowish green, which are almost impossible for me to tell apart. I _am_ partly red/green colourblind, so this may not be the case for everyone, but I suppose it's something to be aware of.

Try right clicking on the TCA icon in the stock toolbar. (Might also work with any allista mod). It brings up a color changer dialog IIRC. 

Link to post
Share on other sites
On 5/21/2020 at 8:47 PM, B-STRK said:

Try right clicking on the TCA icon in the stock toolbar. (Might also work with any allista mod). It brings up a color changer dialog IIRC. 

Brilliant! Thank you! :)

Link to post
Share on other sites
  • 2 weeks later...
Posted (edited)

Is there a way to get TCA to peacefully co-exist with MechJeb? What I mean is... can I make a craft whose default thrust isn't quite balanced, use TCA to keep it balanced so it doesn't flip when it thrusts, and then have mechjeb deal with its orientation and throttle, so I can use stuff like the mechjeb rendezvous autopilot or lander?

Basically, can I use TCA to keep my craft balanced without all of the other (admittedly very useful) features? Enabling and disabling various TCA modules seems to result in one of two states: Either TCA has total control and Mechjeb can't even set my orientation... or the craft spins and crashes due to unbalanced thrust.

I hope that question makes sense.

 

Edit: Another problem I'm having is with the orbital land-at-target function, and the "jump to" function. Both of them just give the message "target should be a vessel or waypoint", even when I have a vessel targeted. I get the same message when I use the "add as waypoint" function, to make a waypoint at the location of my target. Clearly I am somehow fundamentally misunderstanding how this all works. I just want to make a ground base, and land a craft near it.

Edited by Tokamak
Link to post
Share on other sites
3 hours ago, aaaaaaaaaaaaaaaaaaaaaaaaaa said:

TCA is really useful for all kinds of fancy aircrafts with jet engines! However, I didn't manage to make it work with rotors + propellers or heli blades from Breaking Ground. Is this a known issue of I'm doing something wrong? Could not find discussions of any issues about this.

I need to test it (never actually played with BG), but if they're implemented using anything other than the stock ModuleEngine, then no, TCA won't even see them as engines.

14 minutes ago, Tokamak said:

Is there a way to get TCA to peacefully co-exist with MechJeb? What I mean is... can I make a craft whose default thrust isn't quite balanced, use TCA to keep it balanced so it doesn't flip when it thrusts, and then have mechjeb deal with its orientation and throttle, so I can use stuff like the mechjeb rendezvous autopilot or lander?

Basically, can I use TCA to keep my craft balanced without all of the other (admittedly very useful) features? Enabling and disabling various TCA modules seems to result in one of two states: Either TCA has total control and Mechjeb can't even set my orientation... or the craft spins and crashes due to unbalanced thrust.

I hope that question makes sense.

Well, you can, while building the craft in editor, disable the Attitude Control module in TCA Editor -> Modules. Then TCA won't try to control ship's attitude.

As for the maneuver planner, you can use MJ to plan the maneuver, then TCA's own maneuver execution to actually perform it.

Link to post
Share on other sites
9 minutes ago, allista said:

I need to test it (never actually played with BG), but if they're implemented using anything other than the stock ModuleEngine, then no, TCA won't even see them as engines.

Well, you can, while building the craft in editor, disable the Attitude Control module in TCA Editor -> Modules. Then TCA won't try to control ship's attitude.

As for the maneuver planner, you can use MJ to plan the maneuver, then TCA's own maneuver execution to actually perform it.

Ah, I see. That makes sense. Will TCA still keep my thrust balanced if weight distribution changes, like fuel being used up?

Link to post
Share on other sites
3 minutes ago, Tokamak said:

Ah, I see. That makes sense. Will TCA still keep my thrust balanced if weight distribution changes, like fuel being used up?

Yep, that is done by the core module.

I actually need to test all this -- last time I used MJ was before KSP-1.0 :confused:

Link to post
Share on other sites
5 minutes ago, Tokamak said:

Ah, I see. That makes sense. Will TCA still keep my thrust balanced if weight distribution changes, like fuel being used up?

Yep.

I've done this all on the fly to-I've done it just by enabling TCA and the right modules on a ship in flight, and then using MechJeb to execute once or twice.  (MechJeb's landing guidance typically needs less dV to land, in my experience.)

Link to post
Share on other sites

Mostly because MechJeb assumes you knew what you were doing when you picked a landing point - and then doesn't actually guarantee you'll land there, depending on how well your ship is designed.  TCA doesn't assume the landing point is clear, and checks - but then may move you around a bit. ;)

Still, for a couple of rovers I've had, the difference between running out of fuel a km over the surface or running out of fuel a few meters over the surface has made a difference.

Link to post
Share on other sites
Posted (edited)

I've gotten MechJeb and TCA to play nice by turning off all of the TCA modules during flight, but leaving TCA itself still active. This means I can use MechJeb autopilot features. Hooray!

I'm still having that weird thing I mentioned before, though: Using TCA, any attempt to use "jump to" or "go to" or "land" just gives the message "target should be a vessel or a waypoint", even when my target is a vessel. *scratches head*

Edit: Oh, I think I get it, at least partly. TCA has its own concept of "waypoints", that don't seem to correspond to the waypoints that Waypoint Manager uses. I think that's something to do with it

 

Edited by Tokamak
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...