Jump to content

Recommended Posts

Posted

Problem description:

When sending value 0.0 or 1.0 to Engine Interface (cockpit_device_id = 4) to switch 3009 or 3010 (left or right engine cut-off valve) the switch will changes state regardless of current state.

 

Expected behavior would be that sending value 0.0 always rendered the 3010 in either down or up position and vice versa for sending value 1.0.

 

Example code for controller setup (located in: "...\Saved Games\DCS\Config\Input\ka-50\joystick\Joystick....lua"):

{combos = {{key = "JOY_BTN18"}, }, down = 3009, up = 3009, cockpit_device_id = 4, value_down = 0.0, value_up = 1.0, name = "Cut-off-valve left", category = "Engine Interface"},
{combos = {{key = "JOY_BTN19"}, }, down = 3010, up = 3010, cockpit_device_id = 4, value_down = 0.0, value_up = 1.0, name = "Cut-off-valve right", category = "Engine Interface"},

 

Thanks to MadCat for pointing out this issue.

Please fix the KA-50 bugs :-)

 

Black Shark: Controller profile & setup, TrackIR profile, pit.

Warthog HOTAS: Lubing the stick and extending the stick.

Posts on howto customize switches in DCS &

.

Must-have mods for DCS World and KA-50 (mostly JSGME).

Casual couch pilot, watching capped.tv...

Posted (edited)
I *think* the BS only works with iCommandPlane..*something* commands, which in some cases are only toggle commands instead of seperate commands for on and off. But I'm not sure on this so please correct me if I'm wrong. I've only seen the cockpit value's (3009 that kind of stuff) in the P-51.

 

It works for all other commands I've tried, but not the engine cut-off valves. That said I have not tried them all :-)

 

These are my current notes:

UV-26 (cockpit_device_id = 22)
3001, 0		Left Board
3001, 0.1	Both Boards
3002, 0.2	Right Board
{combos = {{key = "JOY_BTN19"}, }, down = 3001, cockpit_device_id = 22, value_down = 0.1, name = "SW UV-26 Select Both boards", category = "Ins Countermeasures dispensers UV-26"},
{combos = {{key = "JOY_BTN18"}, }, down = 3001, cockpit_device_id = 22, value_down = 0, name = "SW UV-26 Select Left  board", category = "Ins Countermeasures dispensers UV-26"},
{combos = {{key = "JOY_BTN16"}, }, down = 3002, cockpit_device_id = 22, value_down = 0.2, name = "SW UV-26 Select Right board", category = "Ins Countermeasures dispensers UV-26"},

PUI-800 (cockpit_device_id = 12)
Master Arm
**********
3001, 0.0	Master Arm Release
3001, 1.0	Master Arm
{combos = {{key = "JOY_BTN24"}, }, down = 3001, up = 3001, cockpit_device_id = 12, value_down = 1.0, value_up = 0.0, name = "SW Master Arm", category = "Ins Weapons Status and Control Panel PUI-800"},

Burst Length Switch
*******************
3004, 0		Burst Length Short
3004, 0.1	Burst Length Medium
3004, 0.2	Burst Lenght Long
{combos = {{key = "JOY_BTN22"}, }, down = 3004, up = 3004, cockpit_device_id = 12, value_down = 0.2, value_up = 0.1, name = "SW Burst length - long", category = "Ins Weapons Status and Control Panel PUI-800"},
{combos = {{key = "JOY_BTN23"}, }, down = 3004, up = 3004, cockpit_device_id = 12, value_down = 0, value_up = 0.1, name = "SW Burst length - short", category = "Ins Weapons Status and Control Panel PUI-800"},

Cannon Round Selector
*********************
3006, 0.0	AP rounds
3006, 1.0	HE rounds
{combos = {{key = "JOY_BTN16"}, }, down = 3006, up = 3006, cockpit_device_id = 12, value_down = 1.0, value_up = 0.0, name = "SW Cannon Round Selector", category = "Ins Weapons Status and Control Panel PUI-800"},

Cannon Rate of Fire
*******************
3020, 0.0	High Rate of Fire
3020, 1.0	Low Rate of Fire
{combos = {{key = "JOY_BTN17"}, }, down = 3020, up = 3020, cockpit_device_id = 12, value_down = 1.0, value_up = 0.0, name = "SW Cannon Rate of Fire", category = "Ins Weapons Status and Control Panel PUI-800"},

External stores jettison
************************
3003, 0.0
3003, 1.0	External stores jettison
{combos = {{key = "JOY_BTN26"}, }, down = 3003, up = 3003, cockpit_device_id = 12, value_down = 1.0, value_up = 0.0, name = "SW External stores jettison", category = "Ins Weapons Status and Control Panel PUI-800"},

Expedite emergency ATGM launch
******************************
3021, 0.0
3021, 1.0	ATGM Launch
{combos = {{key = "JOY_BTN27"}, }, down = 3021, up = 3021, cockpit_device_id = 12, value_down = 1.0, value_up = 0.0, name = "SW ATGM launch", category = "Ins Weapons Status and Control Panel PUI-800"},

Jettison arm mode - arm fuse/disarm fuse
****************************************
3022, 0.0	Disarm
3022, 1.0	Fuse
{combos = {{key = "JOY_BTN25"}, }, down = 3022, up = 3022, cockpit_device_id = 12, value_down = 1.0, value_up = 0.0, name = "SW Jettison ARM", category = "Ins Weapons Status and Control Panel PUI-800"},

Engine Interface (cockpit_device_id = 4)
Engine cut-off valves (NOT WORKING!)
*********************
3009, 0.0	Left cut-off valve release
3009, 1.0	Left cut-off valve engage
{combos = {{key = "JOY_BTN31"}, }, down = 3009, up = 3009, cockpit_device_id = 4, value_down = 0.0, value_up = 1.0, name = "SW Cut-off-valve left", category = "Engine Interface"},
3010, 0.0	Left cut-off valve release
3010, 1.0	Left cut-off valve engage
{combos = {{key = "JOY_BTN32"}, }, down = 3010, up = 3010, cockpit_device_id = 4, value_down = 0.0, value_up = 1.0, name = "SW Cut-off-valve right", category = "Engine Interface"},

Rotor Brake
***********
3011, 0.0	Rotor brake release
3011, 1.0	Rotor brake engage
{combos = {{key = "JOY_BTN20"}, }, down = 3011, up = 3011, cockpit_device_id = 4, value_down = 1.0, value_up = 0.0, name = "SW Cut-off-valve right", category = "Engine Interface"},

Edited by tietze

Please fix the KA-50 bugs :-)

 

Black Shark: Controller profile & setup, TrackIR profile, pit.

Warthog HOTAS: Lubing the stick and extending the stick.

Posts on howto customize switches in DCS &

.

Must-have mods for DCS World and KA-50 (mostly JSGME).

Casual couch pilot, watching capped.tv...

  • 2 months later...
Posted

Another finding regarding this problem.

 

When adding these lines:

{down = 3009, cockpit_device_id = 4, value_down = 0.0, name = "Cut-Off Valve Left Engine Close", category = "Ins Engines start-up control panel and levers"},

{down = 3009, cockpit_device_id = 4, value_down = 1.0, name = "Cut-Off Valve Left Engine Open", category = "Ins Engines start-up control panel and levers"},

 

and same for the right valve with "3010".

 

With 4 seperate buttons set for those new commands, I found some interesting things.

 

First off, I can now move BOTH levers at the very same time with the Warthog's top 2 toggle switches, together with using TARGET.

Previously always one valve didn't move, as if there was a delay from Warthog->TARGET->game, and only one of the 2 commands got recognized when flipping them simultaniously.

Like that a lot !!!

 

But now to the interesting finding:

The original purpose of seperate commands for valve open and closed still doesn't work, it moves both ways with the same command.

 

BUT:

when I manually get the lever "out of sync" with the mouse, say the lever is in the open position, with the mouse I move it to the close position, all is fine.

If I then place the switch on the throttle in the down position and thereby send the command to close the valve, as said, it moves up again in the open position.

However the clickable box for the mouse doesn't move with the lever, instead it is set/remains at the closed position.

 

So the clickable box to actuate the lever with the mouse actually does move according to the seperately set commands for open and closed valve positions.

The visual model and the actual function of said valves however, does not.

 

Just found it and thought to share this, sorry for the rather long post :music_whistling:.

 

MadCat

  • 2 weeks later...
Posted

I tried to contact support and it was stated that the cut-off levers are toggle-switches. The only way is to create a lua script that does a conditional activation of the cut-off lever.

 

At the moment I have no idea how to access the switch state through lua-code (but I have a plan to learn how to do so in the nearest future), but I would like to do so - now that this is the only possible way :-)

 

This is caused by the cutoff valves being a "toggle" switch, in the game programming.

 

The solution to this problem is to use export to read the state of the cutoff valves (on and of) and then use the execution of the "toggle" dependent upon whether the toggle is already in that desired position. So, in pseudocode:

 

IF valve.position=1 AND command=1 no command.

IF valve.position=0 AND command=1 then issue command.

 

Of course, this depends on being able to read the exports.

Please fix the KA-50 bugs :-)

 

Black Shark: Controller profile & setup, TrackIR profile, pit.

Warthog HOTAS: Lubing the stick and extending the stick.

Posts on howto customize switches in DCS &

.

Must-have mods for DCS World and KA-50 (mostly JSGME).

Casual couch pilot, watching capped.tv...

Posted

A note further is that I've tried checking the cut-off levers state through HELIOS and it seems to be reliable. HELIOS even contains an input-box for lua-code checks, so it seems quite possible to do this. I don't know how to address the state of the cut-off levers though.

Please fix the KA-50 bugs :-)

 

Black Shark: Controller profile & setup, TrackIR profile, pit.

Warthog HOTAS: Lubing the stick and extending the stick.

Posts on howto customize switches in DCS &

.

Must-have mods for DCS World and KA-50 (mostly JSGME).

Casual couch pilot, watching capped.tv...

Posted
Could you explain more? Does this affect everyone or just a certain config? Explain without all the code related stuff mate?

If I understand correct, this affect the guys who want to switch the switches(and levers) with a joystick or other controller then direct with mouse via the clickable pit. So it relates to a certain config.

Deutsche DCS-Flughandbücher

SYSSpecs: i7-4790K @4GHz|GA-Z97X-SLI|16GB RAM|ASUS GTX1070|Win10 64bit|TrackIR5|TM Warthog/Saitek Pro Pedals

Posted (edited)

My aim is to have two physical switches that mimics the behaviour of the cut-off vales.

 

With every other switch in the Black Shark module (AFAIK) this is accomplished by sending value 0 to the sim to change a switch to position 0 and sending value 1 to change switch to position 1. So when sending 0 to a switch in position 0 nothing happens. (just an example other switches with more positions have other values)

 

Right now the cut-off levers change position regardless whether you send value 0 or 1 regardless of what position the cut-off lever is in (it toggles position).

 

In addition there seems to be a problem with changing the positions of both cut-off levers at the same time, unless you follow Madcats procedure above.

Edited by tietze

Please fix the KA-50 bugs :-)

 

Black Shark: Controller profile & setup, TrackIR profile, pit.

Warthog HOTAS: Lubing the stick and extending the stick.

Posts on howto customize switches in DCS &

.

Must-have mods for DCS World and KA-50 (mostly JSGME).

Casual couch pilot, watching capped.tv...

Posted (edited)

Yup, cutoff valves don't stay in sync, even with export.

 

Do not ever expect it to be fixed. -- Sad but true.

 

You have to remember, 98% of Blackshark pilots use auto start and don't even care about such a thing.

 

Forgot to add: Great work-around with that lua code!

Edited by JG14_Smil
  • Recently Browsing   0 members

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