Jump to content

Recommended Posts

Posted

Hi there,

 

 

I would like to know if it's possible without using Target to bind Master Arm Off, RDR ALTM Off switches in DCS ?

 

 

I only achieve to bind On position.

 

 

Thanks a lot

Posted

It's possible but only if the command you're binding to is set up in a way to do one action when a button is pressed and another when released. Most aren't, but you can rewrite them to do so.

 

TMWH throttle has 45 switch states and the DInput API is limited to 32 so (along with other reasons) it was designed as off-on type switches where off is the lack of a button press.

 

Here's an example from TF-51D, Mods\aircraft\TF-51D\Input\joystick\default.lua

 

{down = device_commands.Button_2, cockpit_device_id  = devices.RIGHT_SWITCH_PANEL, value_down = 1.0,     name = _('Battery'), category = _('Right Switch Panel')},

 

If you bind a switch to this command it's only going to do an action on event "down" meaning when button is pressed. If you add extra text such as , value_up = -1.0 then something else will happen when you release the bound button.

Posted

Hi

 

 

thanks for your help, I have this :

 

 

        ["d3014pnilunilcd23vd1vpnilvunil"] = {
           ["added"] = {
               [1] = {
                   ["key"] = "JOY_BTN24",
               },
           },
           ["name"] = "Master Arm - ARM/SAFE",
       },

 

 

in throttle.lua

Posted
Hi there,

 

 

I would like to know if it's possible without using Target to bind Master Arm Off, RDR ALTM Off switches in DCS ?

 

 

I only achieve to bind On position.

 

 

Thanks a lot

Which aircraft?

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Posted (edited)

The sim can recognize the transition from ON to OFF if you tell it to look for it. This is done in the file "default.lua". I added a number of code lines myself. Here are 2 examples for the F/A-18:

{down = SMS_commands.MasterArmSw, up = SMS_commands.MasterArmSw, cockpit_device_id = devices.SMS, value_down =  1.0, value_up = 0.0, name = _('Master Arm Switch 2-Pos ARM/SAFE'), category = {_('Instrument Panel'), _('Master Arm Panel')}},
{down = HUD_commands.HUD_AltitudeSw, up = HUD_commands.HUD_AltitudeSw, cockpit_device_id = devices.HUD,    value_down =  1.0, value_up =  0.0, name = _('Altitude Switch 2-Pos BARO/RADAR'), category = {_('Instrument Panel'), _('HUD Control Panel')}},

The first allows me to use a maintained ON/OFF switch like the EAC switch on the Warthog throttle to switch Master Arm ON and OFF.

The second line provides the same functionality for the Altimeter Switch using the Radar Altimeter switch. The "down" part of the lines defines the action for the transition from OFF to ON, and the "up" part for the transition from ON to Off.

I have added this kind of modification to most of my modules.

This post contains a "How-to" document: https://forums.eagle.ru/showpost.php?p=2862001&postcount=214

It's post #214 in the thread "How to set up toggle switches".

Edited by LeCuvier

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Posted

Hi

 

 

thanks for your answer

 

 

I tried to put your 2 lines in default file, I have this in command control in DCS :

 

 

abdo0Bw.png

 

 

YCAUMKw.png

 

 

thaks for your help

Posted

If you did it correctly, you should see two new commands in Options/Controls:

Master Arm Switch 2-Pos ARM/SAFE

Altitude Switch 2-Pos BARO/RADAR

They should be visible under "All" but not under "Axis".

They must be in the block of key commands. Best place (so you find them easily) to put them is just after these lines at the beginning of the file:

local cockpit = folder.."../../../Cockpit/Scripts/"
dofile(cockpit.."devices.lua")
dofile(cockpit.."command_defs.lua")

local res = external_profile("Config/Input/Aircrafts/common_joystick_binding.lua")

join(res.keyCommands,{

Have you looked into the How-to document?

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

  • Recently Browsing   0 members

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