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
crazypilot_uk
Posts: 30
I have successfully calibrated my C150 vertical speed indicator using the 28BYJ-48 stepper motor :) , this works great and follows the scale on the instrument up to the maximum which is +/- 2000ft per min.
The problem comes when 2000ftpm is exceeded as the stepper will of course keep moving past 2000, I found a way using the compare tab to limit the movement in the negative direction by setting :
if value is <= -2950
set to -2950
else $

Is there a way to limit both directions of the gauge ?

Any help would be much appreciated !
2018-02-28 14:31
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
2 Possible ways.... ( I not try out but this should work)

1. Use Interpolation.

Define a "Overdrive Area" that is verry short on both ends.

Line 1: Input: -10000 = Output -2050
Line 2 Input: -2000 = Ouptut: -2000
Line 3 Input: 0 = Output : 0
Line 4 Input 2000 = Output 2000
Line 5 Input 10000 = Output 2050

Now A Value from -2000 until +2000 is shown 1:1 clearon Gauge.
A Value below -2000 or more then +2000 will change needle only a little bit. ( A Increase by 8000 now means a needle moving like 50 in real)

2. Use a transform
In Compare you can use only one value.... Transformfield is much better for this.
Transform : if($<-2000,-2000,if($>2000,2000,$))

This means.... If Value below -2000 then set -2000 all time.... If Value is bigger then +2000 then set 2000 all time.... If Value is between -2000 and +2000 then show orignal value.

Normaly both should work !
Good Luck !
2018-02-28 16:33
Avatar
crazypilot_uk
Posts: 30
Option 2 worked a treat ! thank you :thumbup: :thumbup:
2018-02-28 18:48
icon