Jump to content

Recommended Posts

Posted

Hi all,

Trying to add additional keybinds to the SU25 using the following method, (https://github.com/Quaggles/dcs-input-command-injector) to make the most of my Virpil control panel. I have run into a hiccup and can't figure out why. I'm attempting to remap the SU25's Laser to be a 2 position on/off switch instead of default single button on/off. I have added these lines to a default.lua in the correct folder, however it only gives me the new keybind to "Laser On" (top code line) and not off, which I can't work out why. Is it because this switch for the laser is hardcoded to only be a single entry on/off configuration?

DCS log isn't showing any coding errors.

return {
    keyCommands = {
    -- Sensors
    {down = iCommandPlaneLaserRangerOn, name = _('Laser Designator On'), category = _('Jim')},
    {down = iCommandPlaneLaserRangerOff, name = _('Laser Designator Off'), category = _('Jim')},
    
        
    }
}

I successfully added controls to the Ka50 the same way with success (converting single on/off > 2 position on/off) but the SU25 won't have a bar of it.
Any help is appreciated, I'm stumped.

Jim

  • Like 1
Posted

OK,

Added the following to the code,

  {down = iCommandPlaneLaserRangerOn,value_up=1.0 name = _('Laser Designator On'), category = _('Jim')},
    {down = iCommandPlaneLaserRangerOff,value_down=0.0 name = _('Laser Designator Off'), category = _('Jim')},

Both settings now appear in the menu and are bindable, problem.... they don't do anything. Doesn't turn the laser on/off.

Posted

UPDATE

Figured it out! I kept changing the iCommandPlaneLaserRangerOnOff to individual on and off lines. Need to be kept as a single on/off entry in each line of code, then the switch configured after that. Here's the correct code line. Now to work on the rest!

{down = iCommandPlaneLaserRangerOnOff,value_up=1.0, name = _('Laser Designator On'), category = _('Sensors')},
{down = iCommandPlaneLaserRangerOnOff,value_down=0.0, name = _('Laser Designator Off'), category = _('Sensors')},
    

  • Recently Browsing   0 members

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