View Full Version : Calling a FSUIPC MACRO from SIOC
STF-DIR
02-11-2010, 05:39 PM
Hello,
im new in SIOC and have a question.
In the FSUIPC SDK exists a Macro File for the PMDG Overhead called "737 OHD.MCRO".
Inside this File we have a lot of Macros defined for the Overhead, e.g.:
[Macros]
Module="PMDG_737NG_Overhead.gau"
1=Batt=RX3170*X8b90
2=CabUtil=RX3210*X8b90
3=IFE/PassSt=RX3260*X8b90
4=Gen1off=RX32b0*X8b90
.
.
Ok, now i want to call a Macro, lets say the Batt Switch from SIOC.
How can i do this ?
Var 0001, name S_BAT1, Link IOCARD_SW, Device 0, Input 1, Type I // Batarie Schalter
{
if &S_BAT1 = 0
{
Macro aufrufen ( 1=Batt=RX3170*X8b90 )
}
}
Please help
Matthias
deering
02-11-2010, 08:30 PM
Matthias,
FSUIPC provides some "Virtual joysticks" at offset $3340. TOGGLE one of those buttons in SIOC and, in FSUIPC, associate that button push with the macro.
Jim
indeed, like this:
Var 1, name S_BAT1, Link IOCARD_SW, Device 0, Input 1, Type I // Batarie Schalter
{
if &S_BAT1 = 0
{
&FO_JoyStick64 = CHANGEBIT 0 v1 // toggle bit 0 of joystick 64
}
}
Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
// and then go to FSUIPC, select Buttons+Switches tab, press Batterie Schalter,
// and select for Joystick 64, Button 0 the FS control, macro 737 OHD
MrAmsterdam
07-14-2010, 11:59 AM
Hi guys.
This works perfectly. but how do i enter the code to use more than one joystick button?
I tried a lot of options but i cannot seem to figure it out...:-(
Hope you guys can help me out here...
Well, for the next button (1) at Joystick 64, you code:
Var 1, name S_BAT1, Link IOCARD_SW, Device 0, Input 1, Type I // Batarie Schalter
{
if &S_BAT1 = 0
{
&FO_JoyStick64 = CHANGEBIT 1 v1 // toggle bit 1 of joystick 64
}
}
Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
and so on, 32 buttons for a Joystick.
At offset $3344 length 4 you find the next joystick (65) with another 32 buttons
Nico Kaan
MrAmsterdam
07-14-2010, 01:40 PM
Well, for the next button (1) at Joystick 64, you code:
Var 1, name S_BAT1, Link IOCARD_SW, Device 0, Input 1, Type I // Batarie Schalter
{
if &S_BAT1 = 0
{
&FO_JoyStick64 = CHANGEBIT 1 v1 // toggle bit 1 of joystick 64
}
}
Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
and so on, 32 buttons for a Joystick.
At offset $3344 length 4 you find the next joystick (65) with another 32 buttons
Nico Kaan
Hi Nico,
Thanks for the reply. i just cannot get it to work.
i have one button working with the code that i took off your website.
Now i made the code that works bold. i tried several solutions including the one below.. i know its wrong.. but could you help me out with the code for 2 buttons... i had it in the past but i cant seem to remember it anymore.
Could you let me know how i can code 2 buttons... maybe you can make an example so that i can add a few more myself?
thanks!
Var 1 Link IOCARD_SW Input 16 Type I
{
&FO_JoyStick64 = CHANGEBIT 0 v1 // toggle bit 0 of joystick 64
}
Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
Var 3, name S_BAT1, Link IOCARD_SW, Device 0, Input 22, Type I // Batarie Schalter
{
&FO_JoyStick64 = CHANGEBIT 1 v1 // toggle bit 1 of joystick 64
}
Hi,
You made a mistake in var 3, you have to use v3 there, not v1 ...
Var 1 Link IOCARD_SW Input 16 Type I
{
&FO_JoyStick64 = CHANGEBIT 0 v1 // toggle bit 0 of joystick 64
}
Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
Var 3, name S_BAT1, Link IOCARD_SW, Device 0, Input 22, Type I // Batarie Schalter
{
&FO_JoyStick64 = CHANGEBIT 1 v3 // toggle bit 1 of joystick 64
}