MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
Typpex
Posts: 9
hello,
I have a problem since the last update of MF:
On an LCD screen, for example, I displayed the value of the barometer by $$.$$: if the flight sim value was 29.843854869, it displayed 29.84. Now it shows me the last digits: 48.69.
I don't know how to solve the problem.
I have the same problème with RPM, InHg etc...
Anyone have a solution? Thanks in advance.
2022-11-09 18:06
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

This is a side effect of our last patch. We build the base structure for Mobiflight v10.0 where we handle "Float Values" in a much more easy and modern way there.

The Problem: With MF9.6 we implement the logic that a Float Value is no longer automatically truncate already.

In the past a value of 123,456789 was pushed to Output as 123
Today its pushed as 123,4567789
And in case a LCD show Numbers from Right to left it show in your example with 29.843854869 simply 4869
By the way... In the past it just show 29 pretty sure.... I expect you use something like "$*100" to get 2984.3854869 Cause you use the Decimal Hard $$.$$

Solution:
Until we get the new "Padding Tool" in MF 10.0 i recommend.....

Transform : Truncate($*100) ( To cut after 4 diggit) or Round($*100,0) for round the Value to 4 Diggits
(Ask yourself if 29.84999 should show 2984 or 2985 )
Then $$.$$ will work.

Alternate:
Use Round($,2) and use in Display just $$$$$
Then the Result of 29.843854869 is then 29.84 and is shown on the Display ! ( Use 5 Plcaeholders cause the decimal also need one diggit.... with 4 it will show 9.84
[Last edited by pizman82, 2022-11-09 21:10]
Good Luck !
2022-11-09 19:25
Avatar
Typpex
Posts: 9
Thank you very much for the quick response ;
I suspected it was something like that but my programming skills are not very developed.
(I had tested int($): I don't know the instructions used...
Is there a site where I can find the language used ?
2022-11-09 20:05
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconTyppex:


Is there a site where I can find the language used ?



Sorry . I missed to post the link also! :blush:

---> https://github.com/ncalc/ncalc/wiki :thumbup:
Good Luck !
2022-11-09 21:09
Avatar
Typpex
Posts: 9
Thank you, round($,2) works fine !
2022-11-10 23:53
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconTyppex:

Thank you, round($,2) works fine !



:thumbdown: No it wont work....

Nclac is Case Sensetive!

round($,2) will NOT work..... The "R" Must be capital.
It must be Round($,2)
Good Luck !
2022-11-11 15:32
icon