Kelevra Posted April 25, 2016 Share Posted April 25, 2016 Dear Eagles, Would it be possible to make the HOTAS 3 positions switches work vanilla in DCS ? For it's a pain to bind some controls to 2 or 3 different switches, that would normally go sweet to a 3 positions switch. In that case for the L39, I think of the : flaps & landing gear I might add that I would rather not have to use an external program like TARGET. Also I have noticed that for some planes it already works like a charm : A10-C for obvious reasons... but also the Mig-21 why not make this standard... über alles ? :joystick: 1 Link to comment Share on other sites More sharing options...
rrohde Posted April 25, 2016 Share Posted April 25, 2016 +1 :thumbup: PC: AMD Ryzen 9 5950X | MSI Suprim GeForce 3090 TI | ASUS Prime X570-P | 128GB DDR4 3600 RAM | 2TB Samsung 870 EVO SSD | Win10 Pro 64bit Gear: HP Reverb G2 | JetPad FSE | VKB Gunfighter Pro Mk.III w/ MCG Ultimate VKBcontrollers.com Link to comment Share on other sites More sharing options...
Golo Posted April 25, 2016 Share Posted April 25, 2016 I would like that too and it should really be standard for all modules. Link to comment Share on other sites More sharing options...
Stonehouse Posted April 25, 2016 Share Posted April 25, 2016 (edited) You can actually edit the default.lua file for the aircraft in question to give you three position switches as well as true on/off switches so you don't have to double switch a switch to turn something off. For three way switches you basically need to think of it as 2 2 way switches with the off state being the middle position. So for example the P51 flaps mapping to the Warthog throttle flap lever for instance is shown below, note the value_up is 0.8 for both. This corresponds to the middle position of the three way switch and gives me combat flaps. The up position is flaps retracted and the bottom position is landing flaps. You can do this for any HOTAS. {down = device_commands.Button_1, value_down = 1.0, up = device_commands.Button_1, value_up = 0.8, cockpit_device_id = devices.CONTROL_SYSTEM, name = _('Alt Flaps Up/Combat'), category = _('Flight Control')}, {down = device_commands.Button_1, value_down = 0.0, up = device_commands.Button_1, value_up = 0.8, cockpit_device_id = devices.CONTROL_SYSTEM, name = _('Alt Flaps Down/Combat'), category = _('Flight Control')}, Recommend you take a copy of the default.lua make your edits and then use JSGME to load or unload it to avoid patches messing it up. lots of info here: http://forums.eagle.ru/showthread.php?t=89226 Edited April 25, 2016 by Stonehouse 1 Link to comment Share on other sites More sharing options...
ESAc_matador Posted April 26, 2016 Share Posted April 26, 2016 You can also do it easier with the TARGET.but is a pain in the ass! Link to comment Share on other sites More sharing options...
Stonehouse Posted April 26, 2016 Share Posted April 26, 2016 Yeah I know but I tend to prefer not to use it. Bad habits I got from my Saitek time and avoiding the odd flakey problems that came up occasionally with their profile software. Once I got my head around the lua changes I put together my P51 setup for the Warthog in probably about 4-5 hrs spread out over a couple of days. Very happy with it. Link to comment Share on other sites More sharing options...
Phantom453 Posted April 26, 2016 Share Posted April 26, 2016 Dear Eagles, Would it be possible to make the HOTAS 3 positions switches work vanilla in DCS ? For it's a pain to bind some controls to 2 or 3 different switches, that would normally go sweet to a 3 positions switch. In that case for the L39, I think of the : flaps & landing gear I might add that I would rather not have to use an external program like TARGET. Also I have noticed that for some planes it already works like a charm : A10-C for obvious reasons... but also the Mig-21 why not make this standard... über alles ? :joystick: +1 please!!! :thumbup: Link to comment Share on other sites More sharing options...
Fri13 Posted April 26, 2016 Share Posted April 26, 2016 why not make this standard... über alles ? :joystick: Okay, this is about L-39 but as you mention the standard, you opened the door to comment that. YES! I would say that Eagle Dynamics should change the input system by making total overhaul. No list of functions in one column and then additional columns for each input device and then you can bind a function to input devices in that row. No no no. That is the old school style. (Yes it works etc but little improvement needs to be done) 1) Let us bind any function, to any button or any axis. Like if I want mouse X axis to move my flaps in A-10C, then let me! If I want trim wheel in my hotas to emulate mouse wheel or a HOTAS button to emulate mouse LMV, let me! 2) Let us choose specific input button/switch/dial/axis that what it is in every bind. Example if I want my trim dial to be a two function switch, let me define it as such. Meaning that I can say that between 0-50% the input is binded to Alt+A. And between 50-100% range the input is binded to Ctrl+Z. Meaning the dial is now a switch that position is changed everytime I move its zone. And then let us emulate different functions based the times we hold the buttons. Like if I keep Button 14 pressed longer than 2 seconds, input can be F button. If I just press it once or hold less than 2 seconds, it is then G button. So a single button in HOTAS can work as multifunction button without using a another button as multiplier/switch. So if aircraft has a multi-position input devices (switches, knobs, dials etc) then we need to be able use those with just single button or so. As we can't be required to build a pits to get all those with hardware, or required to use keyboard with combos etc. And about what I have no idea, but if we have multi-seat aircrafts, we need to be able easily copy the inputs from seat A to seat B too. i7-8700k, 32GB 2666Mhz DDR4, 2x 2080S SLI 8GB, Oculus Rift S. i7-8700k, 16GB 2666Mhz DDR4, 1080Ti 11GB, 27" 4K, 65" HDR 4K. Link to comment Share on other sites More sharing options...
Fri13 Posted April 26, 2016 Share Posted April 26, 2016 You can actually edit the default.lua file for the aircraft in question to give you three position switches as well as true on/off switches so you don't have to double switch a switch to turn something off. For three way switches you basically need to think of it as 2 2 way switches with the off state being the middle position. So for example the P51 flaps mapping to the Warthog throttle flap lever for instance is shown below, note the value_up is 0.8 for both. This corresponds to the middle position of the three way switch and gives me combat flaps. The up position is flaps retracted and the bottom position is landing flaps. You can do this for any HOTAS. Recommend you take a copy of the default.lua make your edits and then use JSGME to load or unload it to avoid patches messing it up. lots of info here: http://forums.eagle.ru/showthread.php?t=89226 Thanks for the info! Looks like someone should make a third party external program just to configure easily the configuration files. As that is the thing, some people can do the lua programming, but most will not want to, or don't get it when they make the slight small change that text editor can't highlight as error. i7-8700k, 32GB 2666Mhz DDR4, 2x 2080S SLI 8GB, Oculus Rift S. i7-8700k, 16GB 2666Mhz DDR4, 1080Ti 11GB, 27" 4K, 65" HDR 4K. Link to comment Share on other sites More sharing options...
Kelevra Posted April 26, 2016 Author Share Posted April 26, 2016 You can actually edit the default.lua file for the aircraft in question to give you three position switches as well as true on/off switches so you don't have to double switch a switch to turn something off. For three way switches you basically need to think of it as 2 2 way switches with the off state being the middle position. So for example the P51 flaps mapping to the Warthog throttle flap lever for instance is shown below, note the value_up is 0.8 for both. This corresponds to the middle position of the three way switch and gives me combat flaps. The up position is flaps retracted and the bottom position is landing flaps. You can do this for any HOTAS. Recommend you take a copy of the default.lua make your edits and then use JSGME to load or unload it to avoid patches messing it up. lots of info here: http://forums.eagle.ru/showthread.php?t=89226 Thanks really handy, I'll try that Link to comment Share on other sites More sharing options...
RAZBAM_ELMO Posted April 27, 2016 Share Posted April 27, 2016 YEs this does need to be a thing. In the mirage there are 3 way switch abstractions for instance the radar line scan. It shows up as if not one line than 2 line or if not 4 line than 2 line. Internally this would make a big difference so that stock a basic player doesn't need to fiddle with the .lua's. For pit builders it would make it easier to map buttons as well i think. This idea definitely gets a +1 from me Know and use all the capabilities in your airplane. If you don't, sooner or later, some guy who does use them all will kick your ass. — Dave 'Preacher' Pace, USN. Link to comment Share on other sites More sharing options...
Gnabbla Posted May 5, 2016 Share Posted May 5, 2016 Guys I don't get it and need your help. The L39 lua seems to be a bit different compared to the P51 one. I just want to configure the three-way flaps switch. Is there anyone who owns a Thrustmaster Warthog and might want to share me a working example? That's the original: { down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 1, value_up = 4, name = _('Flaps Flight Position'), category = {_('Flight Control'), _('Left Console')}}, { down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 2, value_up = 5, name = _('Flaps TakeOff Position'), category = {_('Flight Control'), _('Left Console')}}, { down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 3, value_up = 6, name = _('Flaps Landing Position'), category = {_('Flight Control'), _('Left Console')}}, and that's what I did {down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 1, value_up = 4, name = _('Flaps Flight Position'), category = {_('Flight Control'), _('Left Console')}}, {down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 4, value_up = 5, name = _('Flaps TakeOff Position'), category = {_('Flight Control'), _('Left Console')}}, {down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 6, value_up = 4, name = _('Flaps Landing Position'), category = {_('Flight Control'), _('Left Console')}}, My understanding was that when the middle position has the value "4" I just need to set it to "4" when landing as well as the flight position loses the focus. Pretty sure that I've mixed up something here. Looking forward for your help. Ty in advance. Link to comment Share on other sites More sharing options...
Stonehouse Posted May 5, 2016 Share Posted May 5, 2016 It looks like the L39 is more like the A10 and already has the flaps control set up? The change I was talking about was to simulate a 3 position switch by using 2 2 position switches where the up position on the first was the same as the up of the second. That is why the P51 entry I posted has only TWO lines not three. The P51 actually has 5 flap positions using the cockpit controls but I simply picked up, combat and landing as the ones most commonly used and therefore what I wanted to map. I do own the L39 but have literally only flown it for 5 mins twice simply due to lack of time. If I get a chance over the next few days - no promises I'm afraid - I will try to have a look and see what can be done as I also have a warthog so potentially can help you. Link to comment Share on other sites More sharing options...
Gnabbla Posted May 6, 2016 Share Posted May 6, 2016 Thank you very much. :thumbup: Link to comment Share on other sites More sharing options...
Stonehouse Posted May 7, 2016 Share Posted May 7, 2016 (edited) Ok I did have a look and unfortunately it is more than I thought. It looks to me like they have modelled the three flap positions as three separate button pushes not a toggle type thing. See clickabledata.lua in DCS World\Mods\aircraft\L-39C\Cockpit -- control system elements["FLAPS_00"] = default_button(_("Flaps Flight Position (0 degrees) Button"), devices.CTRL_INTERFACE, device_commands.Button_1, 281) elements["FLAPS_00"].sound = {{SOUND_SW23_OFF,SOUND_SW23_ON}} elements["FLAPS_25"] = default_button(_("Flaps Takeoff Position (25 degrees) Button"), devices.CTRL_INTERFACE, device_commands.Button_2, 282) elements["FLAPS_25"].sound = {{SOUND_SW23_OFF,SOUND_SW23_ON}} elements["FLAPS_44"] = default_button(_("Flaps Landing Position (44 degrees) Button"), devices.CTRL_INTERFACE, device_commands.Button_3, 283) elements["FLAPS_44"].sound = {{SOUND_SW23_OFF,SOUND_SW23_ON}} elements["FLAPS_00_CPT2"] = default_button(_("Flaps Flight Position (0 degrees) Button"), devices.CTRL_INTERFACE, device_commands.Button_4, 465) elements["FLAPS_00_CPT2"].sound = {{SOUND_SW23_OFF,SOUND_SW23_ON}} elements["FLAPS_25_CPT2"] = default_button(_("Flaps Takeoff Position (25 degrees) Button"), devices.CTRL_INTERFACE, device_commands.Button_5, 466) elements["FLAPS_25_CPT2"].sound = {{SOUND_SW23_OFF,SOUND_SW23_ON}} elements["FLAPS_44_CPT2"] = default_button(_("Flaps Landing Position (44 degrees) Button"), devices.CTRL_INTERFACE, device_commands.Button_6, 467) elements["FLAPS_44_CPT2"].sound = {{SOUND_SW23_OFF,SOUND_SW23_ON}} Then the relevant bit of default.lua looks like: -- Flaps {down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 1, value_up = 4, name = _('Flaps Flight Position'), category = {_('Flight Control'), _('Left Console')}}, {down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 2, value_up = 5, name = _('Flaps TakeOff Position'), category = {_('Flight Control'), _('Left Console')}}, {down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 3, value_up = 6, name = _('Flaps Landing Position'), category = {_('Flight Control'), _('Left Console')}}, This is kind of similar to the A10C except that for the A10 there is a toggle flaps down and a toggle flaps up in the Warthog throttle default.lua {combos = {{key = 'JOY_BTN22'}} ,down = iCommandPlane_FLAPS_UP, up = iCommandPlane_FLAPS_MNR_from_UP,name = _('Toggle Flaps Up'), category = _('Systems')}, {combos = {{key = 'JOY_BTN23'}} ,down = iCommandPlane_FLAPS_DN, up = iCommandPlane_FLAPS_MNR_from_DN,name = _('Toggle Flaps Dn'), category = _('Systems')}, As you can see the up and down actions for the A10 have a different command attached eg FLAPS_UP & FLAPS_MNR_FROM_UP So I'm not sure if the current L39 default.lua has a bug in the respect of flaps in that the up and down actions are all iCommandPlaneFlaps - it almost looks like the dev team was going for a similar scheme to the A10 but it isn't set up quite right? I don't know enough to make a real comment. The P51 by comparison has flaps modelled as an axis or button_1 and so you can configure things pretty easily as you want. I think it is still doable for the L39 but probably needs changes to the clickabledata.lua entries for flaps in conjunction with the entries in default.lua. I'd be working by trial and error so would likely take me a long time and I have a lot stuff on already so while I might try to see if I can get it working I wouldn't place any priority on it. So it probably is back to asking the development team to look at it or perhaps one of the guys doing aircraft mods may be able to help get it sorted more quickly. Edited May 7, 2016 by Stonehouse Link to comment Share on other sites More sharing options...
Gnabbla Posted May 9, 2016 Share Posted May 9, 2016 That's unfortunate, but thanks for your efforts. However, I can't understand why this has been designed in such a bad manner. Every plane is different. There is almost no documentation or support available. I would like to propose a rly simple solution. You can define a new "virtual key" in the settings interface pretty similar to the process of adding a modifier. The key is pressed when a set of conditions is met. Example: Keyname: NeutralFlap Condition: JoyButtonX IS_NOT pressed //JoyButtonX the button assigned for LandingFlaps Condition: JoyButtonY IS_NOT pressed //JoyButtonY the button assigned for RetractedFlaps All you need to do now is to select the TakeOff-Flap category and assign the "NeutralFlap" Button which can be selected via some DropDown list or sth. like that. FIN! Shouldn't be that hard to implement, right? Link to comment Share on other sites More sharing options...
Kelevra Posted May 9, 2016 Author Share Posted May 9, 2016 That's unfortunate, but thanks for your efforts. However, I can't understand why this has been designed in such a bad manner. Every plane is different. There is almost no documentation or support available. I would like to propose a rly simple solution. You can define a new "virtual key" in the settings interface pretty similar to the process of adding a modifier. The key is pressed when a set of conditions is met. Example: Keyname: NeutralFlap Condition: JoyButtonX IS_NOT pressed //JoyButtonX the button assigned for LandingFlaps Condition: JoyButtonY IS_NOT pressed //JoyButtonY the button assigned for RetractedFlaps All you need to do now is to select the TakeOff-Flap category and assign the "NeutralFlap" Button which can be selected via some DropDown list or sth. like that. FIN! Shouldn't be that hard to implement, right? The thing is : if I am here today it is initially because of the DCS flag ship : the A-10C. and as such like many here, I am using the TM HOTAS-Warthog. By now I have come to like other aircraft. But, I don't change of stick for every plane I fly. :joystick: It would be just nice if the TMHW was more easy to use with other aircraft as it is for the A10-C. That's all.:music_whistling: Link to comment Share on other sites More sharing options...
Redglyph Posted May 20, 2018 Share Posted May 20, 2018 Was there any response from ED on this? Or is this supported now in 2.5? It seems to be the same as before in the lua files, unless I missed something. System specs: Win7 x64 | CPU: i7-4770K | RAM: 16 GB | GPU: GTX 980 Ti 6 GB | Thrustmaster HOTAS | MFG rudder pedals | SATA3 SSD | TrackIR Link to comment Share on other sites More sharing options...
LeCuvier Posted May 20, 2018 Share Posted May 20, 2018 3-Position switch for flaps control This is easy because fortunately the developer has provided 3 distinct commands which can be easily combined into a maintained 3-position switch like the flaps switch on the TMWH throttle. The following 2 lines need to be added to either the "default.lua" or, if you have the TMWH throttle, the "Throttle - HOTAS Warthog.lua": {down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 1, value_up = 2, name = _('Flaps 3-Pos FLIGHT/TAKEOFF'), category = {_('Flight Control'), _('Left Console')}}, {down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 3, value_up = 2, name = _('Flaps 3-Pos LAND/TAKEOFF'), category = {_('Flight Control'), _('Left Console')}},This will add 2 new command options. Bind the command "Flaps 3-Pos FLIGHT/TAKEOFF" to the "UP" (or "Flight") switch and "Flaps 3-Pos LAND/TAKEOFF" to the "DN" (or "Land") switch. That's all. PS: I recommend that questions of this nature be posted in the thread How to set up toggle switches (a tutorial) in the sub-forum "Input and Output". I monitor this thread closely and therefore I can respond faster. 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 More sharing options...
Redglyph Posted May 20, 2018 Share Posted May 20, 2018 Thanks! Works like a charm :thumbup: I hope ED read this one day and add that to their setup. System specs: Win7 x64 | CPU: i7-4770K | RAM: 16 GB | GPU: GTX 980 Ti 6 GB | Thrustmaster HOTAS | MFG rudder pedals | SATA3 SSD | TrackIR Link to comment Share on other sites More sharing options...
Cotoi Posted May 20, 2018 Share Posted May 20, 2018 To be honest I don't even try anymore. 2 years a go I spent 1 week just to make that flaps to work and nothing. It turns out they changed something in DCS and you couldn't do it anymore. It would be a nice feature to have and really easy to implement, but also one we would never get [sIGPIC][/sIGPIC] i7 5820K, 32GB DDR4, 3x250GB SSD RAID0, nVidia GTX 1080, Thrustmaster Warthog Throttle, Virpil WarBird base with Thrustmaster Warthog grip, MFG Crosswind rudder pedals - 2484. Link to comment Share on other sites More sharing options...
Redglyph Posted May 20, 2018 Share Posted May 20, 2018 To be honest I don't even try anymore. 2 years a go I spent 1 week just to make that flaps to work and nothing. It turns out they changed something in DCS and you couldn't do it anymore. It would be a nice feature to have and really easy to implement, but also one we would never get LeCuvier's patch works fine, and I don't think those files will change anytime soon now that this module is stable so it should be pretty safe :) Except we'll have to re-install it after every update. What I gave up is trying to provide the devs with patches, I had a full fix for the A-10C's switches that are a real mess (you never know if you have to left or right-click, rotate up or down), it was fully tested with all the information ... and it never went through. Even bug reports are ignored most of the time so I had enough frustration for now, at least for a few months or years ;) System specs: Win7 x64 | CPU: i7-4770K | RAM: 16 GB | GPU: GTX 980 Ti 6 GB | Thrustmaster HOTAS | MFG rudder pedals | SATA3 SSD | TrackIR Link to comment Share on other sites More sharing options...
AntiBird Posted May 17, 2022 Share Posted May 17, 2022 20.05.2018 в 16:53, LeCuvier сказал: 3-Position switch for flaps control This is easy because fortunately the developer has provided 3 distinct commands which can be easily combined into a maintained 3-position switch like the flaps switch on the TMWH throttle. The following 2 lines need to be added to either the "default.lua" or, if you have the TMWH throttle, the "Throttle - HOTAS Warthog.lua": {down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 1, value_up = 2, name = _('Flaps 3-Pos FLIGHT/TAKEOFF'), category = {_('Flight Control'), _('Left Console')}}, {down = iCommandPlaneFlaps, up = iCommandPlaneFlaps, value_down = 3, value_up = 2, name = _('Flaps 3-Pos LAND/TAKEOFF'), category = {_('Flight Control'), _('Left Console')}}, This will add 2 new command options. Bind the command "Flaps 3-Pos FLIGHT/TAKEOFF" to the "UP" (or "Flight") switch and "Flaps 3-Pos LAND/TAKEOFF" to the "DN" (or "Land") switch. That's all. PS: I recommend that questions of this nature be posted in the thread How to set up toggle switches (a tutorial) in the sub-forum "Input and Output". I monitor this thread closely and therefore I can respond faster. How about (on) -off- (on) switch? Link to comment Share on other sites More sharing options...
LeCuvier Posted May 18, 2022 Share Posted May 18, 2022 9 hours ago, AntiBird said: How about (on) -off- (on) switch? Can you state explicitly what you mean? I would consider both the FLAPS switch and the Autopilot switch on the TM Warthog throttle as maintained 3-position ON-OFF-ON switches 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 More sharing options...
AntiBird Posted May 18, 2022 Share Posted May 18, 2022 (edited) 9 минут назад, LeCuvier сказал: Can you state explicitly what you mean? I would consider both the FLAPS switch and the Autopilot switch on the TM Warthog throttle as maintained 3-position ON-OFF-ON switches I want to use (ON) -OFF- (ON) that is not fixed. You need to cycle through the position of the flaps when you press one of the ON positions. you need to separate the flaps control by two buttons: down, up. Edited May 18, 2022 by AntiBird Link to comment Share on other sites More sharing options...
Recommended Posts