xkoote Posted June 24, 2021 Report Posted June 24, 2021 Hello, I have dual Saitek throttle quadrants. (for a total of 6 toggle) switches. The 4 middle ones are used to control an aftermarket airplane's 4 mixture levers. By using the compound method, I thought it would be an idea to also use these same 4 toggle switches to control the respective magneto's. [Buttons.PMDG DC-6] 6=RC,0,C65607,0 -{ELEV_TRIM_DN}- 7=RC,1,C65615,0 -{ELEV_TRIM_UP}- 8=RB,4,C65607,0 -{ELEV_TRIM_DN}- 9=RB,5,C65615,0 -{ELEV_TRIM_UP}- 10=RB,6,C66278,0 -{RUDDER_TRIM_LEFT}- 11=RB,7,C66279,0 -{RUDDER_TRIM_RIGHT}- 18=PA,0,C66587,40202 -{ROTOR_BRAKE}- 22=PA,3,C66587,40301 -{ROTOR_BRAKE}- 24=PC,2,C66587,40002 -{ROTOR_BRAKE}- 25=PC,3,C66587,40001 -{ROTOR_BRAKE}- 26=PC,4,C66587,40102 -{ROTOR_BRAKE}- 27=PA,2,C66587,40302 -{ROTOR_BRAKE}- 28=PC,5,C66587,40101 -{ROTOR_BRAKE}- 29=PA,1,C66587,40201 -{ROTOR_BRAKE}- 30=PB,2,C66587,43401 -{ROTOR_BRAKE}- 31=PB,3,C66587,43601 -{ROTOR_BRAKE}- 32=PD,10,C66587,60101 -{ROTOR_BRAKE}- 33=PD,6,C66587,60201 -{ROTOR_BRAKE}- 34=PD,8,C66587,6001 -{ROTOR_BRAKE}- 38=UB,0,C66587,40401 -{ROTOR_BRAKE}- 39=PA,5,K87,10 -{Key press: ctl+W}- 40=CP(+JB,B1)JC,B2,C66587,5202 -{ROTOR_BRAKE}- 41=PB,1,C66587,5202 -{ROTOR_BRAKE}- Line 40 represents my effort. Pressing button 1 on the Saitek yoke, before pressing button 2 of the throttle quadrant, I want it be act out Rotor Brake 5202, which turns the magneto rotary selector counter-clock wise. However it does not work. So the next step was to make sure the rotor bake code works. Line 41 represents my effort to make sure Rotor Brake 5202 does indeed control the rotary switch as it should. It does. You notice the same Jostick B (Yoke) button 1 is set to control the rotor brake code. Any ideas why the code does not work?
Pete Dowson Posted June 24, 2021 Report Posted June 24, 2021 14 minutes ago, xkoote said: Any ideas why the code does not work? Yes. You have unwanted "J"s and "B"s in there: 40=CP(+JB,B1)JC,B2,C66587,5202 -{ROTOR_BRAKE}- The parameters just need the joystick number or letter and the button number -- as in the other lines, you'll see. The program knows which is which by their position. So: 40=CP(+B,1)C,2,C66587,5202 -{ROTOR_BRAKE}- Pete
xkoote Posted June 24, 2021 Author Report Posted June 24, 2021 Cool Pete. I took the example too literally ;-). Cheers !
Pete Dowson Posted June 24, 2021 Report Posted June 24, 2021 (edited) Note that you have an unconditional assignment to the same button:So when B 1 is pressed button C2 will give two actions. You may want to put the opposite condition on this assignment: 24=CP,2,C66587,40002 -{ROTOR_BRAKE}- So when B 1 is pressed button C 2 will give two actions. You may want to put the opposite condition on this assignment: 24=CP(-B,1)C,2,C66587,40002 -{ROTOR_BRAKE}- Pete Edited June 24, 2021 by John Dowson extra comma removed
John Dowson Posted June 24, 2021 Report Posted June 24, 2021 41 minutes ago, xkoote said: Pressing button 1 on the Saitek yoke, before pressing button 2 of the throttle quadrant As well as what Pete has said, depending upon how your button 1 functions (i.e. if its an always on button or not), then your button 1 may not be read as pressed when pressing button 2 (as you are doing this before you pressing button 2). If this is the case, you can use the button flag functionality to toggle a flag when you press button 1, then check the flag status when pressing button 2. This is also explained in the Advanced user Guide, P20.
xkoote Posted June 24, 2021 Author Report Posted June 24, 2021 Indeed, just came back from testing, and it is now dual function. I will try what Pete said. Else I'll see if flags are worth it. Thanks a lot to both.
xkoote Posted June 24, 2021 Author Report Posted June 24, 2021 1 hour ago, Pete Dowson said: Note that you have an unconditional assignment to the same button:So when B 1 is pressed button C2 will give two actions. You may want to put the opposite condition on this assognment: 24=CP,2,C66587,40002 -{ROTOR_BRAKE}- So when B 1 is pressed button C 2 will give two actions. You may want to put the opposite condition on this assignment: 24=CP(-B,1)C,2,C66587,40002 -{ROTOR_BRAKE}- Pete Unfortunately adding this line to my .ini file creates an error. (24=CP(-B,1),C,2,C66587,40002 << ERROR 19! Line ignored >>). I'll have a look at the flagging options.
John Dowson Posted June 24, 2021 Report Posted June 24, 2021 9 minutes ago, xkoote said: 24=CP(-B,1),C,2,C66587,40002 You have an additional comma after the condition, should be: 24=CP(-B,1)C,2,C66587,40002 Pete accidentally added that - I will correct his post...
xkoote Posted June 24, 2021 Author Report Posted June 24, 2021 Solved !!! You guys rock. Thanks a million .... [Buttons.PMDG DC-6] 1=CP(-B,1)A,0,C66587,40202 -{ROTOR_BRAKE}- 2=CP(-B,1)A,1,C66587,40201 -{ROTOR_BRAKE}- 3=CP(-B,1)A,2,C66587,40302 -{ROTOR_BRAKE}- 4=CP(-B,1)A,3,C66587,40301 -{ROTOR_BRAKE}- 5=PA,5,K87,10 -{Key press: ctl+W}- 6=UB,0,C66587,40401 -{ROTOR_BRAKE}- 7=PB,2,C66587,43401 -{ROTOR_BRAKE}- 8=PB,3,C66587,43601 -{ROTOR_BRAKE}- 9=RB,6,C66278,0 -{RUDDER_TRIM_LEFT}- 10=RB,7,C66279,0 -{RUDDER_TRIM_RIGHT}- 11=RC,0,C65607,0 -{ELEV_TRIM_DN}- 12=RC,1,C65615,0 -{ELEV_TRIM_UP}- 13=CP(-B,1)C,2,C66587,40002 -{ROTOR_BRAKE}- 14=CP(-B,1)C,3,C66587,40001 -{ROTOR_BRAKE}- 15=CP(-B,1)C,4,C66587,40102 -{ROTOR_BRAKE}- 16=CP(-B,1)C,5,C66587,40101 -{ROTOR_BRAKE}- 17=PD,10,C66587,60101 -{ROTOR_BRAKE}- 18=PD,6,C66587,60201 -{ROTOR_BRAKE}- 19=PD,8,C66587,6001 -{ROTOR_BRAKE}- 20=CP(+B,1)C,2,C66587,5202 -{ROTOR_BRAKE}- 21=CP(+B,1)C,3,C66587,5201 -{ROTOR_BRAKE}- 22=CP(+B,1)C,4,C66587,5302 -{ROTOR_BRAKE}- 23=CP(+B,1)C,5,C66587,5301 -{ROTOR_BRAKE}- 24=CP(+B,1)A,0,C66587,5402 -{ROTOR_BRAKE}- 25=CP(+B,1)A,1,C66587,5401 -{ROTOR_BRAKE}- 26=CP(+B,1)A,2,C66587,5502 -{ROTOR_BRAKE}- 27=CP(+B,1)A,3,C66587,5501 -{ROTOR_BRAKE}-
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