Jump to content

F16 AP3 Way Switch (Solved)


Go to solution Solved by Frederf,

Recommended Posts

Posted (edited)

 why does my 3 way switch work on the ground but not in the air?

It also works in the air but only when I pull G.

crazy

 

A video says more than 1000 words: 

 

Edited by Hobel
  • Solution
Posted (edited)

In short, the switch is working correctly. A bit of understanding will help explain why.

The F-16 pitch channel autopilot switch is a complicated switch. It's spring-loaded to return to center with solenoid mechanisms to keep the switch stuck in the up/down positions based on computer logic. This means if the switch returns to center when pilot finger pressure against the spring is removed depends on the solenoid state. Your three-way device switch is logically two buttons associated with the up and down positions. With switch up DX27 is pressed. With switch down DX28 is pressed. With switch center no button is pressed.

When the solenoids are unpowered the switch will fall to the center position by spring force unless the pilot is actively holding the switch with his finger. DCS is interpreting buttons 27 and 28 as the pilot's finger pressing the switch into the up and down positions. Releasing button 27 (28) represents the pilot ceasing to push the switch to the up (down) position.

DCS is not interpreting release of those buttons as is actively returning the switch to center by force. Ceasing pressing the switch results in the switch falling back to center only if the solenoids are unpowered. Of course a real pilot has an additional option: actively grab the switch and pull it to center regardless of the solenoid magnetic sticking. That would be a distinct action like "Autopilot PITCH Switch - A/P OFF" which your controller doesn't naturally have a separate button for.

It is possible to construct a DCS action which releasing the button commands the switch into the center position. The "Autopilot ROLL Switch (special) - HDG SEL/ATT HOLD" action is such an example. Because of the complex nature of the switch an explicit "move this switch to center" action wasn't made. Looking at the three commands in the .lua files it looks like there isn't a specific way to get the same behavior.

My solution was to write a TARGET script which pulsed the switch on and off and made the center position command the center position with a specific separate button.

Usually there is a way to construct custom .lua input actions so that it does something on the down stroke and something else on the up stroke (release). The default commands are:

  • ALT down 1, up 0
  • OFF down -1, up none
  • ATT down -1, up 0

What you want is some kind of:

  • ALT down 1, up something which makes the switch go to center
  • ATT down -1, up something which makes the switch go to center

I'm looking into how to make that. EDIT: OK, it's somewhat simple. The inputs 1, 0, -1 are relative switch movements. +1 goes up a state, 0 remains a state, -1 goes down a state. So this is my Quaggle's custom input section. I hope that helps.

return {
    keyCommands = {
        {    down = control_commands.ApPitchAlt_EXT, up = control_commands.ApPitchAlt_EXT,   cockpit_device_id = devices.CONTROL_INTERFACE,    value_down =  1.0,    value_up = -1.0,    name = _('AP Pitch - ALT'),        category = { _('Custom')}},
          {    down = control_commands.ApPitchAlt_EXT,                                                                            cockpit_device_id = devices.CONTROL_INTERFACE,    value_down = -1.0,                              name = _('AP Pitch - Center'),        category = { _('Custom')}},
          {    down = control_commands.ApPitchAtt_EXT, up = control_commands.ApPitchAtt_EXT,   cockpit_device_id = devices.CONTROL_INTERFACE,    value_down = -1.0,    value_up =  1.0,    name = _('AP Pitch - ATT'),        category = { _('Custom')}}
    }
}

Edited by Frederf
  • Like 2
Posted (edited)

Okay, the switches work correctly, but the integration of the controls needs corrections?

Your inclusion was a bit awkward to read at first, but I got it to work the way I want it to thanks!!!😃

 

here is the file and the folder where it has to go:

D:\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\joystick

default.lua

Edited by Hobel
  • Hobel changed the title to F16 AP3 Way Switch (Solved)
  • Recently Browsing   0 members

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