HHS81 / c182s

Cessna C182S (1996 model) for FlightGear
GNU General Public License v2.0
26 stars 9 forks source link

State support using wrong launcher property name #287

Closed wlbragg closed 3 years ago

wlbragg commented 5 years ago

I was looking at you code for ideas for the c172p state support system and noticed you are reading the property /sim/init-state in c182s-states.nas

I don't see that property being passed at all from the launcher. What I do see passed from the state flag is /sim/aircraft-state

Maybe it has changed since you set this up, or I am missing something about your nasal code.

wlbragg commented 5 years ago

@HHS81 @hbeni

I figured it out. You are creating this property "/sim/init-state" instead of using "/sim/aircraft-state" which is automatically passed from the launcher. Any particular reason why you are making this property VS using the one provided by the launcher?

I'm wondering if I missed something, as I see no reason to waist resources by recreating a duplicate when the property is already provided?

At any rate, I'll close this as I understand what your doing, I just don't understand why!

hbeni commented 5 years ago

The reason is that i want to keep the user selected value in the gui dialog and treated the launcher option to be a single shot thingy. That was with the old launcher in mind, so it probably needs to be adjusted now.

hbeni commented 5 years ago

@wlbragg I investigated, it indeed seems that just the launcher property had changed. At the time i wrote that code, there was no such launcher functionality, it was just proposed.

The fix is not that quick because we need to translate the current launcher state names into internal ones, and those differ. The overlay-state-xml files set the aircraft-state property to the state name (the launcher does this) and the init-state to the internal value (the xml defines this).

It is currently no real issue/bug since the code works like intended (init-state gets correctly set and used and aircraft-state is just ignored), so i have put this to low priority.

To fix this we would need to

hbeni commented 5 years ago

... while we are at this, we may also change the internal GUI dialog to a drop down to conserve display space. This would involve removal of some nasa code somewhere i currently do not remember that ensures proper state of the gui.