Jump to content

Oakes SIOC Export/Import Scripts


Recommended Posts

Posted (edited)

Hi Terrorvogel. In current config without a physical switck connected on var 9601 there will be no trigger, oc cards/sioc reacts only on port state change.

Workaround is to grab that state from dcs. Got several values parsed fron mainpanel.lua into sioc vars for futher handling but havent touched the oxy panel yet. I test and see if I can get it working.

Cant't tell fore sure without checking but gut feeling is that the flow indicator gauge is a "flip/flopp" visual indicator on the oxy panel. In otherwords setting it to "on" will indicate the white area and off, the black causing the relay to constat turn on and off in sequence. Is that what you need ?

( could becwrong here and the "on" just starts the "breathing" on/off sequence)

 

Hopefully have a few hours tomorrow evening to test

Edit: disregard bad spelling above ;-)

Cheers

Gus

Edited by Duckling

- - - -

  • Replies 125
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Good morning Duckling. I´m very happy that you take a look at this one too!:)

Consider that there is absolutely no hurry.

 

If you mean that black/white indicator, that is moving when "oxy switch" is "on", i don´t know if it is the right indicator to use then? The breathing machine should of course not fluctuate if the "oxy switch" is set to "on" rather running further, till switched "off" again or getting damaged otherwise somehow in battle.

Best would be some kind of Sioc-checking routine (if this is possible somehow at all), if that "flip/flop indicator" ist "lighting" in some defined time or not and then to use that variable to feed the USB-Outputscard.

 

Would be really nice if you could find a solution for this!:)

 

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)

Hi Terrorvogel

I failed to export the oxypanel supply switch position (Device ID 40, button 1, 603) "SupplyOn".

 

I'm off for several weeks but will be back to this when possible. I need the same type of function on some other panels

 

You currently need a physical two pos switch to set the oxy Supply to On, for moving the data into SIOC.

 

As far I can tell, it wount interfare with HELIOS setting, setting Physical switch to On will be reflected into Helios but not the other way around.

Toggle the physical OXY switch again will set the Cockpit info to the desire state with the 'bad' to have to cycle the position to update the value if it's already in the desired position due to Helios update.

 

There's also a 'Failure = OXYGEN_FAILURE_TOTAL' info from OXY system that could save the day but no idea how to access that if possible.

 

In the real craft, not sure either how and if the OXY system works at all without power from the bus that powers the diluter system.

Oxy kicks in somewhere around 10k if I recall correct and OXY mixture is dependent on air pressure/flightlevel from there upwards

 

For a simple circuit/config, assuming you got your warningquad OXY_LOW Warning indicator already under "my indicators"/gIndicatorTables within siocConfig.lua

say as

[1035] = {0,487}, -- flag_OXY_LOW 1035 is SIOC Var named OXY_LOW for mainpanel.lua Arg 487

 

Below are some info that might be usefull meanwhile (i sincerily hope I got everything correct in all places ; -) .

It's DCS:A10C export of the OXY Volume, OXY Pressure and 'Breathflow' gauge into SIOC VARs

The last is the black&white flip/flopp indicator, nice but not suitable to drive you airpump. I'll incuded it if you like it for other handling. It cycle the SIOC VAR between 0 & 1

Connect your pump to Var 9605, name Oxy_Power, Link IOCARD_OUT, device 3, Output 0 // Opencockpits-USB-Outputscard Power-Relay (12V-to-220V) ON/OFF

 

 

(Make a backup copy of your files just in case before starting but I suspect you had a bad impact earlier)

 

--> EDIT: theres some spaces added into the text when pasted into the "spoils" sections below. They needs to be deleted to get it working) <---

 

Examples SIOC VARs can by used to as part of building some logic to controll the output port for the relay to the breathing machine.

 

 

Var 8000, name OxygenVol // Value in SIOC 0-500 (Oxy tank is 5 liter but can't say if the emergency bottle is handled within DCS)

Var 8001, name OxyPress // Value 0-1000 ( when going sub 0.5 PSI the OXY LOW caution light will popup)

Var 8002, name BreathFlow // Value 0 & 1 (depending on breathing out or in)

 

 

 

 

In ExportSupport.lua. paste the following:

 

 

 

------------------------------------BreathFlowMeter--------------------------------------------------

function BreathFlowMeter(pBreathFlowMeterSIOCParam)

-- Get the device

local lMainPanel = GetDevice(0)

--Check to see that the device is valid otherwise we return an empty string

if type(lMainPanel) ~= "table" then

return ""

end

lMainPanel:update_arguments()

 

local lBreathFlowMeter = lMainPanel:get_argument_value(600) --

--logfile:write(lVariometer)

--logfile:write("\n")

 

local lSIOC_SendString = pBreathFlowMeterSIOCParam.."="..round(lBreathFlowMeter)..":"

 

return lSIOC_SendString

end

 

------------------------------------OxygenVolume--------------------------------------------------

function OxygenVolume(pOxygenVolumeSIOCParam)

-- Get the device

local lMainPanel = GetDevice(0)

--Check to see that the device is valid otherwise we return an empty string

if type(lMainPanel) ~= "table" then

return ""

end

lMainPanel:update_arguments()

 

local lOxygenVolume = lMainPanel:get_argument_value(274)* 1000 -- vy.arg_number=274 (s. mainpanel_init.lua)

--logfile:write(lVariometer)

--logfile:write("\n")

 

local lSIOC_SendString = pOxygenVolumeSIOCParam.."="..round(lOxygenVolume)..":"

 

return lSIOC_SendString

end

 

------------------------------------OxygenPress--------------------------------------------------

function OxygenPress(pOxygenPressSIOCParam)

-- Get the device

local lMainPanel = GetDevice(0)

--Check to see that the device is valid otherwise we return an empty string

if type(lMainPanel) ~= "table" then

return ""

end

lMainPanel:update_arguments()

 

local lOxygenPress = lMainPanel:get_argument_value(604)* 1000 -- vy.arg_number=604 (s. mainpanel_init.lua)

--logfile:write(lVariometer)

--logfile:write("\n")

 

local lSIOC_SendString = pOxygenPressSIOCParam.."="..round(lOxygenPress)..":"

 

return lSIOC_SendString

end

 

 

 

 

In SiocExport.lua

Under function LuaExportAfterNextFrame()

local lSIOC_SendString = ""

Paste the following

 

 

lSIOC_SendString = lSIOC_SendString..BreathFlowMeter(gBreathFlowMeterSIOCParam)

lSIOC_SendString = lSIOC_SendString..OxygenVolume(gOxygenVolumeSIOCParam)

lSIOC_SendString = lSIOC_SendString..OxygenPress(gOxygenPressSIOCParam)

 

 

 

and under function LuaExportStop()

paste the following:

 

 

lSIOC_SendString = lSIOC_SendString..ResetSIOCvar(gBreathFlowMeterSIOCParam)

lSIOC_SendString = lSIOC_SendString..ResetSIOCvar(gOxygenVolumeSIOCParam)

lSIOC_SendString = lSIOC_SendString..ResetSIOCvar(gOxygenPressSIOCParam)

 

 

 

In siocConfig.lua

paste the following above your "inputstable":

 

 

gOxygenVolumeSIOCParam = 8000 -- 274

gOxygenPressSIOCParam = 8001 -- 604

gBreathFlowMeterSIOCParam = 8002 -- 600

 

 

 

In your SIOC .ssi file add/edit VAR:

 

 

 

VAR 1035, name OXY_LOW // Warning indicator OXY_LOW Dev 0 Arg 487

Var 8000, name OxygenVol // VAR for Oxygen Volume 274 Env panel

Var 8001, name OxyPress // VAR for Oxygen Press 604 OXY panel

Var 8002, name BreathFlow // VAR for Oxygen Press 600

{

IF &BreathFlow = 1

{

OXY_Sys_FL_IND = 1

}

IF &BreathFlow = 0

{

OXY_Sys_FL_IND = 0

}

Var 9600, name OXY_Sys_FL_IND, Link IOCARD_OUT, Output 49 // OXY Sys FLOW INDICATOR

Var 9601, name Oxy_Gen, Link IOCARD_SW, Device 5, Input 200 // PTR-OXYGENCP-SUPPLY (Switch in DCS: Oxygen Supply On/Off)

{

IF &Oxy_Gen = 1

{

IF &OXY_LOW = 0

{

&Oxy_Power = 1

}

IF &OXY_LOW = 1

{

&Oxy_Power = 0

}

IF &Oxy_Gen = 0

{

&Oxy_Power = 0

}

}

}

Var 9605, name Oxy_Power, Link IOCARD_OUT, device 3, Output 0 // Opencockpits-USB-Outputscard Power-Relay (12V-to-220V) ON/OFF

 

 

 

In siocConfig.lua (I havent checked that switch, omit last ",1" if not working ):

[9601] = {TwoPositionSwitch, 40, 1, 1}, -- PTR-OXYGENCP-SUPPLY (Oxygen Supply On/Off)

Edited by Duckling

- - - -

Posted

Hi Duckling,

 

nice work you have done so far! It´s great to have such an experienced Sioc-professional in the forum here, who is taking much sparetime for helping others!:thumbup:

 

I have already started to test you code but running into first little problem: I don´t have a SiocExport.lua and also therefore needed Config.lua??? Could you plz upload yours (Code), so i can do further testing?

 

P.S.

I hope you are still online, otherwise i´m happy to hear from you after some weeks...

 

Thank you so far for your help!:)

 

greetings to Sweden,

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

When trying to compile the .ssi

i´m getting this errormessage:

 

ERROR! - Command outside place

Line: 782 Var 9600, name OXY_Sys_FL_IND, Link IOCARD_OUT, Output 49 // OXY Sys FLOW INDICATOR

==> 9600

 

What does this error mean?

 

 

And in this part the "&"´s are missing i believe:

 

Var 8002, name BreathFlow // VAR for Oxygen Press 600

{

IF &BreathFlow = 1

{

OXY_Sys_FL_IND = 1

}

IF &BreathFlow = 0

{

OXY_Sys_FL_IND = 0

}

 

So it has to look like this? Is this right???:

 

Var 8002, name BreathFlow // VAR for Oxygen Press 600

{

IF &BreathFlow = 1

{

&OXY_Sys_FL_IND = 1

}

IF &BreathFlow = 0

{

&OXY_Sys_FL_IND = 0

}

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...

  • 2 weeks later...
Posted (edited)
I don´t have a SiocExport.lua and also therefore needed Config.lua??? Could you plz upload yours (Code), so i can do further testing?

 

Hi Torrorvogel

Here is a .zip with stripped set of my current files.

There are three files in total for Oakes scripts

 

 

Note also SIOC Var numbers within has not been changed to reflect the thread above.

 

(my installed path to the export folder is: "C:\FLIGHTSIM\DCS World\Config\Export")

Within Export folder:

"ExportSupport.lua"

"SiocExport.lua"

Folder: "SIOCConfig" with containing file "siocConfig.lua"

 

# siocConfig.lua:

-- list of exports of mainpanel.lua values

gOxygenVolumeSIOCParam = 2002 -- 274 for example

 

inputsTable = {

[sIOC VAR] = {function, DeviceID, Arg, ...}

-- [35] = {TwoPositionSwitch, 58, 20, 1}, -- PTR-INTERCOM-CALL

...

...

 

myIndicators = {

-- snippet of my indicatorconfig below

-- [sIOC VAR] = {0, Arg} -- defined warning indicators in mainpanel.lua

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

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

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

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

}

 

gIndicatorTables = {myIndicators}

 

 

# ExportSupport.lua:

Functions called by the scriptfiles.

 

# SiocExport.lua

note the lines under -- HIGH important data such as:

lSIOC_SendString = lSIOC_SendString..BreathFlowMeter(gBreathFlowMeterSIOCParam)

corresponds with the lines under function LuaExportStop() such as:

lSIOC_SendString = lSIOC_SendString..ResetSIOCvar(gBreathFlowMeterSIOCParam)

 

In "C:\Users\<UserName>\Saved Games\DCS\Scripts\Export.lua:

only lines within my one are:

dofile ("./Config/Export/SiocExport.lua")

dofile(lfs.writedir()..[[scripts\DCS-BIOS\BIOS.lua]]) -- you can omit this if not using DCS-BIOS

 

 

Hope these will be of some help. Remember to make a backup of your files before start editing. Can't tell how many times it saved me from a disaster editing these :)

 

Cheers Gus

 

Edit: some spaces been added by the forum tools in text above so plese check the attached files

Export.zip

Edited by Duckling

- - - -

Posted
When trying to compile the .ssi

i´m getting this errormessage:

 

ERROR! - Command outside place

Line: 782 Var 9600, name OXY_Sys_FL_IND, Link IOCARD_OUT, Output 49 // OXY Sys FLOW INDICATOR

==> 9600

 

What does this error mean?

 

might be wrong but try shorten the name "OXY_Sys_FL_IND" to "OXY_IND" or likewise.

 

And in this part the "&"´s are missing i believe:

 

Var 8002, name BreathFlow // VAR for Oxygen Press 600

{

IF &BreathFlow = 1

{

OXY_Sys_FL_IND = 1

}

IF &BreathFlow = 0

{

OXY_Sys_FL_IND = 0

}

 

So it has to look like this? Is this right???:

 

Var 8002, name BreathFlow // VAR for Oxygen Press 600

{

IF &BreathFlow = 1

{

&OXY_Sys_FL_IND = 1

}

IF &BreathFlow = 0

{

&OXY_Sys_FL_IND = 0

}

 

Yes, sorry for that

 

/Gus

- - - -

Posted

Hi Duckling,

 

nice to have you here again!:)

Thanks for the detailed description and uploading your files!

I have adjusted the files so far but unfortunately i still can´t compile the A-10.ssi file due to same errormessage:

 

Phase 2

ERROR! - Command outside place

Line: 783 Var 9600, name OXY_IND, Link IOCARD_OUT, Output 49 // OXY Sys FLOW INDICATOR

==> 9600

 

Var 1035, name OXY_LOW // Warning indicator OXY_LOW Dev 0 Arg 487                        // Out of line !!!
Var 8000, name OxygenVol // VAR for Oxygen Volume 274 Env panel                          // Value in SIOC 0-500 (Oxy tank is 5 liter but can't say if the emergency bottle is handled within DCS)
Var 8001, name OxyPress // VAR for Oxygen Press 604 OXY panel                           // Value 0-1000 ( when going sub 0.5 PSI the OXY LOW caution light will popup)
Var 8002, name BreathFlow // VAR for Oxygen Press 600                                    
{
IF &BreathFlow = 1
{
&OXY_IND = 1
}
IF &BreathFlow = 0
{
&OXY_IND = 0
}

Var 9600, name OXY_IND, Link IOCARD_OUT, Output 49  // OXY Sys FLOW INDICATOR
Var 9601, name Oxy_Gen, Link IOCARD_SW, Input 23   // PTR-OXYGENCP-SUPPLY (Switch in DCS: Oxygen Supply On/Off)
{
IF &Oxy_Gen = 1
{
IF &OXY_LOW = 0
{
&Oxy_Power = 1
}
IF &OXY_LOW = 1
{
&Oxy_Power = 0
}
IF &Oxy_Gen = 0
{
&Oxy_Power = 0
}

Var 9605, name Oxy_Power, Link IOCARD_OUT, device 3, Output 0 // Opencockpits-USB-Outputscard Power-Relay (12V-to-220V) ON/OFF

What is the problem here?:huh:

 

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

Ahhh. My bad, Think this caused by the earlier var thread is not closed correct causing the complie error. Compare the numbers of { with }

Var 8002 needs a trailing } at the end, same for var 9601.

Nowhere near a sioc now but try it out

- - - -

Posted

Seems to work so far but now i got this error:

 

Phase 2

ERROR! - Command outside place

Line: 804 Var 9605, name Oxy_Power, Link IOCARD_OUT, device 3, Output 0 // Opencockpits-USB-Outputscard Power-Relay (12V-to-220V) ON/OFF

==> 9605

 

Var 1035, name OXY_LOW // Warning indicator OXY_LOW Dev 0 Arg 487                        // Out of line !!!
Var 8000, name OxygenVol // VAR for Oxygen Volume 274 Env panel                          // Value in SIOC 0-500 (Oxy tank is 5 liter but can't say if the emergency bottle is handled within DCS)
Var 8001, name OxyPress // VAR for Oxygen Press 604 OXY panel                           // Value 0-1000 ( when going sub 0.5 PSI the OXY LOW caution light will popup)
Var 8002, name BreathFlow // VAR for Oxygen Press 600                                    
{
IF &BreathFlow = 1
{
&OXY_IND = 1
}
IF &BreathFlow = 0
{
&OXY_IND = 0
}
}

Var 9600, name OXY_IND, Link IOCARD_OUT, Output 49  // OXY Sys FLOW INDICATOR
Var 9601, name Oxy_Gen, Link IOCARD_SW, Input 23   // PTR-OXYGENCP-SUPPLY (Switch in DCS: Oxygen Supply On/Off)
{
IF &Oxy_Gen = 1
{
IF &OXY_LOW = 0
{
&Oxy_Power = 1
}
IF &OXY_LOW = 1
{
&Oxy_Power = 0
}
IF &Oxy_Gen = 0
{
&Oxy_Power = 0
}
}


Var 9605, name Oxy_Power, Link IOCARD_OUT, device 3, Output 0     // Opencockpits-USB-Outputscard Power-Relay (12V-to-220V) ON/OFF

I can´t see any issues to that line...

Sorry for the circumstances!

 

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)

Fault is mine. Having only an iPad (hate typing on that thingy) and a bit distracted mean while piles up the problems. Now grabbed Jr's PC, downloaded SIOC and Notepadd++ and did it proper instead

 

It's easier to track the syntax when intend lines for each function, see the notepad..jpg and sioc window. Exporting the .ssi to text looses the overview of the topology.

 

Created a .ssi to verify just in case (in the .zip file).

 

Sincerily hope this works now :-)

 

Cheers

Gus

 

edit: dependencies for the sioc script is that OXY_LOW warning indicator work as intended. Issue is also that when first time the OXY LOW indicator start to "blink", the output port driving the relay would do the same until you push the master caution knob on the UFC, from there on the output port would remain off (cutting the power to your pump).

1672980159_NP.thumb.JPG.b56a13d4cae71eb5ef9ab6abc5820edd.JPG

825849892_sioceditor.JPG.ccca750b029581cfec39f0d3b219095b.JPG

A10_v1.txt

A10C_v1.zip

Edited by Duckling

- - - -

Posted

Thank you so much Duckling for your efforts!!!:thumbup:

You made my day again!

Now it is working fine. When switching the "real" opencockpits oxygen "on" switch, the USB outputscard has an output at the dedicated channel:)

 

Now i have only to find the time to connect the breathing machine to this (thank of you) now working piece of software. The recommended relais is on the way from China and i will tell you when everything is finally connected but this will take some time.

 

May i still ask you some other question?

Are you using Helios and Sioc.exe together? If so, do you have a poor Helios performance too? When using this two programs together at the same time, Helios's gauges only refreshes with low 3 FPS which is very annoying and inaccurate and nearly unflyable. A friend of mine has exactly the same issue, so it is no hardware specific issue. It seems that Sioc somehow slows down Helios in the background. Oldcooltronix from forum here gave me the hint to install "Aries Radio" to get back the Helios needed performance again. There is something in the code of Aries Radio, which is overriding something so the performance is back. This is really strange. It is working so far but the problem is the dependency from "Aries" till the rest of our lifes and the unwanted korrellation with other radios like "UR Radio" etc.

This whole issue seems only with opencockpits hardware in combination with Sioc.exe and Helios and not with using Arduino boards only.

Would be great if you could give a hint in some direction:smartass:

 

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

Great it worked out with the code. Was afraid I would make real (bigger) fool of myself otherwise ;-)

I've earlier used helios (great software) but no longer due to focusing on another path. Problem you have I think is nested scripts, together with a lot of exporting the same values multiple times (I had same type of problem). I'm nowere near to a programmer and tries to stear throgh the djungle with best effort learning at best pace. For Helios and Oakes scripts coexisting I assume a single "export.lua" build were each set export a minimal set would be best, but not skilled enough to say for sure.

- - - -

Posted

Thank you Duckling for your help! I'm gonna write here again, if the breathing-machine thingy is finished to give you a feedback.:)

 

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...

  • 2 months later...
Posted

Hi Guys!

Does someone knows how to invert a switch in SIOC?

 

I´m having the issue, that no matter how i solder the KA50´s Eject Seat-Sys-Switches (3x of ON-OFF with one big common cover), i´m getting still the opposite value inside DCS.

 

I already tried this to invert this switch(es) but it doesn´t work:

Var 0645, name EJECT1, Link IOCARD_SW, Device 5, Input 30, Type I     // SWITCH EJECT 1
{
  &EJECT1 = CHANGEBITN 0 &EJECT1
}

and

 

Var 0645, name EJECT1, Link IOCARD_SW, Device 5, Input 30, Type I     // SWITCH EJECT 1
{
  IF &EJECT1 = 0
  {
    &EJECT1 = 1
  }
  ELSE
  {
    &EJECT1 = 0
  }
}

When sending manually "Value 0" in SIOC IOCP Console , the switch inside DCS moves to one time to the right "opposite" direction.

 

Now my question is, how to invert this value permanently?

It is really annoying, when switches always have to be in the "wrong" physically position to get synchonized within DCS. Really hope someone can help me out of here...:helpsmilie:

 

P.S.

Having the same issue with landing gear, cut-off-valves (two red levers) and with cockpits door. All the other switches are working as they should.

 

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

For the 3x ejecting switches i have found a solution to invert but for the Engine Cut-Off levers don´t.

 

Here´s the working code of ONE of the three switches, for those who are interested in:

Var 0645, name Ej_SW1_val, Value 0     // Value of EJECT1 switch 
Var 6000, name EJECT1, Link IOCARD_SW, Device 5, Input 30, Type I   // SWITCH EJECT 1
{
 IF &EJECT1 = 1
 {
   &Ej_SW1_val = 0    
 }
 ELSE
 {
   IF &EJECT1 = 0
   {
           &Ej_SW1_val = 1    
         }
       }
   }

I have tried the same code for the ONE of the two Engine Cut-Off levers but without success:

Var 0890, name C_off_val1, Value 0     // Value of Cut Off Left Engine switch Var 0890 is linked inside SiocToDcs.lua or siocConfig.lua
Var 6010, name C_OFF_G, Link IOCARD_SW, Input 36, Type 1   // Cut Off Left Engine
{
 IF &C_OFF_G = 1
 {
   &C_off_val1 = 0    
 }
 ELSE
 {
   IF &C_OFF_G = 0
   {
           &C_off_val1 = 1    
         }
       }
   }

When starting a DCS mission the Cut-Off lever is still shutting off allthough the new inverted values. Does anyone has a hint what is the cause of this behaviour?

 

Here are some pictures of IOCPConsole:

 

IOCPConsole_inverted_Cut_Off_Lever_NOT_WORKING.jpg

 

IOCPConsole_inverted_Cut_Off_Lever_NOT_WORKING_2.jpg

 

du3k50oh9

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)

Hi Terrorvogel

 

(above post is correct, Use a seperate VAR for the "Switch-input" and the "dcs value to change" make it lot easier to control the outcome.

 

For the not working switches, here are some ideas:

-

Not sure how the DCS is addressed here. It's either a 'change state' command or an absolute value you write. What are the values required in DCS:KA-50 in clickabledata.lua for these switches ? (don't have that Module), If not "0" to disable or "1" to enable, the answer might be there and the function called may need to be changed or a new added (say if it's -1 and 1 for the act/deact or even a decimal value)

 

Switch Input type "I" is mimicing a momentary input/button, State of the input VAR reflect the button position directly.

A type "P" is latched, it flip the State On or Of for each time the button/toggle is activated (so probably not what you want)

 

In the script above I see "Var 6010, name C_OFF_G, Link IOCARD_SW, Input 36, Type 1", Is this a typo ?

 

/Gus

Edited by Duckling

- - - -

Posted

Hi Duckling!!!

 

thx again for the fast answer:)

 

What do you mean for using a seperate Var for "switch-input" and "dcs value"?

Var 0645 is the "changeable value var" and Var 6000 ist the physical opencockpits-switch. Is there a better way to seperate them?

 

DCS:KA-50 in clickabledata.lua switches:

elements["EMERGENCY-BRAKE ENGINE-LEFT-PTR"]  = { class = {class_type.TUMB, class_type.TUMB}, hint = LOCALIZE("Left engine cut-off valve"),    device = devices.ENGINE_INTERFACE, action = {device_commands.Button_9,device_commands.Button_9}, arg = {554,554}, arg_value = {direction*1.0,-direction*1.0}, arg_lim = {{0.0, 1.0},{0.0, 1.0}}, updatable = true, use_OBB = true}

elements["EMERGENCY-BRAKE ENGINE-RIGHT-PTR"] = { class = {class_type.TUMB,class_type.TUMB}, hint = LOCALIZE("Right engine cut-off valve"),    device = devices.ENGINE_INTERFACE, action = {device_commands.Button_10,device_commands.Button_10}, arg = {555,55}, arg_value = {direction*1.0,-direction*1.0}, arg_lim = {{0.0, 1.0},{0.0, 1.0}}, updatable = true, use_OBB = true}

I tried to change this:

arg_lim = {{0.0, 1.0},{0.0, 1.0}}

 

to this, but nothing changes:

arg_lim = {{1.0, 0.0},{1.0, 0.0}}

 

How can i "invert" the switches "behaviour" there?

What i don´t like by this way is, that every DCS update i have to change theese again to invert my Cut-offs...

 

 

The ", Type 1" should be no typo i hope.

At http://www.lekseecon.nl/howto.html#onoff_switch i have read, to use this command for on/off switch. Did i misunderstood something there?

For getting sure, i have tested the upper code without ", Type 1" but nothing changed.

 

What makes me wonder is, am i the only one with this "issue" or is the answer that simple and i´m too stupid to solve;)

 

P.S.

The oxygen breathing machine, you helped me so much, is nearly ready. I have spent lots of time to integrate a working pc-mike into the mask and building headphones into helmet. The only thing to finish it, is that i´m waiting for that damn relais from china, the second time now. It takes over a month each time. If it is not arriving again, im spending "more" money and buy it in my country - not worth the nerves anymore...

What i can say so far is, it´s really increasing the immersion with a real working oxygen mask:)

 

Regards

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

Hi

Don't edit the clickabledata file, even if you get it to work you'd be stuck if future release updates it, dependencies is hard to track so use SIOC and/or the export functions instead.

 

Since I lack KA50 module and only have a limited knowledge about it, I could force you off track here :-),

 

For the "typo" quiz is that you use the digit 1 (one) instead of the "I" (the letter) on VAR 610 (post #116)

Might be of here and haven't verified if the "1" is a valid parameter syntax.

From the first post #115. I did assume you had the VAR 0654 in use both as the VAR for input (Dev5 Inp 30) AND as the same VAR linked to DCS.

 

Reason for asking was that you addressed the same VAR 0645/&Eject1 in the VARs dependent script:

 

Var 0645, name EJECT1, Link IOCARD_SW, Device 5, Input 30, Type I // SWITCH EJECT 1

{

IF &EJECT1 = 0

{

&EJECT1 = 1

}

ELSE

{

&EJECT1 = 0

}

}

 

 

 

Separating these as seen in Post #116, VAR6010 for input for the OC/inputport and VAR 0890 connected to DCS enable you to set the later to a value of your chosing.

 

The ["EMERGENCY-BRAKE ENGINE-LEFT-PTR"] switch itself is a 2-pos switch (or is at a 3-Pos ?) I assume a 2Pos here.

 

You initilze it to be "0" (Var 0890, name C_off_val1, Value 0),

Judging from the clickabledate.lua info above I'd say you need use an argument value of either "1" or "-1" to get'em to flip between the two endpoints.

 

Can you try to push a 1 or -1 through SIOCConsole and see the outcome ?

If that works, initilize the Var of the switch to have it set the same in the virtual cockpit to your choosing

 

Remember thats it's no magic involved, just a complex flow of data involving several dependent files.

 

I'm sure I read a reference your wrote above to a lua file named something like lotodcs.lua or something like it. Can't find that any more. You edited the post or am I getting delerious (or blind) ;-)

 

Verify also the info in clicabledata.lua:

elements["EMERGENCY-BRAKE ENGINE-RIGHT-PTR"] = { class = {class_type.TUMB,class_type.TUMB}, hint = LOCALIZE("Right engine cut-off valve"), device = devices.ENGINE_INTERFACE, action = {device_commands.Button_10,device_commands.Button_10}, arg = {555,55}, arg_value = {direction*1.0,-direction*1.0}, arg_lim = {{0.0, 1.0},{0.0, 1.0}}, updatable = true, use_OBB = true}

I have a hunch that the "55" off-value should be a "555"

 

If someone with a clear mind see an err, please chime in, It's getting late

 

Cheers

Gus

- - - -

Posted

Hi Duckling, thx for your time!

 

with this typo thingy, i tried out with the letter "I" but nothing changed. At this moment i tested with and without ", Type I". But no change. Last state is that i deleted the completely ", Type I" from code.

 

Yes, your´re right, the "EMERGENCY-BRAKE ENGINE-LEFT-PTR" is a two position switch.

 

I changed the initializing value to "1" but nothing changed. How can this be?

 

Var 0890, name C_off_val1, Value [b]1[/b]     // Value of Cut Off Left Engine switch Var 0890 is linked inside SiocToDcs.lua or siocConfig.lua

Only when changing the state inside IOCPConsole, the lever changes its state.

And the strange thing is, when starting a "cold start mission", the Cut-Off-Levers staying in sync. If running "warm start", the levers immediately going out of sync. Not running Helios or something other in the background.

 

I have taken some screenies:

 

Cold Start Mission (synced):

IOCPConsole_Cold_Start_synced.jpg

 

Cold Start Mission (synced) sending IOCPConsole 1x Value "1" Left Lever:

IOCPConsole_Cold_Start_synced_sending_Value_LEFT.jpg

 

Warm Start Mission (out of sync):

IOCPConsole_Warm_Start_not_synced.jpg

In IOCPConsole log there is no event with Var 890 and 900, which could explain the state change...

 

 

 

Warm Start Mission (out of sync) sending IOCPConsole 1x Value "0" Left Lever:

IOCPConsole_Warm_Start_not_synced_sending_Value.jpg

 

Why is there different behaviour wheter running cold or warm start? Is it a bug within KA50?

 

 

I´m sorry Duckling but i don´t understand what you mean with this "lotodcs.lua":cry:. What was the exact context of this? If it´s not important just ignore.

 

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)

Hi, I'm still fumble in the dark here.

Found the file reference at last rereading the complete post: SiocToDcs.lua ;-) and a reference to it in thread https://forums.eagle.ru/showthread.php?t=57094&page=5

 

Gillesdrone posted a "version10" of his setup posted in https://forums.eagle.ru/showpost.php?p=1630912&postcount=49 with a bunch of other related files, and Takeoff-For-Fun refer to the fileset you have I think.

It's another variant of what I'm using so take the following with a grain of salt

 

Post from IAN with related info:

https://forums.eagle.ru/showpost.php?p=2440800&postcount=141

 

In Gillesdrones files, the mailpanel.lua (from that .zip) shows the

left_engine_break_handle, Argument 554 accepts 0 or 1 as input so skip the "-1" a suggested earlier

right_engine_break_handle Argument 555 accepts 0 or 1 do the same

 

Whats seems a bit strange is info of right handle in clickabledata.lua, the same odd info for the right handle argument (different Argument "555" vs "55")

elements["EMERGENCY-BRAKE ENGINE-LEFT-PTR"] = { class = {class_type.TUMB, class_type.TUMB}, hint = LOCALIZE("Left engine cut-off valve"), device = devices.ENGINE_INTERFACE, action = {device_commands.Button_9,device_commands.Button_9}, arg = {554,554}, arg_value = {direction*1.0,-direction*1.0}, arg_lim = {{0.0, 1.0},{0.0, 1.0}}, updatable = true, use_OBB = true}

elements["EMERGENCY-BRAKE ENGINE-RIGHT-PTR"] = { class = {class_type.TUMB,class_type.TUMB}, hint = LOCALIZE("Right engine cut-off valve"), device = devices.ENGINE_INTERFACE, action = {device_commands.Button_10,device_commands.Button_10}, arg = {555,55}, arg_value = {direction*1.0,-direction*1.0}, arg_lim = {{0.0, 1.0},{0.0, 1.0}}, updatable = true, use_OBB = true}

 

I assume you address the "TwoPositionSwitch" function in a ExportSupport.lua from within a SiocConfig.lua or likewise (could be the SiocToDcs.lua):

[890] = {TwoPositionSwitch, "Device", 9, 1},

( -- adding the trailing ", 1" whould invert the outcome,

like [890] = {TwoPositionSwitch, "Device", 9, 1, 1}, Could this be what you looking for ?

 

 

--ExportSupport.lua:

function TwoPositionSwitch(pValue, pDevice, pNumber, pOnValue, pInvert)

if pInvert then

if pValue == 1 then

pValue = 0

else

pValue = 1

end

end

 

GetDevice(pDevice):performClickableAction(pNumber + 3000, pValue * pOnValue)

end

 

Having the Module whould simplify the guesswork. Was some time since I juggled the gray cells but here are some suggestions. (As far I remember I don't have any arg_value with "directions" in the A10 and not sure how to address or adopt these)

Focus on the EMERGENCY-BRAKE ENGINE-LEFT-PTR (due to the Right.. odd Argument "555,55", looks like a typo in clickable.lua to me but this is the second file I see that in)

For the the differens between warn and cold start, cant say for sure but there are two options I think.

- Scratch to initialize the Var (Ex. Var 0645, name Ej_SW1_val, >>>Value 0<<<< // Value of EJECT1 switch ) Delete the "Value 0" in the .ssi file

Think that when you make a warm start, the handle is forced by script to the wrong state

The state of the SIOC database is not initilized at first start (of your PC). It add each Values on first actions on the physical inputs, and remain in that state until changed or shut down of your PC).

With no Initialize value on VAR after first start of PC you need to operate each switch/knob to desired position prior start of mission to be sure.

It causes unpredictable behavior when restarting a mission from Cold to Warn and vice versa.

Initilizing a VAR makes it return to a fixed state regardles of the type of mission you start in and that sounds like the other problem you have.

A checklist for warm/cold start and manual setting each switch/knob etc to desired position prior missionstart is probably the best solution.

 

There is a way to get the IOCard to update SIOC setting by soldering a cable between a selected port, one per each MasterCard, this getting an aotoupdate of current status of all switches to reflect positions.

You loose one port per MC and it involved some scripting. Haven't used it myself: http://www.microsofttranslator.com/bv.aspx?ref=IE8Activity&from=fr&to=en&a=http%3a%2f%2fwww.simubaron.fr%2famelioration_master.htm

(And you still need to manually verify each switch position prior start)

 

Please ignore bad spelling/grammer above and if someone reading this with KA50 pit at hand, please chime in :-)

(Edit: i.e. is the Arg "55" valid for the right handle release command and is working proper or is 555 used for both Activate and Release in your working pit?)

 

 

Best

Gus

Edited by Duckling

- - - -

Posted

Hi Duckling!

 

I have read all the nice links that you have reserarched and fiddled arround whole day with code from other users but with no result.:(

 

Let me tell you what i have done so far:

 

First of all, you´re right, the sioc configuration was from a very helpful user "Oldcooltronix" and the origin (i assume) is the config from user "Takeoff-For-Fun".

 

In my ExportSupport.lua i have nothing changed so far:

 

--------------------------------------------------------------------------------------

-- For a simple switch/pushbutton sends 0 (for pValue = 0) and pOnValue (for pValue = 1)

-- to pDevice (ex 12 for WEAP-Interface). pNumber is the device_commands.Button_?? value from

-- clickabledata.lua, pOnValue is from the arg_lim = {{0.0, 1.0} part from clickabledata.lua.

-- Set pInvert ~= nil to invert.

-- Example:

--[100]={TwoPositionSwitch, 2, 1, 1}, Device:2, Button:1

function TwoPositionSwitch(pValue, pDevice, pNumber, pOnValue, pInvert)

if pInvert then

if pValue == 1 then

pValue = 0

else

pValue = 1

end

end

GetDevice(pDevice):performClickableAction(pNumber + 3000, pValue * pOnValue)

--logfile:write("TwoPositionSwitch: pValue="..tostring(pValue).."pDevice="..tostring(pDevice).."pNumber="..tostring(pNumber).."pOnValue="..tostring(pOnValue).."pInvert="..pInvert.."\n")

logfile:write("TwoPositionSwitch(pDevice="..tostring(pDevice)..", pNumber="..tostring(pNumber)..", pValue*pOnValue="..tostring(pValue*pOnValue)..")\n")

logfile:flush()

end

 

 

--------------------------------------------------------------------------------------

 

 

Edited in:

P:\DCS World OpenBeta\Mods\aircraft\Ka-50\Cockpit\Scripts\clickabledata.lua

 

When changing this, cut-off-levers still inverted (but working):

arg = {554,554} to arg = {554,55}

arg = {555,55} stays arg = {555,55}

 

or

 

arg = {554,554} stays arg = {554,554}

arg = {555,55} to arg = {555,555}

 

 

When deleting the complete two lines, nothing changes, cut-offs still working???:

elements["EMERGENCY-BRAKE ENGINE-RIGHT-PTR"].............

elements["BRAKE-ROTOR-LOW-PTR01"]..............

 

If temporary renaming the clickabledata.lua no switches were working anymore except the cut-off-levers???

Seems they are configured somwhere other place?

This is so weird...

 

In my SioctoDcs.lua there are this lines for cut-off-levers:

[890] = {TwoPositionSwitch, 4, 9[b], 1[/b]}, -- Cut off Left Engine 
[900] = {TwoPositionSwitch, 4, 10[b], 1[/b]}, --Cut Off Right Engine

So i cannot add the recommended trailing ", 1" which whould invert the outcome. So i tried this but no change:

[890] = {TwoPositionSwitch, 4, 9,}, -- Cut off Left Engine 
[900] = {TwoPositionSwitch, 4, 10,}, --Cut Off Right Engine

This link with the connection of mastercards port for synchronizing, looks very interesting. Must read in, if this is a future solution for my config. Thx for this. Learned a lot again from your explanations here:)

 

If you are interested i could give you my "Black Shark 2 Ugrade Version". I could send you the registration code and you could keep the module because i don´t need it anymore due to buying the "full" version years ago.

I don´t know how to install this one however but the code should still be active and working.

 

But we also can bury this "cut-off-lever" issue and not wasting time anymore if you wish. I would understand that:)

 

P.S.

Will your site be up again? I´m so curious for your pit:D

 

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)

Hi. A quick response while on the move

 

Troubleshooting in an unknown config can be a mess, same goes for any suggestions by me.

There are some way to import pit status (adressing mainpanel.lua) into SIOC and I don't know if you using any of these.

Below is assuming you don't..

 

Can you do the following to clear the picture somewhat ?..

 

# Clickabledata.lua

Find a verifed unedited 'last' version of your clickabledata.lua file, copy to correct place, use and stick to that. This avoid you introduzing new errs in the config or have version update that restore the original state. Edit the SIOC .ssi file or export, import.lua's instead (use siocexport.lua, sioc2dcs.lua and the .ssi file etc).

 

To ease my understanding of your situation, can you respond to quiz below

Say the following:

# Prereq's: Using a verified unedited clickabledata.lua file:

remove VAR initilize to "0" in your .ssi file (Var 645 and 890 earlier ?) Check the VAR IDs, seems you edited the script, target the VAR that is connected to SIOC export script, 890 and 900 probably)

Startup the Sim on a 'cold' start mission

- Is the levers in correct positions (left/right) ?

- Using Physical switches to operate the levers, will they move both levers in the virtual cockpit ?

- Are they working during several (on-off-on-off..) movements

 

Startup the Sim on a 'warm' start mission

- Is the levers in correct positions (left/right) ?

- Using Physical switches to operate the levers, will they move both levers in the virtual cockpit ?

- Are they working during several (on-off-on-off..) movements

 

Using SIOCMonitor/Sioc Console

Sending a value of "0", "1", "0", "1", "0", .. to each VAR645, VAR890 (the SIOC VARs that controls the output to DCS)

- Do the handles on virtual cockpit move each time, at all or just once ?

 

On first start after power on your PC, if a SIOC Var is not initilized (Var = 0, 1 or whatever), SIOC has no knowledge of what the physical switch is in. The position of same in virtual cockpit is in "default" state. If your physical switch is (by chance) in same position,

SIOC VAR still missing a assigned value, operating the physical switch first time to get a SIOC value assigned you have to move that switch one step and then back if needed.

The way to avoid the above is to cycle all switches prior mission prior start of mission and to their requested positions

 

# function TwoPositionSwitch

If this a still same as Oakes original, editing the line as below should invert the behavior of the handle in virtual cockpit

(provided that the addressing is set up ok that is). Edit and check if this have any effect after the actions above.

[890] = {TwoPositionSwitch, 4, 9, 1, 1}, -- Cut off Left Engine

[900] = {TwoPositionSwitch, 4, 10, 1, 1}, --Cut Off Right Engine

 

# AK-50 serial. Many thanks for your offer, can try it out

 

# Site.. Total mess ;-) Site down now to several reasons but working on a solution when time allows. Pit building have been stranded again so no real updates there.

 

Cheers

Gus

Edited by Duckling

- - - -

Posted

Duckling, you have an Email

 

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...

  • 1 year later...
Posted

Hi

 

thanks to this post I manage to program my pit of F18 with the SIOC.

But I can not program the ON / OFF / ON switch

because the structure of the F18 is not the same:

 

clickabledata.lua

elements["pnt_331"]= springloaded_3_pos_tumb2(_("Fire and Bleed Air Test Switch, (RMB) TEST A/(LMB) TEST B"), devices.ENGINES_INTERFACE, engines_commands.FireTestBSw, engines_commands.FireTestASw, 331)

 

clickable_def.lua

function springloaded_3_pos_tumb2(hint_,device_,command1_,command2_,arg_,animation_speed_,val1_,val2_,val3_)

local element = springloaded_3_pos_tumb(hint_,device_,command1_,command2_,arg_,animation_speed_,val1_,val2_,val3_)

element.sound = {{SOUND_SW1_OFF, SOUND_SW1}, {SOUND_SW1, SOUND_SW1_OFF}}

return element

end

 

commands_def.lua

count = start_command

engines_commands =

{

APU_ControlSw = counter();

EngineCrankLSw = counter();

EngineCrankRSw = counter();

LAMADDecouplerHandle = counter();

RAMADDecouplerHandle = counter();

--

FireTestASw = counter();

FireTestBSw = counter();

--

FireExtghDischSw = counter();

APU_FireSw = counter();

LENG_FireSw = counter();

RENG_FireSw = counter();

LENG_FireSwCover = counter();

RENG_FireSwCover = counter();

--

AntiIceSw = counter();

-- input commands

EngineCrankLSw_EXT = counter();

EngineCrankRSw_EXT = counter();

APU_FireSw_ITER = counter();

LENG_FireSw_ITER = counter();

RENG_FireSw_ITER = counter();

LENG_FireSwCover_ITER = counter();

RENG_FireSwCover_ITER = counter();

AntiIceSw_ITER = counter();

APU_ControlSw_TM_WARTHOG = counter();

}

 

devices.lua

devices["ENGINES_INTERFACE"]= counter()--12 -- Cockpit interface to aircraft engines

 

 

I don't understand how can i do for this switch with SIOC and exportsupport.lua!!!

  • Recently Browsing   0 members

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