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
Triple7
Posts: 17
Hello,

I'm programming my overhead panel for the PMDG777. Switches with Event ID's and leds with a single offset number are all working well, but I struggle with doubles like ELEC_AnnunExtPwr_AVAIL[2]. I've been reading that I have to add an extra number for the left and right led. Where do I have to put this extra number (Offset, Size in Bytes or mask value with.) Thanks for your help, great program.....love it. Nico
2019-10-16 00:40
Avatar
thatchi
Posts: 151
Just add 1 to offset. For example, Offset 6442 for spoilers switch, then 6442 for left and 6443 for right one.
2019-10-16 02:53
Avatar
Triple7
Posts: 17
Hello Thatchi. Thanks for your answer. How do I do it when the offset is 644B for example?
2019-10-16 03:36
Avatar
thatchi
Posts: 151
Hex number. So 0123456789abcdef. After b is c. Therefore after 644b is 644c. And so on. Good luck.
2019-10-16 04:09
Avatar
Triple7
Posts: 17
Tried that already, but that doesn't work. :confused:
2019-10-16 09:40
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
Hi

Thatchi explaned all 100% correct.

PMDG just save work and not write those offsets each single in a line in that PDF.
So things that exist multiple times ( like same way for Cpt and Fo Side) are listed as "blabla x2 " ..... The size in Byte is the combine size.
So a Offset like "blabla x2 - 2 Bytes" means this are TWO Offsets in a row... Each got Size of 1 Byte.

About Hexadecimal...... Here the Windows Calculator is verry helpfull if you not understand the HEX System youreself.
Open it and choose in settings "Programmer" (instead of Standard or scientific) .... Here you can set HEX and simply say 644B + 1 = 644C (e.g.)

**************
So try it again.... Maby you just forget a checkmark or missundertand something..... The recomend technic is correct and work 100% fine !
Good Luck !
2019-10-16 12:21
Avatar
Triple7
Posts: 17
Pizman and Thatchi, both thank you I will sort this out.
2019-10-16 13:40
Avatar
Triple7
Posts: 17
The Hexadecimal is completely clear to me and the calculators on the net very helpful, but it still doesn't function with the latest Mobiflight 7.7.0, Prepar3D 4.513.32097 and FSUIPC 5.152.
I'm in a cold and dark cockpit and the avail lights are both on in the sim and also on my overhead Sec_Ext Power (0x644B, Value Type Int, Size in Bytes 2) Prim_Ext Power (0x644C, Value Type Int, Size in Bytes 2) When I press the Primary Ext Power switch on my overhead panel the avail light in the sim goes of, but not on my overhead. When I press the Secondary Ext Power switch the light goes of, both in the sim and on my overhead. When I press the Primary Ext power switch again the avail light goes off in the sim, not on my overhead and the Secondary Ext Power led on my overhead goes on, but not in the sim. :huh: So what's wrong, I don't know anymore? :confused:
2019-10-18 02:29
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1443
Try Byte size 1 in the Config. I don’t know the add on and haven’t tried it but you have two adjacent Offset addresses that are 1 byte apart and you talk about 2 bytes. That means the value your read would overlap. Which might explain the weird behavior on your OVHD
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-10-18 03:58
Avatar
thatchi
Posts: 151
It should work with byte size 1 like pizman and doc said. Byte size is the sum of both offsets. Good luck.
2019-10-18 11:48
Avatar
thatchi
Posts: 151
Also , you can monitor the values of these offsets by looking at the last 2 columns in MF. FSUIPC value and the actual output value after transform. FSUIPC also can display up to 4 values of these offsets that you selected in a window. It is helpful to find out what for what in case you not sure.
2019-10-18 12:03
Avatar
thatchi
Posts: 151
On the same note, mask value is to choose what bit to use. Since there are 8 bits in 1 byte. You need only 1 bit to display on off state of an indicator light, so an offset of 1 byte can control a total of 8 lights. Some special add on they use 1 byte offset to control multiple indicators. Things can get complicated sometime.
2019-10-18 12:28
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
iconpizman82:


So things that exist multiple times ( like same way for Cpt and Fo Side) are listed as "blabla x2 " ..... The size in Byte is the combine size.
So a Offset like "blabla x2 - 2 Bytes" means this are TWO Offsets in a row... Each got Size of 1 Byte.


****
iconTriple7:

Sec_Ext Power (0x644B, Value Type Int, Size in Bytes 2) Prim_Ext Power (0x644C, Value Type Int, Size in Bytes 2)


****
iconQuote:


6449 2 BYTE x 2 ELEC_annunExtPowr_ON (2) Boolean
644B 2 BYTE x 2 ELEC_annunExtPowr_AVAIL (2) Boolean
644D 2 BYTE x 2 ELEC_Gen_Sw_ON (2) Boolean



*********************
At first you not read or understand my last Posting...... I clearly said..... If a Offset is x2 then the Size is for BOTH ..... So 1 Byte EACH in that case

So if you say.... Sec_Ext Power Offset 644B Size TWO Byte .... Then the Config read Offset 644B AND 644C in one sequence .
If one of the both offets is "1" then the result is LED ON . So your connected LED will light aslong one of two offsets is ON.
(Represent your reported result)

More crazy is your second Config.... Prim_Ext Power 644C 2 Byte.
This config include the Right EXT-PWR Avail Light and also the left GEN Switch ON Status Offset.....
Cause you read 2 Bytes.... Means you read 644C and also 644D .... And 644D is already the LEft Gen Switch Data.
So if the Left Gen Switch is ON in your cockpit then this Output LED Config will light always ... No matter if a Power LED is on or Off in virtual Cockpit..... Cause its still >0 in case of Gen switch.

******************
Solution again:
Every Output need a OWN Config ..... Every Config got its OWN LED Device ..... And Every Config read a OWN single 1 Byte INT Offset.

6449 - Left Ext Power ON LED
644A. Right Ext Power ON LED
644B Left Ext Power Avail LED
644C Right Ext Power Avail LED
644D Left Gen Switch status
644E Right Gen Switch Status

I hope now every problem is solved!
********************
[Last edited by pizman82, 2019-10-20 00:18]
Good Luck !
2019-10-18 13:19
Avatar
Triple7
Posts: 17
Hello All. I changed this (Prim_Ext Power (0x644C, Value Type Int, Size in Bytes 2)) to 1 and it's all working now. Very very nice. Thank you all, Nico
2019-10-19 01:48
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1443
Awesome! Sometimes things are easy to solve.
Have fun with MobiFlight!!!
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-10-19 17:08
icon