Cockpitbuilders.com

FSUIPC (Peter Dawson) Unnoficial => FSUIPC V3.X (Fs2004) => Topic started by: Trevor Hale on August 31, 2009, 05:52:01 PM

Title: FSUIPC For Dummies
Post by: Trevor Hale on August 31, 2009, 05:52:01 PM
Guys,

I spent some time on the weekend with Peter Dawson's Manual, and a lot of trial and error.

I know most of you at one time went looking for this information, and sometimes are afraid of the direction the conversation can go.

Well here is the start of a Tutorial Thread that should help us all out.

Please if you are an expert in FSUIPC and Offsets, this thread is not needed for you, this is just so that maybe I can help some people not go through what I went through this weekend again.


I noticed that in PM systems there are so far two types of offsets being used. I am only 32 Buttons into this, so there may be more added here soon.

ie. Engine Start switch..

Offset X0000 Byte = 0 //--- Engine GND
Offset X0000 Byte = 1 //--- Engine off
Offset X0000 Byte = 2 //--- Engine CONT
Offset X0000 Byte = 3 //--- Engine AIR/FLT

Using Leo Bodnar's cards, or any joystick button input we program this like below.

FSUIPC Buttons/Switches menu
- Press the button
- select function Offset SET Byte
- Type in the 4 digit offset number
- Parim ON = X //-- X = 0,1,2,3 the function when the button is depressed
- select Function Offset SET Byte
- Type in the 4 digit offset number
- Parim OFF = X //-- X = 0,1,2,3 the function when the button is released

For instance on my Rotary switch I have the following when you turn it to the left for start.

- select function Offset SET Byte
- Parim ON = 0
- select Function Offset SET Byte
- Parim OFF = 1

Turnig to the right I have.
- select function Offset SET Byte
- Parim ON = 2
- select Function Offset SET Byte
- Parim OFF = 1

Very easy eh?

Ok well here is where I got confused..

the 737 has 4 landing light switches. The Light offset has several Bits assigned to it, for instance bit .4 is the far left switch, .3 is another switch .2 is another and so on.

This works similar to above except we are not assigning a value to the bit. we are only setting the bit or clearing it.

FSUIPC Buttons/Switches menu
- Press the button
- select function Offset SET bits
- Type in the 4 digit offset number
- Parim ON = the Bit number in HEXADECIMAL See Chart Below.

- select function Offset Clr bits
- Type in the 4 digit offset number
- Parim OFF = the Bit number in HEXADECIMAL See Chart Below.

if you set the Parim OFF to 00, it clears all bits, therefore turning one switch off, appears to turn all switches off belonging to that offset number.

Here is the best way to understand the bits/hex.

Binary Counts Like this. 0 1 2 4 8 16 32 64 128

Hex counts to 16 like this. 0 1 2 3 4 5 6 7 8 9 A B C D E F

Each Hex Number is made up of 4 Binary Numbers. The Below shows the Hex Value for Bit .4

Bit Numbers: 7 6 5 4 | 3 2 1 0
Binary 2 groups of 4: 8 4 2 1 | 8 4 2 1
HEX Value 1 0

for Bit .5 it would be

Bit Numbers: 7 6 5 4 | 3 2 1 0
Binary 2 groups of 4: 8 4 2 1 | 8 4 2 1
HEX Value 2 0

for Bit .0 it would be

Bit Numbers: 7 6 5 4 | 3 2 1 0
Binary 2 groups of 4: 8 4 2 1 | 8 4 2 1
HEX Value 0 1


I will add to this further, as I progress, but it really did take me an eternity to figure this information out.

I hope I haven't confused anyone, but please feel free to ask questions if you have any, and I will try to answer.

It did take considerable time to wrap my head around. For me what will be the next challenge is exceeding the bit .7 I would gather I will be adding another 2 hex digits to the string for bit .8, through .15. None the less, I also believe exceeding the 2 hex digits will be called an offset word or dword, I will experiment and report back here when I run into this.

I would like to keep this in the largest part laymen terms, I know people like Peter would think this thread is a waste of time, as he already has this information documented, but I personally had to understand it like I have it written here, maybe it's because I am not a university graduate.

Title: Re: FSUIPC For Dummies
Post by: ivar hestnes on September 13, 2009, 03:45:17 AM
Thank you very much for posting this tutorial Trevor. It is one of the hardest topics to understand regarding simulator-building, and this information is very helpful to all of us :)
Title: Re: FSUIPC For Dummies
Post by: warvet on September 13, 2009, 01:03:51 PM
 :huh: :huh: :huh: :huh: :o ::) ??? :P :-\ :fire: :eek:

HUH?

Tim
A340
Title: Re: FSUIPC For Dummies
Post by: Trevor Hale on September 13, 2009, 04:20:50 PM
LOL @ Tim..  I know the feeling :)
Title: Re: FSUIPC For Dummies
Post by: klm767 on October 21, 2009, 04:48:46 AM
Trevor,

Do you know if you need to input the buttons in FSUIPC before you cvan use them in WIDEFS. Ik have a bit of a problem with the buttonscreen in WIDEFS and WIN7
Title: Re: FSUIPC For Dummies
Post by: Trevor Hale on October 21, 2009, 05:19:40 AM
hmmm.. what are you actually trying to do..  are you going to transfer button presses through widefs?  seems like a hard way of doing it.  The only time I have ever used "Kepresses across WifeFS was so that I could make my Vatsim Microphone work from a button press on my yoke"

Perhaps if you let me know more about what you are trying to do, I could help more.

Trev
Title: Re: FSUIPC For Dummies
Post by: FLY737 on October 21, 2009, 06:05:26 AM
Does anyone know the PM offset for "autopilot disconnect" ?
Title: Re: FSUIPC For Dummies
Post by: Trevor Hale on October 21, 2009, 06:31:00 AM
Hey Rene,

I believe it is


x-50A MCP Commands (Read/Write)                      Bit 0 (TO/GA switch)
          Bit 1 (A/P disconnect)
          Bit 2 (A/T disconnect)

http://www.schiratti.com/docs/PMOffsets.html (http://www.schiratti.com/docs/PMOffsets.html)


         
Title: Re: FSUIPC For Dummies
Post by: jackpilot on October 21, 2009, 06:56:22 AM
very good subject Trev...go on
Should not be rocket science but has to be explained in very primitive terms that "people who know" have a hard time to use lol
You did a good job...please persue..
Title: Re: FSUIPC For Dummies
Post by: Trevor Hale on October 21, 2009, 07:00:33 AM
Thanks Jack..  I will add more as I continue with my overhead rewire..  Just working on connecting it again to the interface, then I will be rereading this thread to figure out where I left off.

Title: Re: FSUIPC For Dummies
Post by: Nick1150 on November 23, 2010, 02:16:41 AM
That's a great topic  :)

Thanks Trevor  :idiot:
Title: FSUIPC For Dummies
Post by: markuspilot on November 09, 2012, 11:42:43 AM
<confused>
Offset parameter for taxi, landing etc.
OK I got the offset + parameter for most of the stuff in the basic flight sim fs9 etc
using the offset byte and para value...

Got stuck on separating the light switches beacon, landing strobe taxi etc
0D0C  byte size is 2 with individual values for the separate lights

How do I input this offset as a byte or word, or ???
What goes into the parameter ?
The values listed in the FSUPIC as is 0 - 9 , or do I change these into binary or hex

</confused>

Mark
Title: Re: FSUIPC For Dummies
Post by: Trevor Hale on November 13, 2012, 03:27:24 AM
Quote from: markuspilot on November 09, 2012, 11:42:43 AM
Offset parameter for taxi, landing etc.
OK I got the offset + parameter for most of the stuff in the basic flight sim fs9 etc
using the offset byte and para value...

Got stuck on separating the light switches beacon, landing strobe taxi etc
0D0C  byte size is 2 with individual values for the separate lights

How do I input this offset as a byte or word, or ???
What goes into the parameter ?
The values listed in the FSUPIC as is 0 - 9 , or do I change these into binary or hex

Mark

Hi Mark,  I had to look at this again, because it is an old post and I haven't touched this in a while.. I am still building.  But I put this post here because of situations like this.

In FSUIPC Each Light switch has its own Bit (#'s 0 - 9)

From the FSUIPC SDK....

OFFSET: 0D0C

SIZE: 2

Lights, a switch for each one (bits from lo to hi):
0 Navigation
1 Beacon
2 Landing
3 Taxi
4 Strobes
5 Instruments
6 Recognition
7 Wing
8 Logo
9 Cabin

Bits go like this like in my example above.

7654 : 3210

So if we want the Taxi light on we "SET" 08 to a value of 1
or to turn it off we do a value of 0 to "CLEAR" 08

if you want the logo light on we "SET" 82 to a value of 1
or to turn it off we do a value of 0 to "CLEAR" 82

if you want the Recognition light on we "SET" 40 to a value of 1
or to turn it off we do a value of 0 to "CLEAR" 40

I hope that helps.

Trev
Title: Re: FSUIPC For Dummies
Post by: MLeavy737 on November 13, 2012, 01:18:02 PM
  Seeing this thread i couldnt be happier i dumped all of this offset business for Xplane and its SDK!

As you were :)

Mike L
Title: Re: FSUIPC For Dummies
Post by: jackpilot on November 14, 2012, 03:23:45 AM
Quote from: MLeavy737 on November 13, 2012, 01:18:02 PM
  Seeing this thread i couldnt be happier i dumped all of this offset business for Xplane and its SDK!
Mike L

chicken... :D
Title: Re: FSUIPC For Dummies
Post by: Trevor Hale on November 14, 2012, 03:28:43 AM
LOL.. 
Title: Re: FSUIPC For Dummies
Post by: MLeavy737 on November 14, 2012, 05:35:50 PM
Damn right! Lol.  Good luck to ya'll.

Mike L
Title: Re: FSUIPC For Dummies
Post by: Trevor Hale on February 20, 2017, 08:49:52 AM
Hi Guys.


Been a while since I added to this thread, but something I found today was worthy of addition.


Trying to trigger EGPWS test with button press I found the following.


BUTTON PRESS
Offset Byte Setbits
Offset= x564e Parameter = x40

BUTTON RELEASE
Offset Byte Clrbits
Offset= x564e Parameter = x40


Trev