Jump to content

Closing A-10C Canopy w/ New 28157 Update


nickos86

Recommended Posts

I don't know ED's plan for fixing this, so I fixed it myself. Updated Canopy bindings are in my tutorial thread: https://forum.dcs.world/topic/270080-lua-editing-for-additional-key-binds-tutorial-no-discussion-here-please/#elControls_4691602_menu

It includes bindings for 3 pushbuttons (OPEN, HOLD, CLOSE), a 3-positions switch, and for a 2-position switch OPEN/CLOSE.

 

  • Thanks 3

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

2 hours ago, LeCuvier said:

I don't know ED's plan for fixing this, so I fixed it myself. Updated Canopy bindings are in my tutorial thread: https://forum.dcs.world/topic/270080-lua-editing-for-additional-key-binds-tutorial-no-discussion-here-please/#elControls_4691602_menu

It includes bindings for 3 pushbuttons (OPEN, HOLD, CLOSE), a 3-positions switch, and for a 2-position switch OPEN/CLOSE.

 

Wait, did you change them?  I had tried injecting the commands from your post last week, and OPEN and HOLD worked, but not CLOSE


Edited by jaylw314
Link to comment
Share on other sites

Hello,,

Is it just me, or is there an issue when trying to close the A-10C canopy with the keybind LCTRL + C. Anyone else seeing this? 

Closing still works with the in-cockpit switch; I've dbl-checked my keybind in controls, and all is good there.

If it's just me, does anyone have any ideas as to what might be the issue?

 

Thanks,

Mike


Edited by orbmis
Link to comment
Share on other sites

  • orbmis changed the title to Closing A-10C Canopy w/ New .28157 Update
1 hour ago, jaylw314 said:

Wait, did you change them?  I had tried injecting the commands from your post last week, and OPEN and HOLD worked, but not CLOSE

 

Yes I had to change them because the "CLOSE" didn't work any more. ED changed the object I'm using in "clickabledata.lua".

  • Thanks 2

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

  • orbmis changed the title to Closing A-10C Canopy w/ New 28157 Update
On 8/4/2022 at 12:27 PM, LeCuvier said:

I don't know ED's plan for fixing this, so I fixed it myself. Updated Canopy bindings are in my tutorial thread: https://forum.dcs.world/topic/270080-lua-editing-for-additional-key-binds-tutorial-no-discussion-here-please/#elControls_4691602_menu

It includes bindings for 3 pushbuttons (OPEN, HOLD, CLOSE), a 3-positions switch, and for a 2-position switch OPEN/CLOSE.

 

Sorry, but a bit confused on this. On the A-10C, I'm not exactly sure which type switch it utilizes. I believe it is a 3-positions switch.

If that is correct, then...

   =====  For use with a 3-position switch, bind the commands "Canopy OPEN/HOLD" and "Canopy CLOSE/HOLD"  ===

Would that mean I would only need to include 2 of the command lines, i.e. 1 for the OPEN/HOLD, and another for CLOSE/HOLD? 

I'm still rather new at this; I've reviewed the control bindings pdf document, but trying to get my arms around it.

Thanks for your help...much appreciated.

 

Mike

 

Link to comment
Share on other sites

@orbmis Correct. The 2 lines you refer to will work with a "normal" 3-way switch (ON1-OFF-ON2). If neither ON1 nor ON2 is active, then HOLD mode is engaged.

Note: The switch in the simulated cockpit is a special 3-position switch. The positions OPEN and HOLD are stable, but the position CLOSE returns to hold when you release it.
The airbrake switch on the Warthog throttle behaves like that, but that's already in use.
The 2 lines you refer to will also work with this special 3-way switch if you have one to spare.

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

@LeCuvier

Thanks for the response. I guess I didn’t make my intention clear in my post. if I wanted to simply do a setup for a keyboard binding, to get the canopy operation to function via the normal LCTRL+C, I would need to set up for 2 commands? One for the OPEN/HOLD 3007, & one for the CLOSE 3006? I just don’t see which 2 entries I would use in that scenario. Or was your suggested 5 line command strictly for a joystick solution

Thanks Again,

Mike


Edited by orbmis
Link to comment
Share on other sites

1. the bindings I created, with the exception of "Canopy 2-Pos OPEN/CLOSE" can be used with HOTAS buttons/switches as well as keyboard keys.
The commands you want to use with the keyboard must be inserted into the "default.lua" under "...\Mods\aircraft\A-10C_2\Input\A-10C_2\keyboard".

2. I cannot create a single command that toggles between OPEN and CLOSE. As a minimum, you have to use two key bindings. You have some choices, I will explain what each of the following commands do.
2.1 Open only. When you push the bound key, the switch goes to "Open" and the canopy will open all the way:

{down = 3007, cockpit_device_id = devices.CPT_MECH, value_down = 1.0,	name = _('Canopy OPEN'), category = _('Systems')},

2.2 Open/Hold. As long as you push the bound key the switch stays in "Open" and the canopy continues to open. As soon as you release the bound key the switch goes to "Hold" and the canopy stops moving:

{down = 3007, up = 3007, cockpit_device_id = 39, value_down = 1.0, value_up = 0.0, name = _('Canopy OPEN/HOLD'), category = _('Systems')},

2.3 Close/Hold. As long as you push the bound key the switch stays in "Close" and the canopy continues to close. As soon as you release the bound key the switch goes to "Hold" and the canopy stops moving:

{down = 3006, up = 3007,cockpit_device_id = devices.CPT_MECH, value_down = 0.0,	value_up = 0.0, name = _('Canopy CLOSE/HOLD'), category = _('Systems')},

So you can use 2.1 with 2.3 or 2.2 with 2.3.
The combination of 2.1 with 2.3 is how the switch in the cockpit works. So that would be my preferred solution.

I hope this is clear enough.

Hans-Werner

 

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

Hello again,,

Thank You for the detailed reply. It certainly makes it easier, and I kind of feel better that it wasn’t a simple solution. I was starting to question myself as to why I couldn’t grasp the solution.

But one thing I noticed is that you recommend putting the commands directly into the Mods structure, rather than into the <user>/saved games folder structure. Is there any special reason for that?

And finally, kind of off-topic, but a Lua question… I’ve noticed that some commands use a name section with name =_(‘xxxx’), while others I’ve seen do not use the underscore _    Could you possibly explain?

Thank You again for the help… you’ve been extremely helpful !! Much appreciated !!

Mike

 

 

Link to comment
Share on other sites

1. Why not in "Saved games" structure?
These "default.lua" files reside in the Mods structure. Somebody has come up with a smart "Mods injector" that puts the additions into the "Saved games" structure, using complex additions to another file that I don't understand and therefore don't feel comfortable with.

2. Names in the A-10C II and most other modules I remember have the structure you mention, and so I use that structure.
If I'm modifying a file for a module using a different structure then I use that structure for additions to that file. But frankly, I cannot rember the last time I used a different structure.

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

Just an update, that I inserted the binding entries for the canopy into the Mods .lua file, and it worked perfectly. Thanks again for your help!

Now that I’ve got it working, it’s time to create a spreadsheet, so that I can keep track of changes that are made. I’m certainly anticipating that updates to DCS will tend to rebuild those files, effectively removing any custom additions/changes.

take care.


Edited by orbmis
Link to comment
Share on other sites

20 minutes ago, orbmis said:

Just an update, that I inserted the binding entries for the canopy into the Mods .lua file, and it worked perfectly. Thanks again for your help!

Now that I’ve got it working, it’s time to create a spreadsheet, so that I can keep track of changes that are made. I’m certainly anticipating that updates to DCS will tend to rebuild those files, effectively removing any custom additions/changes.

take care.

 

This tool is pretty handy at keeping your custom input commands from being lost when DCS updates

https://github.com/Quaggles/dcs-input-command-injector

 


Edited by Baldrick33
  • Like 1

AMD 5800X3D · MSI 4080 · Asus ROG Strix B550 Gaming  · HP Reverb Pro · 1Tb M.2 NVMe, 32Gb Corsair Vengence 3600MHz DDR4 · Windows 11 · Thrustmaster TPR Pedals · VIRPIL T-50CM3 Base, Alpha Prime R. VIRPIL VPC Rotor TCS Base. JetSeat

Link to comment
Share on other sites

  • Recently Browsing   0 members

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