c172p-team / c172p

A high detailed version of the Cessna 172P aircraft for FlightGear
GNU General Public License v2.0
82 stars 43 forks source link

Material animation and effects definitions come after knob animations #1412

Closed wlbragg closed 1 year ago

wlbragg commented 1 year ago

Fixes #1410

dany93 commented 1 year ago

One question though, even if we fix the transponder cache data issue, you still would have an error until the second time you load the aircraft?....

Sorry, I'm afraid of understanding almost nothing.

In avionics.nas, if I delete or comment out these two lines like this

aircraft.data.add(
#    "instrumentation/transponder/inputs/knob-mode",
#    "instrumentation/transponder/inputs/ident-btn",

and start with no aircraft-data/c172p-fg1000-kap.xml cache or a cleaned one (once!), it works permanently with no extra intervention.

Which means that if you merge an avionics.nas file like this in master, it will work. It will be the new version and even if I reload it, it will work.

You do not touch the aircraft-data/c172p-fg1000-kap.xml cache (you can not!), you change avionics.nas.

The cache aircraft-data/c172p-fg1000-kap.xml will be like this:

    <transponder>
      <inputs>
        <digit type="int">0</digit>
        <digit n="1" type="int">0</digit>
        <digit n="2" type="int">2</digit>
        <digit n="3" type="int">1</digit>
      </inputs>
    </transponder>

Clean. Ready for the next time without having to delete the two lines.

The case when I have to clean the cache each time is when the lines are in avionics.nas.

Obviously, if you merge the fixed avionics.nas and I start without cleaning the cache, I have the error. But it is not an issue, deleting the cache once is enough, permanently.

So, the response to

even if we fix the transponder cache data issue, you still would have an error until the second time you load the aircraft?....

should be: Yes, if I do not delete or clean the cache (once). However, even if I do not clean the cache, it will work at the next time and the others. If I understand well your question...

dany93 commented 1 year ago

and remove the unneeded transponder data.

I'm worried: do these transponder data are really unneeded? Or do they have to be replaced for data which are fitted to the FG1000?

wlbragg commented 1 year ago

Which means that if you merge an avionics.nas file like this in master, it will work. It will be the new version and even if I reload it, it will work.

Ok, I think your right. You will be starting the aircraft that will load the "OLD" saved data cache and it will create those two properties. But then, because there is no longer a command to save them on the next exit, any subsequent loading wont have those two properties saved and thus they will be gone from that point on. I actually thought about checking for those properties in the new version and if they are there (because they loaded automatically) have a message popup stating the issue and error you might have and simply exit and restart to correct.