Steku Posted October 12, 2004 Report Posted October 12, 2004 I'm trying to control buttons on my audio panel using offset x3122. Which command should I use to set individual bits (for example 2^7 to switch on COM1 transmit) without changing state of other bits? I have following fields on FSUIPC keys page: Control set when keys pressed: ??? Offset: x??? Parameter: x??? I'm trying to use Offset Byte Setbits but don't know how to force this command to set only those bits I need for example: only 2^7 (for COM1 tramsit) or simultaneously 2^6 and 2^4 (for COM1 and NAV1 at one keystroke) Could you advise me what should I insert in these fields. Could you explain the difference and parameter syntax in following offsets: Offset Byte Setbits Offset Byte Set Offset Byte Clrbits Offset Byte Togglebits And one more question: Is there an offset available to switch DME between NAV1 and NAV2?
Pete Dowson Posted October 12, 2004 Report Posted October 12, 2004 I'm trying to control buttons on my audio panel using offset x3122.Which command should I use to set individual bits (for example 2^7 to switch on COM1 transmit) without changing state of other bits? You do realise there is a specific FS control for this, and all the bits in that word -- even, I think, assignable in FS's own assignments? Afterr all, they are standard functions available on the FS radio stack. The switches in the FSUIPC offsets are really aimed at application programs. The COM1 TX control is COM1 Transmit Select. I'm trying to use Offset Byte Setbits but don't know how to force this command to set only those bits I need for example:only 2^7 (for COM1 tramsit) or simultaneously 2^6 and 2^4 (for COM1 and NAV1 at one keystroke) Could you advise me what should I insert in these fields. The control you already know, you have stated it. SetNits and ClearBits do just only change the bits in the parameter you give. The offset you also know. And you know the bits: 2^7 which is x80 or decimal 128 -- 2^7 means "2 to the power 7" or 2x2x2x2x2x2x2 = 128, hex 80. Similarly 2^6 is x 40 (or 64) and 2^4 is x10 (16). Together these would be x50 (64+16=80). It's really all just simple arithmetic! Could you explain the difference and parameter syntax in following offsets:Offset Byte Setbits Offset Byte Set Offset Byte Clrbits Offset Byte Togglebits There's no parameter "syntax" as such, it is just a number. For the "bits" controls it tells FSUIPC which bits to change. With a straight Set the whole value, not selected bits, is involved. And one more question: Is there an offset available to switch DME between NAV1 and NAV2? No, that's always been a mouse-only operation, unfortunately. Regards, Pete
Steku Posted October 12, 2004 Author Report Posted October 12, 2004 I'm trying to control buttons on my audio panel using offset x3122.Which command should I use to set individual bits (for example 2^7 to switch on COM1 transmit) without changing state of other bits? You do realise there is a specific FS control for this, and all the bits in that word -- even, I think, assignable in FS's own assignments? Of course I know this. I only used this as an example. But thank you for hint. If I can keep something simple I should do this that way. And one more question: Is there an offset available to switch DME between NAV1 and NAV2? No, that's always been a mouse-only operation, unfortunately. Fortunately I'm flying Dreamfleet Cessna 177 Cardinal where using Config-o-Matic I can define Crtl-Shift-key shortcut to do this. I though that by FSUIPC there is a possibility to control DME assignment in every plane. As for Setbits, Clrbits etc. I now understand how they work. Setbits is setting bit to 1 if 1 is on this position in binary value of parameter. Clrbits is setting bit to 0 if 1 is on this position in binary value of parameter. Togglebits is changing bit value from 0 to 1 or from 1 to 0 if 1 is on this position in binary value of parameter. Set is writing parameter value directly. Thank you for your explanation. I was testing this before but I did something wrong and ended confused a little. After your explanation and my more careful testing I can now use those functions properly. Thank you :)
Pete Dowson Posted October 12, 2004 Report Posted October 12, 2004 I though that by FSUIPC there is a possibility to control DME assignment in every plane. Ah, yes, sorry, I think was getting mixed up with the VOR/ADF selection on the RMI. Things got a bit weird around here earlier today and messages have been lost all over the show, so I was getting a bit rushed and apprehensive. Let me see ... There are FS controls. Have you tried the Toggle DME control? There are some other DME controls too -- DME, DME1 Toggle and DME2 toggle. Not sure what they all do. Have you tried any of them? I don't know if they are also assignable in FS's own assignments. There's also an offset (0378) but I don't know if that works -- it used to in FS98 and FS2000 but it looks like no one's ever tried it in FS2002 or FS2004. As for Setbits, Clrbits etc. I now understand how they work. Yes. Sorry if this wasn't clear from the documentation. It is sometimes hard to know how to pitch things, especially those things really intended for more advanced users. Regards, Pete
andy5saltos Posted May 30, 2013 Report Posted May 30, 2013 Hi, I'm beginner in programming FSUIPC and would like to help me configure the B737 fuel pumps in FSUIPC. Currently Use PM System. The offset PM Pump Systems are: 56AF .0 ValveComp 56AF .1 Fwd1PumpOn //crj 56AF .2 Fwd2PumpOn 56B0 .0 Fwd1PumpFault 56B0 .1 Fwd2PumpFault 56B0 .2 Aft1PumpFault 56B0 .3 Aft2PumpFault 56B0 .4 Ctr1PumpFault 56B0 .5 Ctr2PumpFault 56B0 .6 Stab1PumpFault 56B0 .7 Stab2PumpFault 56B0 1 PumpSel1 56B1 .0 Fwd1Pump 56B1 .1 Fwd2Pump 56B1 .2 Aft1Pump 56B1 .3 Aft2Pump 56B1 .4 Ctr1Pump 56B1 .5 Ctr2Pump 56B1 .6 Stab1Pump 56B1 .7 Stab2Pump 56B1 1 PumpSel2 I've tried different ways but so far none gave me the expected result.I hope to help and if it can be graphic, the better. Sorry for my English, I'm using Google translator. Thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now