Results 1 to 6 of 6
-
01-07-2013, 03:29 PM #1
- Join Date
- Oct 2012
- Location
- London ON, CA
- Posts
- 106
SIOC script for MainPanel DU Selector help..?
ok, so if someone can help me i came up with something like that and... it does NOTHING !
PHP Code:Var 0001 Link IOCARD_SW DEVICE 4 Input 1 Type I
{
v0007 = CHANGEBIT 0 v0001
}
Var 0002 Link IOCARD_SW DEVICE 4 Input 2 Type I
{
v0007 = CHANGEBIT 1 v0002
}
Var 0003 Link IOCARD_SW DEVICE 4 Input 3 Type I
{
v0007 = CHANGEBIT 2 v0003
}
Var 0004 Link IOCARD_SW DEVICE 4 Input 7 Type I
{
v0007 = CHANGEBIT 3 v0004
}
Var 0005 Link IOCARD_SW DEVICE 4 Input 4 Type I
{
v0007 = CHANGEBIT 4 v0005
}
Var 0007, Link FSUIPC_OUT, Offset $654C, Length 2 // $654C - MainPanelDUSel
This script is meant to change MainPanelDu on PMDG737NGX in FSX
I kinda based it on EFIS script that I have similar things are written for APP/VOR/MAP/PLN selector and it does work
Offset taken from offset document in FSUIPC documents for PMDG737NGX
then I changed the code somewhat after reading NICO KAAN website and based the script no landing light switch... still nothing.
FROM EFIS SCRIPT
PHP Code:Var 0119, name APP_E, Link IOCARD_SW, Device 1, Input 9, Type I
{
V0094 = CHANGEBIT 0 ,&APP_E // toggle APP
}
Var 0120, name VOR_E, Link IOCARD_SW, Device 1, Input 10, Type I
{
V0094 = CHANGEBIT 1 ,&VOR_E // toggle VOR
}
PHP Code:Var 1 Link IOCARD_SW Input 50 Type I
{
v2 = CHANGEBIT 2 v1
}
Var 2 Link FSUIPC_OUT Offset $0D0C Length 2
Andy
-
01-07-2013, 04:29 PM #2
- Join Date
- Jun 2012
- Location
- New Orleans, LA
- Posts
- 130
Re: SIOC script for MainPanel DU Selector help..?
I believe the offsets from the FSUIPC document are read-only offsets.
You need to have SIOC send the buttons as virtual buttons to FSUIPC, then set the control code in FSUIPC to activate the switch in FSX.
Shaun
-
01-07-2013, 04:37 PM #3
- Join Date
- Jun 2012
- Location
- New Orleans, LA
- Posts
- 130
Re: SIOC script for MainPanel DU Selector help..?
Something like this:
Code:Var 1 Link IOCARD_SW device 1 Input 55 Type I { &FO_JoyStick64 = CHANGEBIT 0 v1 // toggle button 0 of joystick 64 } Var 3 Link IOCARD_SW device 1 Input 56 Type I { &FO_JoyStick64 = CHANGEBIT 1 v3 // toggle button 1 of joystick 64 } Var 4 Link IOCARD_SW device 1 Input 57 Type I { &FO_JoyStick64 = CHANGEBIT 2 v4 // toggle button 2 of joystick 64 } Var 5 Link IOCARD_SW device 1 Input 58 Type I { &FO_JoyStick64 = CHANGEBIT 3 v5 // toggle button 3 of joystick 64 } Var 6 Link IOCARD_SW device 1 Input 59 Type I { &FO_JoyStick64 = CHANGEBIT 4 v6 // toggle button 4 of joystick 64 Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
Button 0 – Custom Control 69967 – Parameter 0
Button 1 – Custom Control 69967 – Parameter 1
Button 2 – Custom Control 69967 – Parameter 2
Button 3 – Custom Control 69967 – Parameter 3
Button 4 – Custom Control 69967 – Parameter 4
-
01-07-2013, 04:40 PM #4
- Join Date
- Jun 2012
- Location
- New Orleans, LA
- Posts
- 130
Re: SIOC script for MainPanel DU Selector help..?
arg, why won't it just post my code as I paste it.
EDIT: Finally, there we go. Just change the device/input numbers for your switches.
While you might be able to do it all via SIOC, I find using virtual joystick buttons a *lot* simpler to setup.
Really, though. For switches like this you might wanna just get a joystick controller and skip SIOC completely. Just use FSUIPC and NGX control codes.
-
01-07-2013, 06:47 PM #5
- Join Date
- Oct 2012
- Location
- London ON, CA
- Posts
- 106
Re: SIOC script for MainPanel DU Selector help..?
OK thanks I will try see what happens
Andy
-
01-07-2013, 08:13 PM #6
- Join Date
- Oct 2012
- Location
- London ON, CA
- Posts
- 106
Re: SIOC script for MainPanel DU Selector help..?
You are a Genius !!!
It works !
Few questions
well just ONE really after reading some more stuff
- FO_JoyStick64 is this just a name you made up? could it be CP_JoyStick1 or whatever else I am guessing ## 64 might have some significance...? maybe...?
Ok i red a bit could it be any number from 64 to 73... or does FSUIPC just assign it a number based of "NAME" "Variable" that we declared in this case "FO_JoyStick64" but we could have said "john" and FSUIPC would just say #64 then we added "mike" and since FSUIPC already sees there is "john" so FSUIPC gives "mike" #65
Sorry to bug you just trying to kinda understand the philosophy behind it.
- Custom Control 69967 where did this number come from...? Again red some more 69632+335 (from you site as well custom controls for PMDG) so next switch i use for LowerDU Captain side will be 69632+336=69668 (just happens to be next in sequence)
#define EVT_DSP_CPT_BELOW_GS_INHIBIT_SWITCH (THIRD_PARTY_EVENT_ID_MIN + 327) // CAPT Side BELOW GS INHIBIT Pushbutton
#define EVT_DSP_CPT_MAIN_DU_SELECTOR (THIRD_PARTY_EVENT_ID_MIN + 335) // CAPT side MAIN PANEL DISPLAY UNITS (MAIN PANEL DUs) Selector
#define EVT_DSP_CPT_LOWER_DU_SELECTOR (THIRD_PARTY_EVENT_ID_MIN + 336) // CAPT side LOWER DISPLAY UNIT (LOWER DU) Selector
- Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4 I did get this one reading some docs on you site so i kinda understand it. So it will be same offset for all that i program as joystick buttons.
Really, though. For switches like this you might wanna just get a joystick controller and skip SIOC completely. Just use FSUIPC and NGX control codes.
Thanks for your help, I will try to expand the code to other switches add the lower DU selector see what happens.. if anything lol,
Andy
Pretty Womans in your city
Find Sexy Womans from your city...