Jump to content

Oakes SIOC Export/Import Scripts


Recommended Posts

Posted

assuming you didn't add tipying error, there is one explanation :

 

[1052] = {TwoPositionSwitch, 7, 2, -1,1},

 

should be

[1052] = {TwoPositionSwitch, 7, 2, -1.1},

 

point "." is not coma ","

  • Replies 125
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Feecback of my tests

 

in ExportSupport.lua

 

function SimpleRotary(pValue, pDevice, pNumber)

GetDevice(pDevice):performClickableAction(pNumber + 3000,(pValue -2/10)

end

 

 

in SSI :

 

 

Var 1080, name rethud_LNK // rotacteur type HUD reticule

 

Var 1085, name hudnuit, Link IOCARD_SW, Input 266 // switch HUD nuit

{

IF &hudnuit = 1

{

&rethud_LNK = 6

}

IF &hudnuit = 0

{

IF &huddeg = 0

{

&rethud_LNK = 1

}

}

}

 

Var 1086, name huddeg, Link IOCARD_SW, Input 267 // rotacteur HUD mode rose

{

IF &huddeg = 1

{

&rethud_LNK = 12

}

IF &huddeg = 0

{

IF &hudnuit = 0

{

&rethud_LNK = 1

}

}

}

 

result : ( ‎I make test with SSI and IPconsole I change value of variable 1080 )

 

1/

 

[1080] = {TwoPositionSwitch, 7, 2, -1, 1}, -- reticule HUD

 

with that : I have 2 positions of rotactor HUD :

 

0 => night

1 => normal

 

and after if I put in IPconsole 2 or more I return to Night

 

2/

 

[1080] = {SimpleRotary, 4, 2},

 

with that :

 

at 0 rotactor UD is on Normal and if I put in IPconsole 1 to 12 by step 1 I go to STBY By step

 

but never under Normal ,

 

if I put negative number the ordre not passed

 

After I have test with :

 

[1080] = {TwoPositionSwitch, 7, -1, 0.2}, -- reticule HUD

[1080] = {TwoPositionSwitch, 7, 0.2}, -- reticule HUD

but no order passed

Posted

I have a Pb if I put 2 here (pValue -2/10)

 

function SimpleRotary(pValue, pDevice, pNumber)

GetDevice(pDevice):performClickableAction(pNumber + 3000,(pValue -2/10)

end

 

the other rotactor are bad

Posted
I have a Pb if I put 2 here (pValue -2/10)

 

function SimpleRotary(pValue, pDevice, pNumber)

GetDevice(pDevice):performClickableAction(pNumber + 3000,(pValue -2/10)

end

 

the other rotactor are bad

 

There is a missing ) in this line:

GetDevice(pDevice):performClickableAction(pNumber + 3000,(pValue -2/10)
The correct code is probably:

function SimpleRotary(pValue, pDevice, pNumber)

GetDevice(pDevice):performClickableAction(pNumber + 3000,(pValue -2)/10)

end

Posted

I have look but I have the good syntax 3000,(pValue -2)/10)

just an error typo in the post .. sorry

 

but I have always the Pb if I put that I have rotactor decrease of 1 click

Posted (edited)

Hi mate

 

Should be:

GetDevice(pDevice):performClickableAction(pNumber + 3000,[color=Red]pValue - 2[/color]) 

not:

GetDevice(pDevice):performClickableAction(pNumber + 3000,([color=Red]pValue -2/10[/color])

i.e. don't divide by 10.

 

Secondly, please note that I made a new function called SimpleRotaryTest (if you just change the SimpleRotary function you will affect every other switch in the cockpit as well, so don't do that)

 

Thirdly, make sure that variable 1080 (or 1070) only has the values 1,2 and 3 depending on the switch position(your code seems to have 1, 6 and 12 for some reason in it -> &rethud_LNK = 6 ?).

 

And finally, sometimes you use 1070, sometimes 1052 and sometimes 1080 as the variable name, I'm confused, are we still talking about the initial problem with the HUD Mode rotary or are you having other problems?

 

 

/Oakes

Edited by Oakes
Spelling
Posted

Thank you for your patience, I was very vague and I apologize for it

 

Has to look for the error which I had made " I walked round "

It works good now, ;-)

 

I had from the beginning to forget a comma at the end of line in siocConfig.lua

Still thank you

Posted

Np mate, but I'm still confused :)

 

Did my new function (SimpleRotaryTest) solve the problem?

 

or was it all just a missing comma i.e. the old SimpleRotary function was ok for this switch?

 

/Oakes

  • 4 months later...
Posted

I have the solution for use a Gray Encoder direct to Master Card for control Abris cursor.

 

In ExportSupport:

 

-- Calls non-clickable commands without parameters for two-position switch

function TwoPositionSwitch_NCC_noparam(pValue, pDevice, pCommandNumber)

GetDevice(pDevice):SetCommand(pCommandNumber, pValue)

end

 

In SiocConfig:

 

[1] = {TwoPositionSwitch_NCC_noparam, 9, 501}, -- Incrementar Abris

[2] = {TwoPositionSwitch_NCC_noparam, 9, 502}, -- Decrecer Abris

 

SIOC Code:

Var 0400, name CRSdcho Link IOCARD_ENCODER, Input 9, Aceleration 1, Type 2 // CRS Derecho

{

IF &CRSdcho > 0

{

&ABRIS_DEC = 1

&ABRIS_DEC = 0

}

ELSE

{

IF &CRSdcho < 0

{

&ABRIS_INC = 1

&ABRIS_INC = 0

}

}

}

 

Var 1, name ABRIS_INC, Link IOCP, Offset 501, Value 0 // Abris Increase

Var 2, name ABRIS_DEC, Link IOCP, Offset 502, Value 0 // Abris Decrease

 

 

Thanks to Oakes and others in this forum for posting all their progress always.

  • 4 weeks later...
Posted (edited)
I have modified ExportSuport.lua to include potentiometer support, this work fine for the 3 potentiometer of the Shkval and the pot of the Abris brightness. To make this work, only add this following code to the bottom of ExportSuport.lua:

function SimplePotentiometer(pValue, pDevice, pNumber)
   GetDevice(pDevice):performClickableAction(pNumber + 3000,(pValue /256))
end

Exemple: to control the brightness of the HMS, add this code to siocConfig.lua

 

Does this work with Grey Encoders too?

I need to use this for Shkval TV-Brightness/Contrast and HMS Brightness.

I tried arround but dont get it running.

 

SiocConfig.lua:

-- Shkval
[600] = {SimplePotentiometer, 8, 3, 0.05},--Shkval Contrast

doesn´t work...

 

Maybe somebody can give me an example plz?

 

Regards,

Terrorvogel

Edited by Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Posted
Does this work with Grey Encoders too?

I need to use this for Shkval TV-Brightness/Contrast and HMS Brightness.

I tried arround but dont get it running.

 

The SimplePotentiometer code is expecting a value between 0 and 255 to work correctly. This is the default value from a potentiometer connected directly to a OC card. You could maybe use a grey encoder if the SIOC variable is changing between 0 and 255 with the encoder's rotation.

Posted

I set in Sioc:

 

3960818767a5f3cbdfc56c9db13a6bcd.jpg

 

Is that what you mean? Unfortunately it doesnt work. The problem is, that i already have built in and wired all of my encoders. It will be horrible to unwire and change them all to potentiometers...

 

I have nearly no skill in programming so i really need help with all of this sioc stuff.

 

Regards,

Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Posted
Is that what you mean? Unfortunately it doesnt work. The problem is, that i already have built in and wired all of my encoders. It will be horrible to unwire and change them all to potentiometers...

 

Use this tutorial to interface those encoder: http://www.lekseecon.nl/howto.html#rotaryencode

Change 359 by 256 and replace "var 2" by the value used for SimplePotentiometer.

Posted

Thank you m0jo for that link!

 

I tried but due to lack of knowledge i don´t get it working.

I have some further questions which are not answered on the link:

 

1. What do i have to put into siocCOnfig.lua?

Can i let this inside as before:

-- Shkval
[600] = {SimplePotentiometer, 8, 3, 0.05},--Shkval Contrast

Or must it been deleted or replaced by something other?

 

2. I have put this code into my blackshark.ssi:

Var 0600, name contrast, Link IOCARD_ANALOGIC, Input 61, PosL 0, PosC 127, PosR 255     // Shkval_Contras
Var 1 Link IOCARD_ENCODER Input 61 Aceleration 2 Type 2
{
   L0 = v1 // * -1 turning clockwise should be plus
   v2 = ROTATE 0 359 L0
}

Var 2 // heading (0 .. 359)

My input of the encoder was adapted but something is still wrong here.

This is what it looks like in Sioc.exe now:

352cbacff313b12cf20f4dd8dfb527b0.jpg

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Posted
Thank you m0jo for that link!

 

I tried but due to lack of knowledge i don´t get it working.

I have some further questions which are not answered on the link:

 

1. What do i have to put into siocCOnfig.lua?

Can i let this inside as before:

-- Shkval
[600] = {SimplePotentiometer, 8, 3, 0.05},--Shkval Contrast

Or must it been deleted or replaced by something other?

 

2. I have put this code into my blackshark.ssi:

Var 0600, name contrast, Link IOCARD_ANALOGIC, Input 61, PosL 0, PosC 127, PosR 255     // Shkval_Contras
Var 1 Link IOCARD_ENCODER Input 61 Aceleration 2 Type 2
{
   L0 = v1 // * -1 turning clockwise should be plus
   v2 = ROTATE 0 359 L0
}

Var 2 // heading (0 .. 359)

 

siocconfig.lua :

[600] = {SimplePotentiometer, 8, 3},--IT-23 display contrast

In blackshark.ssi:

Var 900 Link IOCARD_ENCODER Input 61 Aceleration 2 Type 2
{
   L0 = v900 // * -1 turning clockwise should be plus
   v600 = ROTATE 0 256 L0
}

Var 600 // False Potentiometer

  • Like 1
Posted

I inserted your code, saved and reloaded Sioc but my encoder at input 61 moves no bit in BlackShark. I checked that input again with controlador.exe for beeing sure it´s the right one.

 

With my first try, which was totally wrong, as i used the encoder as a TwoPositionSwitch, i get at least a reaction in Shkval.

Something´s still wrong here i believe...:dunno:

 

73201f270000c95c397f17bf03c372df.jpg

 

66ca2d20405b798d5a575a210b717bea.jpg

 

Thx man for your patience with me...

 

Regards,

Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Posted (edited)

Meanwhile I have some other "little" questions:

 

1. Where in mainpanel_init.lua can i find the lamps for the Autopilot Panel?

Searched several times but didn´t find something like "Bank Hold" or "Pitch Hold" etc.

 

2. How can i assign a simply button in Sioc for ejection release? Find no command in clickabledata.lua to shoot me out of my pit.

 

3. I like to let light up a lamp, when masterarm is active. What code is exactly needed for? The same should work for green "Gun"-light too, when active...

 

blackshark.ssi:

Var 0501, name MasterArm, Link IOCARD_SW, Input 6
Var 0463, name Master_Arm, Link IOCARD_OUT, Output 25     // lamp_Master_Arm

4. I have lamps behind my 6 switches in UV26 but i don´t know how to permanently light them up in Sioc because they are more better readable then.

 

6dd5f28e045d114ee2f93e1313b38612.jpg

 

blackshark.ssi:

Var 0816, name UV26_ret1, Link IOCARD_OUT, Device 1, Output 50     // UV26 Permanent Background Lighting SEQ

Var 0817, name UV26_ret2, Link IOCARD_OUT, Device 1, Output 49     // UV26 Permanent Background Lighting INT

Var 0818, name UV26_ret3, Link IOCARD_OUT, Device 1, Output 45     // UV26 Permanent Background Lighting SAL

Var 0819, name UV26_ret4, Link IOCARD_OUT, Device 1, Output 46     // UV26 Permanent Background Lighting RES PROG

Var 0820, name UV26_ret5, Link IOCARD_OUT, Device 1, Output 47     // UV26 Permanent Background Lighting STOP

Var 0821, name UV26_ret6, Link IOCARD_OUT, Device 1, Output 48     // UV26 Permanent Background Lighting START

But what do i need for this "unlinked" lights in siocconfig.lua?

Is this right?

http://img1.bildupload.com/b153bbaa5bf5387d26023f460738d949.jpg

If not, whats the code in which file?

 

I hope someone can give me answers to my noobish questions...

 

Regards,

Terrorvogel

Edited by Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Posted

@m0jo

 

The encoder works now!

Youre settings were absolutly right. The problem was solved after reboot of my rig. Seems that the USB-Expansion Card crashed.

 

Big Thx for your help man!:thumbup:

 

Regards,

Terrorvogel

 

 

P.S.

Maybe you can help me with my other questions too?:yes:

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Posted

Hello.

 

Sorry guys, I need some help with Oakes files.

 

I´m going to try to use this cards with A-10C and the question is about Export.lua file and , I don´t know certanly, ExportSupport. lua file

 

What are the right steps to use this files with A-10C? Any change? What I need to change in this files to use it?

 

I think I known how to use the offset definitions as far as I´m using this cards with Falcon.

 

You need to understand I don´t speak english and I´m not a programmer....only a simple user...:thumbup:

 

Regards

  • 8 months later...
Posted (edited)

Hi guys

 

Can't get indicators working. Missing something vital (wify been telling me this from start...) but I fail to find what´s needed.

 

As far I understand, I need to check the status of the each indicator and parse it (somehow) into SIOC through Oakes script but I can't find what I'm doing wrong (or not at all) ;-)

 

Made a temporary setup to verify and hooked up the Fuel quad and Caution/Warning quad (only leftside connected yet). All switches works connected to the SIM but I'm stuck regarding these outputs'

 

Anyone that can have a quick peek and see what I missed ?

 

Thanks in advance

 

In *.ssi:

 

// *****************************************************************************

// * Config_SIOC ver 4.01 - By Manuel Velez - www.opencockpits.com

// *****************************************************************************

// * FileName : hogbox_ssi_20120114.txt

// * Date : 2012-01-14

 

Var 0011, name FU_BO_WING_R, Link IOCARD_SW, Input 11 // FUEL_BOOST-PUMPS-WING-R

Var 0010, name FU_BO_WING_L, Link IOCARD_SW, Input 10 // FUEL_BOOST-PUMPS-WING-L

Var 0012, name FU_BO_MAIN_L, Link IOCARD_SW, Input 12 // FUEL_BOOST_PUMPS_MAIN_L

Var 0013, name FU_BO_MAIN_R, Link IOCARD_SW, Input 13 // FUEL_BOOST_PUMP_MAIN_R

Var 0014, name FU_EXTTKS_WNG, Link IOCARD_SW, Input 6 // FUEL_EXTTKS_WNG

Var 0015, name FU_EXTTKS_FUS, Link IOCARD_SW, Input 7 // FUEL_EXTTKS_FUS

Var 0016, name FU_TAKGTE_OP, Link IOCARD_SW, Input 8 // FUEL_TANKGATE_OPEN

Var 0017, name FU_CRSFD_ON, Link IOCARD_SW, Input 9 // FUEL_CROSSFEED_ON

Var 0018, name FU_SIGAMPL_N, Link IOCARD_SW, Input 14 // FUEL_SIGAMPL_NORM

Var 0019, name FU_LINECHK, Link IOCARD_SW, Input 15 // FUEL_LINE_CHECK

Var 0020, name FU_LWNG_DIS, Link IOCARD_SW, Input 16 // FUEL_LEFT_WINGTANK_FILL_DISABLE

Var 0021, name FU_RWNG_DIS, Link IOCARD_SW, Input 17 // FUEL_RIGHT_WINGTANK_FILL_DISABLE

Var 0022, name FU_LMAIN_DIS, Link IOCARD_SW, Input 18 // FUEL_LEFT_MAINTANK_FILL_DISABLE

Var 0023, name FU_RMAIN_DIS, Link IOCARD_SW, Input 19 // FUEL_RIGHT_MAINTANK_FILL_DISABLE

Var 0024, name FU_RCVR_CL, Link IOCARD_SW, Input 20 // FUEL_RCVR_CLOSE

Var 0025, name FU_RCVR_OP, Link IOCARD_SW, Input 21 // FUEL_RCVR_OPEN

Var 0100, name WR_L_WNG_PMP, Link IOCARD_OUT, Output 11 // WRNG_LEFT_ENGINE_BOOST_PUMP

Var 0101, name WR_ENG_STRT_C, Link IOCARD_OUT, Output 12 // WRNG_ENG_START_CYCLE

Var 0102, name WR_L_MAIN_LO, Link IOCARD_OUT, Output 13 // WRNG_LEFT_MAIN_FUEL_LOW

Var 0103, name WR_ANTISKID, Link IOCARD_OUT, Output 14 // WRNG_ANTISKID

Var 0104, name WR_L_FUEL_PR, Link IOCARD_OUT, Output 15 // WRNG_LEFT_FUEL_PRESS

Var 0105, name WR_ELEV_DISENG, Link IOCARD_OUT, Output 16 // WRNG_ELEVATOR_DISANGAGE

Var 0106 name WR_L_CONV, Link IOCARD_OUT, Output 17 // WRNG_L_CONV

Var 0107 name WR_AIL_DISENG, Link IOCARD_OUT, Output 18 // WRNG_AILDISENG

Var 0108 name WR_L_GEN, Link IOCARD_OUT, Output 19 // WRNG_L_GEN

Var 0109 name WR_PITCH_SAS, Link IOCARD_OUT, Output 20 // WRNG_PITCH_SAS

Var 0110 name WR_YAW_SAS, Link IOCARD_OUT, Output 22 // WRNG_YAW_SAS

Var 0111 name WR_GCAS, Link IOCARD_OUT, Output 24 // WRNG_GCAS

Var 0112 name WR_LASTE, Link IOCARD_OUT, Output 26 // WRNG_LASTE

Var 0113 name WR_IFF_MODE4, Link IOCARD_OUT, Output 28 // WRNG_IFF_MODE_4

Var 0114 name WR_AUTOPILOT, Link IOCARD_OUT, Output 30 // WRNG_AUTOPILOT

Var 0115 name WR_STALL_SYS, Link IOCARD_OUT, Output 32 // WRNG_STALL_SYS

Var 0116 name WR_APU_GEN, Link IOCARD_OUT, Output 34 // WRNG_APU_GEN

Var 0117 name WR_L_HYD_PRESS, Link IOCARD_OUT, Output 36 // WRNG_L_HYD_PRESS

Var 0118 name WR_L_HYD_RES, Link IOCARD_OUT, Output 38 // WRNG_L_HYD_RES

Var 0119 name WR_L_BLANK1, Link IOCARD_OUT, Output 40 // WRNG_BLANK1

Var 0120 name WR_L_AIL_TAB, Link IOCARD_OUT, Output 42 // WRNG_L_AIL_TAB

Var 0121 name WR_L_ENG_HOT, Link IOCARD_OUT, Output 44 // WRNG_L_ENG_HOT

Var 0122 name WR_LENGOIL_PR, Link IOCARD_OUT, Output 46 // WRNG_L_ENG_OIL_PR

Var 0123 name WR_LENG_PUMP, Link IOCARD_OUT, Output 48 // WRNG_L_ENG_PUMP

 

 

 

in siocconfig.lua:

 

 

 

..

warningindicators = {

[100] = {0,509}, -- WR_L_WNG_PMP 11

[101] = {0,480}, -- WR_ENG_STRT_C

[102] = {0,513}, -- WR_L_MAIN_LO

[103] = {0,484}, -- WR_ANTISKID

[104] = {0,517}, -- WR_L_FUEL_PR

[105] = {0,488}, -- WR_ELEV_DISENG

[106] = {0,521}, -- WR_L_CONV

[107] = {0,492}, -- WR_AIL_DISENG

[108] = {0,496}, -- WR_L_GEN

[109] = {0,500}, -- WR_PITCH_SAS

[110] = {0,504}, -- WR_YAW_SAS

[111] = {0,508}, -- WR_GCAS

[112] = {0,512}, -- WR_LASTE

[113] = {0,507}, -- WR_IFF_MODE4

[114] = {0,520}, -- WR_AUTOPILOT

[115] = {0,524}, -- WR_STALL_SYS

[116] = {0,481}, -- WR_APU_GEN

[117] = {0,485}, -- WR_L_HYD_PRESS

[118] = {0,489}, -- WR_L_HYD_RES

[119] = {0,493}, -- WR_L_BLANK1

[120] = {0,497}, -- WR_L_AIL_TAB

[121] = {0,501}, -- WR_L_ENG_HOT

[122] = {0,525}, -- WR_LENGOIL_PR

[123] = {0,525}, -- WR_LENG_PUMP

}

-- Add the indicatortables to the main indicatortable

-- gIndicatorTables = {dataLinkIndicators, weaponsInterfaceIndicators, weaponsStationIndicators}

gIndicatorTables = {warningindicators}

 

 

 

inputsTable = {

[10] = {TwoPositionSwitch, 36, 5, 1}, -- PTR-FSCP-BOOST-PUMPS-WING-L

[11] = {TwoPositionSwitch, 36, 6, 1}, -- PTR-FSCP-BOOST-PUMPS-WING-R

[12] = {TwoPositionSwitch, 36, 7, 1}, -- PTR-FSCP-BOOST-PUMPS-MAIN-L

[13] = {TwoPositionSwitch, 36, 8, 1}, -- PTR-FSCP-BOOST-PUMPS-MAIN-R

[14] = {TwoPositionSwitch, 36, 1, 1}, -- PTR-FSCP-EXT-TANKS-WING

[15] = {TwoPositionSwitch, 36, 2, 1}, -- PTR-FSCP-EXT-TANKS-FUS

[16] = {TwoPositionSwitch, 36, 3, 1}, -- PTR-FSCP-TK-GATE

[17] = {TwoPositionSwitch, 36, 4, 1}, -- PTR-FSCP-CROSS-FEED

[18] = {TwoPositionSwitch, 36, 9, 1}, -- PTR-FSCP-SIG-AMPL

[19] = {TwoPositionSwitch, 36, 10, 1}, -- PTR-FSCP-LINE-CHECK

[20] = {TwoPositionSwitch, 36, 12, 1}, -- PTR-FSCP-FILLDISABLE-WING-L

[21] = {TwoPositionSwitch, 36, 13, 1}, -- PTR-FSCP-FILLDISABLE-WING-R

[22] = {TwoPositionSwitch, 36, 14, 1}, -- PTR-FSCP-FILLDISABLE-MAIN-L

[23] = {TwoPositionSwitch, 36, 15, 1}, -- PTR-FSCP-FILLDISABLE-MAIN-R

[24] = {TwoPositionSwitch, 36, 16, 0}, -- PTR-FSCP-RCVR-LEVER CLOSED

[25] = {TwoPositionSwitch, 36, 16, 1}, -- PTR-FSCP-RCVR-LEVER OPEN

 

..

 

 

Referens: mainpanel_init.lua (extract).

 

 

 

..

function caution_lamp(arg,flag)

local caution_lamp_ = CreateGauge()

caution_lamp_.arg_number = arg

caution_lamp_.input = {0, 1}

caution_lamp_.output = {0, 1}

caution_lamp_.params = {flag}

caution_lamp_.controller = controllers.lamp_SystemsSignal

end

 

caution_lamp(404,SystemsSignals.flag_MASTER_WARNING_STUB) -- MASTER WARNING

caution_lamp(480,SystemsSignals.flag_ENG_START_CYCLE) -- CAUTION LIGHT PANEL

caution_lamp(481,SystemsSignals.flag_L_HYD_PRESS) -- CAUTION LIGHT PANEL

caution_lamp(482,SystemsSignals.flag_R_HYD_PRESS) -- CAUTION LIGHT PANEL

caution_lamp(483,SystemsSignals.flag_GUN_UNSAFE) -- CAUTION LIGHT PANEL

caution_lamp(484,SystemsSignals.flag_ANTISKID) -- CAUTION LIGHT PANEL

caution_lamp(485,SystemsSignals.flag_L_HYD_RES) -- CAUTION LIGHT PANEL

caution_lamp(486,SystemsSignals.flag_R_HYD_RES) -- CAUTION LIGHT PANEL

caution_lamp(487,SystemsSignals.flag_OXY_LOW) -- CAUTION LIGHT PANEL

caution_lamp(488,SystemsSignals.flag_ELEV_DISENG) -- CAUTION LIGHT PANEL

caution_lamp(489,SystemsSignals.flag_VOID1) -- CAUTION LIGHT PANEL

caution_lamp(490,SystemsSignals.flag_SEAT_NOT_ARMED) -- CAUTION LIGHT PANEL

caution_lamp(491,SystemsSignals.flag_BLEED_AIR_LEAK) -- CAUTION LIGHT PANEL

caution_lamp(492,SystemsSignals.flag_AIL_DISENG) -- CAUTION LIGHT PANEL

caution_lamp(493,SystemsSignals.flag_L_AIL_TAB) -- CAUTION LIGHT PANEL

caution_lamp(494,SystemsSignals.flag_R_AIL_TAB) -- CAUTION LIGHT PANEL

caution_lamp(495,SystemsSignals.flag_SERVICE_AIR_HOT) -- CAUTION LIGHT PANEL

caution_lamp(496,SystemsSignals.flag_PITCH_SAS) -- CAUTION LIGHT PANEL

caution_lamp(497,SystemsSignals.flag_L_ENG_HOT) -- CAUTION LIGHT PANEL

caution_lamp(498,SystemsSignals.flag_R_ENG_HOT) -- CAUTION LIGHT PANEL

caution_lamp(499,SystemsSignals.flag_WINDSHIELD_HOT) -- CAUTION LIGHT PANEL

caution_lamp(500,SystemsSignals.flag_YAW_SAS) -- CAUTION LIGHT PANEL

caution_lamp(501,SystemsSignals.flag_L_ENG_OIL_PRESS) -- CAUTION LIGHT PANEL

caution_lamp(502,SystemsSignals.flag_R_ENG_OIL_PRESS) -- CAUTION LIGHT PANEL

caution_lamp(503,SystemsSignals.flag_CICU) -- CAUTION LIGHT PANEL

caution_lamp(504,SystemsSignals.flag_GCAS) -- CAUTION LIGHT PANEL

caution_lamp(505,SystemsSignals.flag_L_MAIN_PUMP) -- CAUTION LIGHT PANEL

caution_lamp(506,SystemsSignals.flag_R_MAIN_PUMP) -- CAUTION LIGHT PANEL

caution_lamp(507,SystemsSignals.flag_VOID2) -- CAUTION LIGHT PANEL

caution_lamp(508,SystemsSignals.flag_LASTE) -- CAUTION LIGHT PANEL

caution_lamp(509,SystemsSignals.flag_L_WING_PUMP) -- CAUTION LIGHT PANEL

caution_lamp(510,SystemsSignals.flag_R_WING_PUMP) -- CAUTION LIGHT PANEL

caution_lamp(511,SystemsSignals.flag_HARS) -- CAUTION LIGHT PANEL

caution_lamp(512,SystemsSignals.flag_IFF_MODE_4) -- CAUTION LIGHT PANEL

caution_lamp(513,SystemsSignals.flag_L_MAIN_FUEL_LOW) -- CAUTION LIGHT PANEL

caution_lamp(514,SystemsSignals.flag_R_MAIN_FUEL_LOW) -- CAUTION LIGHT PANEL

caution_lamp(515,SystemsSignals.flag_L_R_TKS_UNEQUAL) -- CAUTION LIGHT PANEL

caution_lamp(516,SystemsSignals.flag_EAC) -- CAUTION LIGHT PANEL

caution_lamp(517,SystemsSignals.flag_L_FUEL_PRESS) -- CAUTION LIGHT PANEL

caution_lamp(518,SystemsSignals.flag_R_FUEL_PRESS) -- CAUTION LIGHT PANEL

caution_lamp(519,SystemsSignals.flag_NAV) -- CAUTION LIGHT PANEL

caution_lamp(520,SystemsSignals.flag_STALL_SYS) -- CAUTION LIGHT PANEL

caution_lamp(521,SystemsSignals.flag_L_CONV) -- CAUTION LIGHT PANEL

caution_lamp(522,SystemsSignals.flag_R_CONV) -- CAUTION LIGHT PANEL

caution_lamp(523,SystemsSignals.flag_CADC) -- CAUTION LIGHT PANEL

caution_lamp(524,SystemsSignals.flag_APU_GEN) -- CAUTION LIGHT PANEL

caution_lamp(525,SystemsSignals.flag_L_GEN) -- CAUTION LIGHT PANEL

caution_lamp(526,SystemsSignals.flag_R_GEN) -- CAUTION LIGHT PANEL

caution_lamp(527,SystemsSignals.flag_INST_INV) -- CAUTION LIGHT PANEL

..

 

 

Cheers

Gus

 

 

edit. LED's / Mastercard outputs ports been verifed with "controllador"

Edited by Duckling

- - - -

Posted

I compared your lines to my own and I noticed two little differences on every line:

 

Your: Var 0111 name WR_GCAS, Link IOCARD_OUT, Output 24 // WRNG_GCAS

Mine: Var 111, name NSAFE_LDGEAR, Link IOCARD_OUT, Output 11

 

A leading zero (note there isn't one in your siocconfig.lua - nor mine) and a missing comma, that is. Please note that I don't really know whether or not these things matter, though.

 

I hope this was helpful.

  • Like 1
Posted (edited)

Hi Superbus and thanks for checking.

Verifed the missing comma "," and it's there in my *ssi file, must been some odd thing when I pasted the info into the thread above.

 

SIOC seems to add the leading "0" when importing a file or when entering a Val by the GUI. (wrote a cople of lines as a textfile with only "11" as Val, imported it to SIOC (Val 11 stated as "11" in SIOC) but when exporting the text the Val shows up with with leading "0"s up till 4 digit wide.

 

Just in case I edited siocConfig with a leading 0 to get it identical as in the file. but still no reaction. (returned to my old files now)

 

Also tried to include my "out" values into the existing table "dataLinkIndicators" and activated the "gIndicatorTables = {dataLinkIndicators, weaponsInterfaceIndicators, weaponsStationIndicators}" just in case my table "warningIndicators" been misspelled or not valid, but still nothing

 

As a status check, On a running SIOC and DCS-10C (SIOC has it as an active agent connected) from IOCPConsole" manually setting the Val's to "On", the LED on the warning panel light up. IOCP Log shows all switches working but nothing recieved for the warningpanel outputs (besides when activating'em manually via IOCP Console)

 

I'll probably missed to edit a vital part of scriptfiles but can't find where and what

Oakes Export.lua in line 103-124 looks like this: Tried with activating the "iowrite..'s statemends and the "flush.." but no change

 

 

function LuaExportBeforeNextFrame()

-- Works just before every simulation frame.

-- Check for data/string from the SIOC server on the socket

local inpst = c:receive()

if inpst then

-- io.write("---Log: Packet on Socket-----", "\n")

-- io.write(inpst.."\n")'

 

--Parse the string and call the appropriate functions for each SIOC parameter

--The table inputsTable contains the appropriate function for each SICO parameter

--(ex inputsTable[501][1]() equals the function TwoPositionSwitch() -- see inputsTable.lua)

-- + parameters (ex inputsTable[501][2] = the device ID = 12 ) for the same function.

--The functions + descriptions can be found in ExportSupport.lua

for lSIOC_Param, lSIOCValue in SIOC_Parse(inpst) do

if inputsTable[lSIOC_Param] ~= nil then

inputsTable[lSIOC_Param][1](lSIOCValue, inputsTable[lSIOC_Param][2],inputsTable[lSIOC_Param][3],inputsTable[lSIOC_Param][4],inputsTable[lSIOC_Param][5],

inputsTable[lSIOC_Param][6],inputsTable[lSIOC_Param][7],inputsTable[lSIOC_Param][8],inputsTable[lSIOC_Param][9])

end

end

-- io.flush()

end

end

 

 

 

I attach my subset of files if a err might be within there somewere

Eternaly greatful if someone with understanding about these scriptfiles could peek through'em. As probably known by now, I'm stumbling in the dark here, hehe

 

 

cheers

Gus

Export.lua

ExportSupport.lua

siocConfig.lua

hogbox_ssi.txt

Edited by Duckling

- - - -

Posted (edited)

Try moving this line:

 

gIndicatorTables = {warningIndicators} --added 2012-01-14

 

after this this one:

 

dofile ("./Config/Export/SIOCConfig/siocConfig.lua")

 

"warningIndicators" table is defined in siocConfig. Therefore I think the table is empty when the first line of code is executed. That would explain why your switches do work but your indicators don't.

 

I hope this was helpful. I struggled 6 months with the code part only, before my A-10C cockpit started working, because the information is spread like precisious breadcrumbs all over various posts over a long period of time. (And I still can't get 3 position switches to work correctly...) strike last sentence - I solved the problem!



 

Edited by LeLv30_Superbus
My 3-pos switches are working now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...