plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

DA40CGDFQ avatar image
DA40CGDFQ asked FlyingRaccoon answered

Simvar Watcher - units code missing or incorrect?

The simvar Watcher program now defaults with units to most of the simvars (excellent thanks for that), however there are some simvars units that default to null/blank.


Question 1 why? (assume they can be multi unit types - example rankine or fahrenheit or celsius)

If you save these simvars to a file they then save with a blank/null and then are automagically made to a default value with a corrected unit.

Question 2 How? where did it get the new default that is did not before?


Second part: there are some units that seem to have been miss converted and are still the enums??- "UNITS_RANKINE" or "UNITS_PERCENT", or "UNITS_DEGREES_ANGL16",


edit: i modified line 655 of simvarsviewmodel.cs

lErrorMessages.Add("l." + i.ToString() + " Wrong Unit name : " + (aSubStrings[1] != null ? "Blank" : aSubStrings[1]));


to add in the word Blank

before save - note blank uints

da40cgdfq-april-19-2022-15h57m15s.png

after load - blank filled in

da40cgdfq-april-19-2022-15h58m09s.png


documentationsamples
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

1 Answer

·
FlyingRaccoon avatar image
FlyingRaccoon answered

Hello @DA40CGDFQ

The default units and list of units you can convert to/from are generated procedurally on our side.
There are a few bugs in the piece of code generating those files.
I have filled a bug about this so it gets fixed and we no longer have missing default units and invalid units.

Thank you for bringing our attention to this.

Regards,
Sylvain

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.