-
|
Hi there. I'm interested in trying to add an axis that I can bind to the radar altimeter high/low knobs in the Uh1H. I believe the devices are listed in the aircraft's devices.lua file, but I'm unsure if it's possible to use these devices and this mod to set up new axis commands. Can you point me at some examples of axis bindings you've added, if any? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi! Unfortunately I'm not sure those will be able to be configured to work as you'd like them to - currently in the huey those are only available as relative commands (where your axis would control the velocity of change for the knob instead of the position of the knob). What's available with this mod (and what's possible with lua edits) depends on how the module was built. Some (older ones) only offer either relative or absolute versions of commands. Usually newer modules are better at providing both options. For adding an axis, you only need the device and command you want to add it for, and usually an easy place to look for that for most modules is the clickabledata.lua, which is in same Config folder as the devices.lua. This defines what's clickable in the cockpit and usually a good start for figuring out what different options are available for it. In there, search for whatever control you want to wire up. Using the radar altimeter low knob as an example, you'll find this: elements["PITCH-LO-ALT-PTR"] = default_axis(_("Low Altitude Setting Knob"),devices.RADAR_ALTIMETER, device_commands.Button_2, 445, 1.0, 0.1, false, true) The issue is that last true on the end. Checking the default_axis function defintion, we can see what those parameters mean: function default_axis(hint_,device_,command_,arg_, default_, gain_,updatable_,relative_,cycle_,attach_left_,attach_right_) Where that command is defined as relative. In my experience those usually don't work well mapped to an axis so I tend to avoid including them in the keybinds. Newer modules are usually being released with relative and absolute versions of the commands, as can be seen here from the Hind's joystick/default.lua: {down = elec_commands.ACGroundPowerITER, cockpit_device_id = devices.ELEC_INTERFACE, value_down = 1, name = ('AC Ground Power Switch - ON/OFF'), category = {('Electrical Control Panel'), _('AC Panel')}}, Key parts being where there is ACGroundPowerITER (relative) and ACGroundPower (absolute) versions of that command available. For modules built like that, you can see all those commands defined in command_defs.lua, under groups like elec_commands. Sometimes you'll also see those commands labelled as AXIS, where the default is relative and AXIS denotes the absolute version of it. Unfortunately, the huey, being an older module, isn't built like that, and usually there's only either a relative or absolute version of commands available, but not both. To be able to wire up an absolute version of a command that's only relative would require access to the compiled code. You'll notice how the huey just uses Button_4, etc, instead of using text like ACGroundPower. Here's the axis defines for those knobs though if you'd like to try them out as relative: {cockpit_device_id = devices.RADAR_ALTIMETER, action = device_commands.Button_2, name = _('Radar Altimeter Low Altitude Setting Knob')}, |
Beta Was this translation helpful? Give feedback.
-
|
Wow, thanks for the in-depth reply! I think I'd be okay with a relative axis - at the moment I have all the switches for cold start of the huey bound, with the exception of the radar hi/lo, the compass synchronization, and the throttle when it's below the idle stop. I'll give these relative ones a try and see how it feels - might be better than nothing! Thanks! |
Beta Was this translation helpful? Give feedback.
Hi!
Unfortunately I'm not sure those will be able to be configured to work as you'd like them to - currently in the huey those are only available as relative commands (where your axis would control the velocity of change for the knob instead of the position of the knob).
What's available with this mod (and what's possible with lua edits) depends on how the module was built. Some (older ones) only offer either relative or absolute versions of commands. Usually newer modules are better at providing both options.
For adding an axis, you only need the device and command you want to add it for, and usually an easy place to look for that for most modules is the clickabledata.lua, which is in sa…