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! 

Go to page 1Go to page 112Go to page 3Go to page 2
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3733
Supporter
Just for Completition....

I know Stephan always said Offset= Output and EventID = Input .... And thats a good hint for New Users.... Whatever this is not 100% correct.
You can go further with that System but i think you should know the whole Logic so you prevented from a missinformation in the future....

A EventID is 100% always a INPUT ..... Nothing Else.
BUT
Most Offsets are also Inputs if you want it..... Offsets are called R or W or R/W .... Means : R= Read Only ---- W= Write Only ---- R/W = Read&Write
Here we normaly make a logic like "Read the Current Offet Value ..... do something with the Offset .... And Write the Result back to the Offset.
A Typical format as input is here "$+1" .... $ Represent the current Value .... We Add "1" to the Value and write it back.
For example in a Heading that work from 0-359 We would read current e.g. 222 Then we Add 1 and write 223 back ( To increase heading by 1 degree)

BUT NOTE:
Those Inputs are a bit advanced.... For example you need to make If Else Conditions for the Swap from 359 to 0 e.g.
In Your exmaple the Offset also have a difficult format.... It is BCD and also splittet in 2 Parts.
So not wonder when you not be able to do this without deeper knowledge.


Summary:
Use Events always if possible.... Cause they are simple and perfect. But get in mind there are situations where no events exist ( Specialy in AddOns) And then you must do Offsetwrites, too.
Good Luck !
2020-04-26 09:09
Avatar
kaborex
Posts: 37
Ahhh.. It must have been around 3am last night and still programming when I also discovered that the offsets also worked as inputs. I was going to post a question about it. In fact I saw a video on youtube using an offset for AP ALT. The "if" formula was also used to stop the Altitude going below zero.

Thanks for the info.

regards

Kaborex
2020-04-26 14:00
Go to page 1Go to page 112Go to page 3Go to page 2