darkman222 Posted May 22, 2021 Posted May 22, 2021 Can you assign an input which is listed as axis to function as button press instead? Without the use of external software? So for example when the axis is over 50 % value it is like a button pressed.
Sokol1_br Posted May 24, 2021 Posted May 24, 2021 A simple way is using JoyToKey, up to 2 buttons per axis (bellow 50%, above 50%). A more elaborated is Joystick Gremlin, can divide the axis in bands for press more buttons.
LASooner Posted May 24, 2021 Posted May 24, 2021 I do that in the Tomcat, I created an axis command for the landing gear and use a throttle quadrant to do it. I just put it in the default.lua for the F-14 pilot.{action = device_commands.GEAR_Handle, cockpit_device_id=devices.GEARHOOK, name=_('Gear Handle')},Sent from my Samsung Chromebook Plus using Tapatalk F-14B, F-16, F-18C, A-10C, F-5E, F-86, FC3, BF-109, FW-190, P-51, Spitfire, UH-1,AJS-37 Viggen, MIG-15, MIG-19, MIG-21, AV-8B Harrier, P-47D Persian Gulf, Caucuses, NTTR, Normandy, The Channel, Syria Combined Arms, WWII Assets,Super Carrier TM Warthog, Virpil VFX,BuddyFox UFC, Saitek Pro Flight quadrant & Switch Panel, Odyssey+ VR, Jet Pad w/ SSA, Voice Attack w/Viacom Pro GeForce RTX2080TI OC, Intel Core i7-7700K 4.5Ghz, 64GB DDR4, Dedicated 1TB SSD
darkman222 Posted May 24, 2021 Author Posted May 24, 2021 This is the perfect solution I am looking for. Thank you! And I am almost there I hope. I do this to assign my toe brakes on the rudder to the accelerator pedal in combined arms, because it only has a combo axis for accelerate and brake. So I want to assign the keyboard commands to it. I looked in the keyboard default.lua for the command I want to assign to the joystick which looks like: {combos = {{key = 'W'}}, down = iCommandPlaneUpStart, up = iCommandPlaneUpStop, name = _('Vehicle Accelerate'), category = _('Moving')}, Then I put it in in the joystick.lua like that: {action = iCommandPlaneDownStart, name = _('Vehicle Accelerate'), category = _('Moving')}, It shows up, I can assign the stick, but it does not do anything. Unfortunately it does not look exactly like the code in the F14. I dont know how to deal with the up and down commands, which I assume will be for button press and release. I tried: {combos = {{key = 'W'}}, down = iCommandPlaneUpStart, up = iCommandPlaneUpStop, name = _('Vehicle Accelerate'), category = _('Moving')}, {down = iCommandPlaneUpStart, name = _('Vehicle Accelerate'), category = _('Moving')}, And that breaks it {name = _('Vehicle Accelerate'), category = _('Moving')}, Any Idea?
LASooner Posted May 24, 2021 Posted May 24, 2021 (edited) Your axis command doesn't have a cockpit device id, so it's not sending the value to anything. I don't know what device would be, I usually can find that data from the clickable lua. you were also missing device commands. I'm not a pro when it comes to this stuff, I just monkey around with it until it works. So someone else might have a more informed thought on it. {action = device_commands.GEAR_Handle, cockpit_device_id=devices.GEARHOOK, name=_('Gear Handle')}, Yours should probably look something like this {action = device_commands.iCommandPlaneDownStart, cockpit_device_id=devices.????????????????, name = _('Vehicle Accelerate'), category = _('Moving')}, Edited May 24, 2021 by LASooner F-14B, F-16, F-18C, A-10C, F-5E, F-86, FC3, BF-109, FW-190, P-51, Spitfire, UH-1,AJS-37 Viggen, MIG-15, MIG-19, MIG-21, AV-8B Harrier, P-47D Persian Gulf, Caucuses, NTTR, Normandy, The Channel, Syria Combined Arms, WWII Assets,Super Carrier TM Warthog, Virpil VFX,BuddyFox UFC, Saitek Pro Flight quadrant & Switch Panel, Odyssey+ VR, Jet Pad w/ SSA, Voice Attack w/Viacom Pro GeForce RTX2080TI OC, Intel Core i7-7700K 4.5Ghz, 64GB DDR4, Dedicated 1TB SSD
BluFinBima Posted June 6, 2023 Posted June 6, 2023 (edited) I found this post while trying to use an XBox controller Left Trigger (which is half of an axis) for a button - actually the Landing Gear Toggle of the Hornet. This reply is to document how I got this working in case it helps others in the future, or I forgot how I did it and need to refer back to this. Kudos to LASooner for his updates above. 1) C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Input\FA-18C\joystick\default.lua gets the following line added a new axis line into the axis definition section of the default.lua -- joystick axes join(res.axisCommands,{ ... {action = gear_commands.GearHandle, cockpit_device_id = devices.GEAR_INTERFACE, name = _('Landing Gear (Axis)'), category = {_('Left Vertical Panel')}}, }) The values for the action and the cockpit_device_id come from C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Cockpit\Scripts\clickabledata.lua specifically this line -- Gear system elements["pnt_226"] = LDG_Gear_Control_Handle(_("Landing Gear Control Handle, (RMB)UP/(LMB)DOWN/(MW)EMERGENCY DOWN"), devices.GEAR_INTERFACE, gear_commands.GearHandle, 226, gear_commands.EmergDown, 228, 4.5) elements["pnt_226"].sound = {{SOUND_SW8_UP}, {SOUND_SW8_DOWN}, {SOUND_SW9}} Then you go into DCS Options->Controls for the F/A-18C and press the Axis Assign button at the bottom of the page and you should see Landing Gear (Axis) in the Action list. Under the XBox controller column, select Add Combo and add Joy_Z . The next step is to tune the axis so that it acts like a button which involves setting the axis to be a slider, with a deadzone of 98 and a Saturation X of 98. The high values are to reduce the chances of double triggering if there is jitter in the axis. One final note is that only one of the triggers can be used because both of the XBox controller triggers use Joy_z null Edited June 6, 2023 by BluFinBima BlueFinBima Latest Helios Virtual Cockpit Team version of Helios can be found on Github BlueFinBima Helios YouTube
Recommended Posts