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! 

icon
Avatar
mroschk
Posts: 2
Hello,

i am new here and finished the test with the Parking Brake.

Now...i am building a Homecokpit and use Prosim737.
For a test i set up the free offset 0x66C0 in Prosim and also in Mobiflight .. and it works.
But now it is only one LED. With SIOC from Opencockpits i can use every bit from a 1byte int as example.
So, i can control 8 LED with only one Offset.
LED 1 = 0x66C0.1
LED 2 = 0x66C0.2
and so on.

Is that also possible with Mobiflight?

Matthias
2018-12-29 20:07
Avatar
thatchi
Posts: 129
From what I have been reading. Yes. The offset represent one byte , which including 8 bits from 0 to 7. If you want to read individual bit , use masking option and tick off what bit you want. I never have need to do that, so not 100% sure . The experts, Stephan or pizman , will confirm if it correct. Good luck.
2018-12-30 05:00
Avatar
mroschk
Posts: 2
Ahh, i got it ...cool !!!

But what about a Potentiometer?
I did not find anything about connecting a Potentiometer ?

Matthias
2018-12-30 21:06
Avatar
StephanHo
From: EDDG, Germany
Posts: 1397
Supporter
Hi Matthias,

welcome to Mobiflight!

You're right. Mobiflight can not handle a Potentiometer (at the moment). Here you need a joystick interface. This you can handle via FSUIPC directly.

How did you solve the problem with the bits?
Grüße,
Stephan
2018-12-31 00:05
Avatar
thatchi
Posts: 129
I think by using bit masking option as explained.
2018-12-31 02:53
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2949
Supporter
Hi

I think this is already solved..... So just some additional notes from myself.

1. Mobiflight can handle BIT Informations ( as you already find out you can "mask" one or multible bits).
BUT You should note some important "rules" in this system.
- You can READ One or multible bits with a config. ( For example you can Read 4 Bits in a row if a Information os in a halfbyte (nibble) )
- You can WRITE only to ONE Bit.... Not to Multible Bits.
If you need to write multible bits then you must work with decimal-binary calculations. For example you write "3" in decimal to set Bit 0 and 1 to "1" (0000 0011)
- Read Values are shown in decimal like it is a part of a "byte" . If you Read for example Bit 4 of a byte offset then the result is a binary value 0001 0000 and thats decimal 16
So ... Whatever you read only one bit... The Value is not 1 or 0 .... Its in that example 16 or 0 ( Always remeber if you need it for Precondition or Compare/Transform)

2. If Bit sets are possible is not a Mobiflight Question.... Its a question if "ProSim" allow you to write a information to a bit instead of a byte.

3. Finaly it no problem to use Byte here. (Maby you save some traffic if Mobiflight must not read hundrets of bytes) BUT Your range in FSUIPC is big enough to work with hundrets of bytes !
Good Luck !
2019-01-02 05:07
icon