Jump to content
The simFlight Network Forums
gr8guitar

rotary switches and FSUIPC

Recommended Posts

Okay, lol. I was trying. Thanks :).

Alright back to the rotary switches/buttons. Here is what I came up for using 2 rotary switches and 2 pushbuttons: With this scheme, 1 rotary switch selects a value, the other inc/dec as needed. 1 pb to select airspeed bugs and the other for dimmers. The below is for 2 airspeed bugs and 2 panel dimmers:

116=P2,2,Cx610066C0,x00090001 ;6100 -=>DECREMENT 66C0,MAX=9,STEP=1

117=P2,3,Cx510066C0,x00090001 ;5100 -=>INCREMENT

118=B66C0=1 P2,32,C1003,3841 ;SET EADI FLAG

119=B66C0=1 P2,32,C1004,4353 ;CLR ASB1 FLAG

120=B66C0=1 P2,32,C1004,3842 ;CLR EHSI FLAG

121=B66C0=1 P2,32,C1004,4354 ;CLR ASB2 FLAG

122=CP(F+15,1)2,0,CM56:1,0 ;CHK 15,1 SET,ON PRESS OF 2,0 THEN RUN CM56:1(EADI DEC)

123=CP(F+15,1)2,1,CM56:2,0 ;CHK 15,1 SET,ON PRESS OF 2,1 THEN RUN CM56:2(EADI INC)

124=B66C0=1 P2,38,C1004,3841 ;CLR EADI FLAG

125=B66C0=1 P2,38,C1003,4353 ;SET ASB1 FLAG

126=B66C0=1 P2,38,C1004,3842 ;CLR EHSI FLAG

127=B66C0=1 P2,38,C1004,4354 ;CLR ASB2 FLAG

128=CP(F+17,1)2,0,CM49:1,0 ;CHK 17,1 SET,ON PRESS OF 2,0 THEN RUN CM49:1(ASB1 DEC)

129=CP(F+17,1)2,1,CM49:2,0 ;CHK 17,1 SET,ON PRESS OF 2,1 THEN RUN CM49:2(ASB1 INC)

130=B66C0=2 P2,32,C1003,3842 ;SET EHSI FLAG

131=B66C0=2 P2,32,C1004,4354 ;CLR ASB2 FLAG

132=B66C0=2 P2,32,C1004,3841 ;CLR EADI FLAG

133=B66C0=2 P2,32,C1004,4353 ;CLR ASB1 FLAG

134=CP(F+15,2)2,0,CM56:3,0 ;CHK 15,2 SET,ON PRESS OF 2,0 THEN RUN CM56:1(EHSI DEC)

135=CP(F+15,2)2,1,CM56:4,0 ;CHK 15,2 SET,ON PRESS OF 2,1 THEN RUN CM56:2(EHSI INC)

136=B66C0=2 P2,38,C1004,3842 ;CLR EHSI FLAG

137=B66C0=2 P2,38,C1003,4354 ;SET ASB2 FLAG

138=B66C0=2 P2,38,C1004,3841 ;CLR EADI FLAG

139=B66C0=2 P2,38,C1004,4353 ;CLR ASB1 FLAG

140=CP(F+17,2)2,0,CM50:1,0 ;CHK 17,2 SET,ON PRESS OF 2,0 THEN RUN CM50:1(ASB2 DEC)

141=CP(F+17,2)2,1,CM50:2,0 ;CHK 17,2 SET,ON PRESS OF 2,1 THEN RUN CM50:2(ASB2 INC)

I realize there are a lot of remarks but it's to help me keep it straight. I believe it's fairly clean code (with what I know). As I add airspeed bugs (ASB3-5) and more dimmers (EICAS-U&L), I believe all I'll need to do is take care of the flags, pb's and respective macros. This was a test-run and it ran great for me. And one doesn't affect the other but I do have to hit one of the pb's to make active. I really like being able to use 66C0 (etc.) and the flags(256*x+y). That was thinking way ahead for FSUIPC and am in great appreciation for it. Thanks Mr. Dowson for FSUIPC!

Share this post


Link to post
Share on other sites

Hello again, I do have another question. Here is the setup. When I first started using FSUIPC I must admit in my anxiousness and not understanding much of the setup process, for mouse macros I would basically make and name the mouse macros the same as the button assignment (for 767PIC) so I have a lot of macros nearly for each button action. I aw the message that I could keep the same but I didn't really get it at that time. When I went to program the B732ADV, I realize I didn't need to do that. I made one macro name and then proceeded to assign the buttons. Well... I am thinking about going back through the 767PIC macros and making it so I just have one macro name. I came across something that has me confused, below is a macro, "10= ..." in particular:

[Macros]

Module="B767Woh.GAU"

1=767PIC_RWY=RX10a0*X5500

2=767PIC-TURNOFF=RX10de*X5500

3=767PIC_POSITION=RX116b*X5500

4=767PIC_RED=RX1186*X5500

5=767PIC_WHT=RX11a1*X5500

6=767PIC_W-=RX11bc*X5500

7=767PIC_LT_S=RX111c*X5500

8=767PIC_LANDING=RX11fc*X5500

Module1="B767Wpedestal.GAU"

9=767PIC_FIRE_TEST=R1:X2b80*Xa190

10=767PIC_PARK_BRK=R1:1

Module2="767FMC.GAU"

11=767PIC_INIT/REF=R2:X26270*Xa190

The parking brake with the R1:1 (especially the last "1") has me confused. I saw on page 41 the mouse flags but I did not see the # "1", what does it mean and does it know the info like RXaaaa*Xbbbb? Also I wanted to read True Airspeed (x02b8 - i think). I got it read but it I see that it needs to be divided by 128, is there way way to do that automatically (by programming it)?

Share this post


Link to post
Share on other sites

The parking brake with the R1:1 (especially the last "1") has me confused. I saw on page 41 the mouse flags but I did not see the # "1", what does it mean

It isn't a parameter -- if there was a parameter needed it woud follow a "," (comma) -- default mouse flag is 29 (left click). The "1" rather than an Xoffset value simply means it uses the mouse rectangle table and not an address from within it.

and does it know the info like RXaaaa*Xbbbb?

It doesn't need it in that case. Why? Is there a problem?

Also I wanted to read True Airspeed (x02b8 - i think). I got it read but it I see that it needs to be divided by 128, is there way way to do that automatically (by programming it)?

What programming are you doing to read it in the first place? Whatever language you are using should be able to divide by 128. I've not seen a useful language that cannot do arrithmetic.

Regards

Pete

Share this post


Link to post
Share on other sites

1) there isn't a problem, just curious. 2) I was using the logging part of FSUIPC, at looking that the offset that represents True Airspeed (TAS). Here's why: In the piston aircraft, there is a bug that allows a person to find TAS based on setting the outside air temp (in C) against the pressure altitude. Well, i can'r really read the dial independent of screen resolution as I was adjusting so I wanted a verification by seeing the logging info. I'm not using a separate program.

Share this post


Link to post
Share on other sites
Well, i can'r really read the dial independent of screen resolution as I was adjusting so I wanted a verification by seeing the logging info. I'm not using a separate program.

In that case, the only ways would be to use something like FSInterrogate (part of the FSUIPC SDK) to display things, or write a short Lua plug-in to read the offset, do the computation, and either display it or write it back to a different (user) offset for monitoring on screen.

Regards

Pete

Share this post


Link to post
Share on other sites

Hello Mr. Dowson, earlier you mentioned that if I write a lua for mouse movements that I would share it. I haven't really delved into that yet. But using Autohotkey, I've been happy with using a very simple code. Note that one of the function keys (F9-F12), in this case, needs to be activated first:

f9:: pix = 1

f10:: pix = 5

f11:: pix = 40

f12:: pix = 100

;using 2 rotary switches each with pushbutton (1st: buttons 1,2,5 and 2nd: 3,4,6)

;=x,y,s,r: X(positive >),Y(positive v),Speed (0=fastest,100=slowest),Offset/relative if = "r"

1joy1:: mousemove, -pix,0,0,r ;left

1joy2:: mousemove, pix,0,0,r ;right

1joy3:: mousemove, 0,pix,0,r ;down

1joy4:: mousemove 0,-pix,0,r ;up

1joy5:: MouseClick, left

1joy6:: MouseClick, right

return

... back to flying.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.