Habu_69 Posted February 20, 2017 Posted February 20, 2017 (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 February 20, 2017 by Habu_69
JG14_Smil Posted February 21, 2017 Posted February 21, 2017 Hello Habu, Lot more info on this in the input/output section of the site. https://forums.eagle.ru/showthread.php?t=89226
Habu_69 Posted February 22, 2017 Author Posted February 22, 2017 Oh, thanks. My search did not ID this thread. Would have saved me alot of time!
Recommended Posts