Results 1 to 5 of 5
Thread: SIOC Help Needed
-
05-02-2011, 05:15 PM #1
- Join Date
- Feb 2011
- Location
- UK
- Posts
- 17
SIOC Help Needed
I am trying to program my landing gear lever in sioc using the following but it doesn't seem to be working
Code:Var 1, name gear_control, Link FSUIPC_OUT, Offset $0BE8, Length 4 Var 2, Link IOCARD_SW, Device 3, Input 20, Type P { &gear_control = 0 } Var 3, Link IOCARD_SW, Device 3, Input 21, Type P { &gear_control = 16383 }
Can any sioc experts help?
-
05-03-2011, 02:01 AM #2
Re: SIOC Help Needed
Hi,
In your script each time the push button changes value (0->1 and 1-> 0) the "gear_control = .. " statement is executed.
However, that should only happen when the button is pushed.
Try this:
Code:Var 1, name gear_control, Link FSUIPC_OUT, Offset $0BE8, Length 4 Var 2, Link IOCARD_SW, Device 3, Input 20, Type P { IF v2 = 1 { &gear_control = 0 } } Var 3, Link IOCARD_SW, Device 3, Input 21, Type P { IF v3 = 1 { &gear_control = 16383 } }
Nico Kaan
-
Post Thanks / Like - 1 Thanks, 0 Likes, 0 Dislikes
PaulD thanked for this post
-
05-03-2011, 12:30 PM #3
- Join Date
- Feb 2011
- Location
- UK
- Posts
- 17
Re: SIOC Help Needed
Hi Nico,
Thanks for the reply, I have tried your suggestion but unfortunately it still isn't working. A bit of experimentation has shown that If I change the Var 1 statement to make it light an led instead of writing to the FSUIPC offset it works so the code is executing - there is obviously something going wrong in the process of writing to FSUIPC, just not sure what!
Paul
-
05-03-2011, 02:29 PM #4
- Join Date
- Feb 2011
- Location
- UK
- Posts
- 17
Re: SIOC Help Needed
Further update: I have tried changing the code to write to a different offset (used the one to pause/un-pause the sim) and this worked so it seems that my code is working OK but the offset I am writing to is not working as expected. I am writing to offset 0BE8 which is listed as Gear control 0=Up, 16383=Down - I would have expected this to raise / lower the gear but it doesn't seem to be doing anything. (I am using the default 737-800 for testing).
-
05-03-2011, 02:58 PM #5
- Join Date
- Feb 2011
- Location
- UK
- Posts
- 17
Re: SIOC Help Needed
Problem solved!! I have used offset 3110 (send controls) instead of 0BE8, using this to send the values 66080 (gear down) and 66079 (gear up) has everything working as expected!