PDA

View Full Version : Offset question?



Daveanne
01-02-2010, 10:36 AM
Just asking to see if anyone can help?

I have identified an offset in PMDG which is the flag for the front passenger cabin door being open/closed, it is: 3367 = 0 (closed) and =1 (Open), I am going to interface using FS2Phidgets software and the Phidgets 0/16/16 interface board, to make my overhead door "Warning" lights come on.

I also note that in the PMDG Keyboard assignment list a "Key Combination" can be assigned to: "Doors - open other", which when done opens the rear Pax door along with both right hand side cargo doors (front & Rear).

However this operation doesn't light any more overhead warning lights, when this happens (although there are annuciators for this).

I have taken great pains to look through all, yes all the offsets and found that: 2A64, 2A65, 2A66, 2A67 and 2A68 all change values, when the 'Doors other' process is going though its paces, however all of these offsets end up back at "0", from were they started!

This makes things impossible to get the FS2Phidgets to use these offsets as a "flag" to show that the 'other doors' are now open, hopefully then I can assign them to more warning lights.

Long winded way of asking, but how does one allocate an offset to a particular action and or how can I make one of those offsets stay at (in the case of 2A68, it goes from 0-2-0), stay at 2?

Hope someone can help?

Daveanne.

Peter Dowson
01-02-2010, 11:39 AM
I have identified an offset in PMDG which is the flag for the front passenger cabin door being open/closed, it is: 3367 = 0 (closed) and =1 (Open)

3367 is a documented FSUIPC offset reflecting the door settings, and operating them, in FS. It isn't specific to PMDG and it is documented in my offsets lists and has been for many years.

In FS9 it only has the one useful bit, bit 0 (worth 1), and this is for the main passenger door. In FSX there are 8 bits for up to 8 doors, but I think in general only 4 are supported. Doors and their numbers are defined in the specific aircraft.cfg file.


I have taken great pains to look through all, yes all the offsets and found that: 2A64, 2A65, 2A66, 2A67 and 2A68 all change values, when the 'Doors other' process is going though its paces, however all of these offsets end up back at "0", from were they started!

I assume this is in FS9, not FSX, as those aren't used in FSX. In FS9 they aren't determined, but are close to the "canopy" and "folding wing" offsets, so possibly PMDG are making use of those facilities to implement their door controls. Have you enabled FSUIPC's event logging to see if it is sending any special controls to FS?


Long winded way of asking, but how does one allocate an offset to a particular action and or how can I make one of those offsets stay at (in the case of 2A68, it goes from 0-2-0), stay at 2?

Most "offsets" are mapped inside FSUIPC to values in various parts of FS innards. You can't "allocate" them. The application offsets are assigned to the application programmers to do with as they wish. Some publish the details, like Project Magenta and Flight Deck Software, and also (via their SDK) Level-D. Others, like PMDG, prefer to keep them a secret.

If you are writing an application to interface to FSUIPC and you need offsets you apply to me for an allocation, stating the name of the project and the number of bytes needed. I record that and reserve them, making sure no one else is allocated the same ones.

Regards

Pete

Daveanne
01-02-2010, 01:36 PM
Peter, many thanks.

Did you have a nice Christmas and New year?

Best wishes

Daveanne

Peter Dowson
01-02-2010, 01:54 PM
Did you have a nice Christmas and New year?

Yes, thank you. At home this year, with the family descending upon us. We have three children and the four families take it in turns playing host! ;-)

Happy New Year to you.

Pete