Jump to content

Recommended Posts

Posted (edited)

I have been experimenting with assigning unique sim command callbacks to my Warthog throttle quadrant DX switches without using the Target software. I have found a method to assign different sim commands to each position of 2- or 3-position switches by editing the aircraft default.lua file located in DCS World\Mods\aircraft\P-51D\Input\P-51D\joystick\ . For example I wished to assign, in the P-51D, my Warthog Boat Switch to SUPERCHARGER HIGH in the forward position, AUTO in neutral position and LOW in the back position.

 

Open the default.lua file and rename it for safety's sake. Find the command lines of interest.

 

 {down = device_commands.Button_1, cockpit_device_id  = devices.ENGINE_CONTROL_PANEL, value_down = 0.0, name = _('Supercharger switch AUTO'), category = _('Engine Control Panel')},

 

 {down = device_commands.Button_1, cockpit_device_id  = devices.ENGINE_CONTROL_PANEL, value_down = 0.1, name = _('Supercharger switch LOW'), category = _('Engine Control Panel')}, 

 

 {down = device_commands.Button_1, up = device_commands.Button_1, cockpit_device_id  = devices.ENGINE_CONTROL_PANEL, value_down = 0.2, value_up = 0.1, name = _('Supercharger switch HIGH'), category = _('Engine Control Panel')},

 

Notice that this is a 3-position switch identified by 3 different command lines with 3 'value_down' values 0.0, 0.1, and 0.2. To program the switch so that the up position commands 'Supercharger switch LOW' and release position commands 'Supercharger switch AUTO, add the 'up = device_commands.Button_1' as well as the 'value_up=0.0' value to the command line:

 

 {down = device_commands.Button_1, up = device_commands.Button_1, cockpit_device_id  = devices.ENGINE_CONTROL_PANEL, value_down = 0.1, value_up = 0.0, name = _('Supercharger switch LOW'), category = _('Engine Control Panel')}, 

 

In the SUPERCHARGER HIGH line change the 'value_up' to 0.0.

 

 {down = device_commands.Button_1, up = device_commands.Button_1, cockpit_device_id  = devices.ENGINE_CONTROL_PANEL, value_down = 0.2, value_up = 0.0, name = _('Supercharger switch HIGH'), category = _('Engine Control Panel')},

 

Check the sim Controls applet and reassign the device DX switches, if required. Boat Switch behavior now will command AUTO when the switch is returned to the central/neutral position.

 

I think one can program any 2 functions by specifying the correct button and instrument panel cluster: 'device_commands.Button_1, cockpit_device_id = devices.ENGINE_CONTROL_PANEL' and the appropriate value_up and value_down values in the command line. This specifies Button 1 on the Engine Control Panel, for example.

 

Corrections, comments, additions welcome.

Edited by Habu_69
  • Recently Browsing   0 members

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