Jump to content

Flaps switch


Laser9

Recommended Posts

On my X55 Throttle the first click brings down the flaps to position oNE, the second click extents them total.

And vice versa.

What goes up, must come down !

Intel Core i7-8700, 16 GB-RAM, Nvidia GTX 1060, 6 GB GDDR5, 1TB HDD, 500 GB 970 EVO Plus NVMe M.2 SSD, Windows 10/64, A10-C, Rhino X55, Persian Golf, F/A-18 Hornet

Link to comment
Share on other sites

What @MAXsenna describes works with a 3-position switch ON1-OFF-ON2 with 3 stable positions. You bind ON1 to "Toggle Flaps Up" and ON2 to "Toggle Flaps Dn". When the switch is in the middle position the flaps move to take-off position. So in essence you get 3 commands with only 2 inputs. That method is used quite frequently in DCS World.

@ex81 describes the use of 2 momentary pushbuttons bound to "Flaps Up" and "Flaps Down".

Both methods make efficient use of our pushbuttons and switches. One could easily modify the "default.lua" to create bindings for 3 pushbuttons, each driving the flaps to one of the 3 positions "Up", "MVR" and "Dn" respectively. But that would find little use since very few of us have spare switches, especially for more modern aircrafts.

  • Like 1

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

  • 4 weeks later...
10 hours ago, Laser9 said:

Sorry I know this was a long time ago but can you tell me how to edit the default lua file to make a binding for each position?

No problem. We don't neeed to re-invent any wheels, just use existing wheels in a different manner. The file "Throttle - HOTAS Warthog.lua" contains the two lines below for use with the 3-position flaps switch on the TM Warthog throttle:

{down = iCommandPlane_FLAPS_UP, up = iCommandPlane_FLAPS_MNR_from_UP,name = _('Toggle Flaps Up'), category = _('Systems')},
{down = iCommandPlane_FLAPS_DN, up = iCommandPlane_FLAPS_MNR_from_DN,name = _('Toggle Flaps Dn'), category = _('Systems')},

The 1st line says "when the bound switch goes to ON, retract the flaps to UP, and when it goes to OFF extend them to MVR position".
The 2nd line says "when the bound switch goes to ON, extend the flaps to DN, and when it goes to OFF retract them to MVR position".

So we want to implement 4 commands with 3 pushbuttons: RETRACT, EXTEND FULL, EXTEND to MVR, RETRACT to MVR. The 3 lines below do that:

{down = iCommandPlane_FLAPS_UP, name = _('Set Flaps to UP'), category = _('Systems')},
{down = iCommandPlane_FLAPS_DN, name = _('Set Flaps to DOWN'), category = _('Systems')},
{down = iCommandPlane_FLAPS_MNR_from_DN, up = iCommandPlane_FLAPS_MNR_from_UP, name = _('Set Flaps to MNR'), category = _('Systems')},

The 1st two lines are obvious. The 3rd line is just a little bit unusual. It says "when the bound pushbutton is pressed retract the flaps to MVR position, and when it's released extend them to MVR position. You can see that when you use the pushbutton bound to the 3rd line:
If your flaps are UP and you push & hold the button, nothing happens. Only when you release the buttons the flaps will extend to MVR.
If your flaps are DN and you push the button, the flaps will immediately retract to MVR. When you release the button nothing happens.

Notes:
1. I used names that are distinctly different from the existing flaps commands. You can use different names; but they must be different from existing names, and they should be distinctly different to avoid confusion with existing commands.
2. The 3 lines of code should be added to "default.lua". If however you use the Saitek X52 Pro Flight Controller then you need to add them to the "Saitek X52 Pro Flight Controller.lua".
3. You know probably that update or repair restores the original files, so make sure you back up your modified file!
4. I tested the new commands with pushbuttons on my DSD button box and they worked fine. If you get stuck I will help as best I can.


Edited by LeCuvier
corrected takeoff position to "MVR"

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

  • 1 year later...

@LeCuvier, dear mate -- having on Thrustmaster Throttle I did exactly what you said,

-- I used this now for the old A-10 implementation of DCS. 
-- added the three lines to the default.lua
-- bound three distinct buttons from vjoy to the new commands (they are correcly working).
-- no other joystick bound to the flaps, only the keyboard

Sadly for some reason all movements between down, middle to up work, but coming down from up does lead to wrong switching. The vjoy buttons are correct. I need to assign all three, right? No idea what is going on in my setup.

Thanks a lot for any hint and help

Link to comment
Share on other sites

@Phonon: I re-tested the 3 lines of codes with pushbuttons on my button box just to make sure the commands don't malfunction due to a change in DSC-World functionality, and I can confirm they still work as intended. In order to find out what's wrong at your end you need to elaborate.
Please state, which of the following commands does not work:
From     To
UP         DOWN
DOWN   UP
UP          MIDDLE
DOWN    MIDDLE
MIDDLE  UP
MIDDLE  DOWN

Also, please elaborate on what exactly the "wrong switching" does.

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

  • Recently Browsing   0 members

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