Jump to content

HOW TO: Ejection Seat Handle


Shadow912

Recommended Posts

Hi people!

 

As an aside to my FA18 Simpit thread (see below) I wanted to ask if anyone had come up with a way to override the need to 'pull' the ejection seat handle 3 times in controls. I was thinking of using a microswitche to activate the seat but I don't want to have to pull the handle 3 times to activate the ejection process. Does anyone know if the joystick/keyboard lua files can be edited to bypass the 3 pulls/3 button presses?

 

https://forums.eagle.ru/showthread.php?t=243783

 

Dave 'Shadow912' S

Sinclair ZX81 - 1K RAM - 16K Wobbly Ram Pack - Tape Drive - Kempston Joystick :helpsmilie:

Link to comment
Share on other sites

Maybe three microswitches work? All in parallel on seperate inputs which actuate together as you pull your ejection lever.

 

 

Not sure if the sim recognises three inputs on the ejection command as a valid eject command... Worth a try, you can do that quite quickly using keyboard commands.

Link to comment
Share on other sites

Maybe three microswitches work? All in parallel on seperate inputs which actuate together as you pull your ejection lever.

 

 

Not sure if the sim recognises three inputs on the ejection command as a valid eject command... Worth a try, you can do that quite quickly using keyboard commands.

 

You mean like this? I guess it would work... :thumbup:

Eject.thumb.JPG.4ac33b94366bde0df4b8d60450435363.JPG

Sinclair ZX81 - 1K RAM - 16K Wobbly Ram Pack - Tape Drive - Kempston Joystick :helpsmilie:

Link to comment
Share on other sites

If you get an Arduino Nano you may be able to solve with this;

 

/*
 Tell DCS-BIOS to use a serial connection and use interrupt-driven
 communication. The main program will be interrupted to prioritize
 processing incoming data.

 This should work on any Arduino that has an ATMega328 controller
 (Uno, Pro Mini, many others).
*/
#define DCSBIOS_IRQ_SERIAL

#include "DcsBios.h"

/* paste code snippets from the reference documentation here */
const int ejectionPin = 5; // the pin you have added ejection handle

int buttonState = 0;         // current state of the switch
int lastButtonState = 0;     // previous state of the switch

void setup() {
 DcsBios::setup();
 pinMode(ejectionPin, INPUT_PULLUP); //sets pin no 5 as input with internal pullup
}

void loop() {
 buttonState = digitalRead(ejectionPin);
if (buttonState != lastButtonState) {
   // if ejectionPin state is different from last time then check if handle has been pulled
 if (buttonState == LOW) { //handle has been pulled
   sendDcsBiosMessage("EJECTION_HANDLE_SW", "1");
   delay(10);
   sendDcsBiosMessage("EJECTION_HANDLE_SW", "1");
   delay(10);
   sendDcsBiosMessage("EJECTION_HANDLE_SW", "1");
 }
 else { // handle has not been pulled 
     // don't do anything. 
   }
   // Delay a little bit to avoid bouncing
   delay(50);
 }
 // save the current state as the last state, for next time through the loop
 lastButtonState = buttonState;
}

 

Code works after correction

 

Cheers

Hans


Edited by Hansolo
The code didn't work. Missing stuff which has been corrected now
Link to comment
Share on other sites

If you get an Arduino Nano you may be able to solve with this;

 

Hi Han,

 

Unfortunately I'm using LeoBodnar 64BBI boards. I was hoping there might me a 'hack' to LUA files to allow a single button press or I will have to go with the 3 microwitch setup....

Sinclair ZX81 - 1K RAM - 16K Wobbly Ram Pack - Tape Drive - Kempston Joystick :helpsmilie:

Link to comment
Share on other sites

I use joy2key to set a momentary toggle switch to send ctrl e e e as a keyboard command. I created a handle from some thick braided power cable approximately half inch in diameter. My profile pic shows the handle which i wrapped in black and yellow electrical tape. Im not at home to give more detail of my setup. It works flawlessly though.

Win 10 Pro - Intel I7 12700k@4.9ghz water cooled - ASUS TUF Z690 -EVGA RTX 3080 12G Hybrid - EVGA 1000W PSU - 32GB 3200 G-Skill XMP- Reverb G2 -Custom mip and side panels - Leo Bodnar  BBI32x2, BBI64x4 - TM Warthog HOTAS - TM Cougar MFD's x 3 - TM TPR pedals

Link to comment
Share on other sites

Hi Han,

 

Unfortunately I'm using LeoBodnar 64BBI boards. I was hoping there might me a 'hack' to LUA files to allow a single button press or I will have to go with the 3 microwitch setup....

 

Ah my bad. Sorry for the trouble. Looks like Baldawg has a good idea though.

 

Cheers

Hans

Link to comment
Share on other sites

Use my dcsbios library, it is already configured to send the command three times when you trip the switch ;)

 

sorry saw you aren't using dcsbios.

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai, Kola, Afghanistan

Link to comment
Share on other sites

Hi guys, Thanks for all the suggestions. I've not used joy2key before so I'm going to take a look at that using one microswitch and failing that I'll try my 3 microswitch solution.

 

MFTDarkEagle,

 

Maybe... You've drawn the inputs series, I meant in parallel.

Maybe this'll work as well :)

 

I think that was just my dodgy drawing, the switched are definitely in parallel.. This pic shows it correctly..

IMG_0835.thumb.JPG.f43ee3f2af42db0e3b982836a3de9a8f.JPG

Sinclair ZX81 - 1K RAM - 16K Wobbly Ram Pack - Tape Drive - Kempston Joystick :helpsmilie:

Link to comment
Share on other sites

Hi guys, Thanks for all the suggestions. I've not used joy2key before so I'm going to take a look at that using one microswitch and failing that I'll try my 3 microswitch solution.

 

MFTDarkEagle,

 

 

 

I think that was just my dodgy drawing, the switched are definitely in parallel.. This pic shows it correctly..

Still not what I've meant :P

Now it's all wired to a single input.

I mean each switch goes to a seperate input on the leo bodnar board.

Link to comment
Share on other sites

Still not what I've meant :P

Now it's all wired to a single input.

I mean each switch goes to a seperate input on the leo bodnar board.

 

But I wouldn't be able to map the same command to 3 switches on the LeoB board which I would need to do..?

 

attachment.php?attachmentid=213528&stc=1&d=1562746740

 

With my solution pulling the ejection seat handle would activate the same command (LCtrl + E) the 3 times (as each microswitch is triggered) and fire me into oblivion with a slightly compressed spinal column :cry:

 

Willing to be corrected if I'm wrong, it wouldnt be the first time... ask my wife :lol:

 

D

Screenshot_1.thumb.jpg.905cf96d60d67104502781ffc56059bc.jpg

Sinclair ZX81 - 1K RAM - 16K Wobbly Ram Pack - Tape Drive - Kempston Joystick :helpsmilie:

Link to comment
Share on other sites

Just a thought, use a simple voice attack script, set to a button binding rather than voice command.

Have an outstanding day y’all.


Edited by Space Cadet

:pilotfly:

[sIGPIC][/sIGPIC]

 

:gun_smilie:

 

229th Assault Helicopter Battalion - Always Recruiting

 

If you have a passion for helicopter flight simulation and would like to fly in a friendly and supportive online multiplayer environment, then you’ve just put your skids down safely on the right page…!

 

DCS Squadron Recruiting Page for the 229th

https://forums.eagle.ru/showthread.php?t=267081

 

For details see our website at:

http://1stcavdiv.forumotion.net/

Link to comment
Share on other sites

But I wouldn't be able to map the same command to 3 switches on the LeoB board which I would need to do..?

 

 

 

With my solution pulling the ejection seat handle would activate the same command (LCtrl + E) the 3 times (as each microswitch is triggered) and fire me into oblivion with a slightly compressed spinal column :cry:

 

Willing to be corrected if I'm wrong, it wouldnt be the first time... ask my wife :lol:

 

D

You can assign multiple DX-keys (i.e. "joystick buttons") to a single command in the DCS input list.

Link to comment
Share on other sites

Hi guys, Thanks for all the suggestions. I've not used joy2key before so I'm going to take a look at that using one microswitch and failing that I'll try my 3 microswitch solution.

 

MFTDarkEagle,

 

 

 

I think that was just my dodgy drawing, the switched are definitely in parallel.. This pic shows it correctly..

 

I simple hardware solution could be something like this. One micro-switch is activated 3 times. Easy to cut out and make this the center of the sandwich.

 

Edit, I did the drawing quick and just noticed the bottom does not allow enough upward movement, But you get the idea.

1370877635_EjectionhandleDCSForum.thumb.jpg.729b50bfcd8b962f9aa0db5256cb39ea.jpg


Edited by MilesD

Now shipping up to website Pre-Order Form date 2022/06/01

Pre-Order  Form Submission https://pointctrl.com/preorder-form/

PointCTRL Support Discord https://discord.gg/jH5FktJ

PintCTRL Website https://pointctrl.com/

PointCTRLsmall.jpg

Link to comment
Share on other sites

Hi guys, Thanks for all the suggestions. I've not used joy2key before so I'm going to take a look at that using one microswitch

 

JoyToKey do the trick, for the used button/switch set for:

 

Press "L-Ctrl+E" and set "Auto repeat" 3 times (or more) per second.

 

But I test setting 3 different keys (A,S,D) for "Eject" and send then simultaneous with JoyToKey and work, can test just pressing in keyboard. Each key send the "eject" command one time.

 

So if you are using a dedicated USB controller for your ejection handle can waste 3 buttons position - wired all in the same switch, so avoid use software.

 

Eject.jpg

 

 

But since you are build a ejection handle the solution proposed by Miles D is more "elegant", is like your initial simplified but with just one switch. :D

 

 

I was hoping there might me a 'hack' to LUA files to allow a single button press...

 

Thing is that LUA files only define what key/button will execute the command (Eject), the instruction for await 3 keypress is not there, but hard-coded in game code.

 

{combos = {{key = 'E', reformers = {'LCtrl'}}},		down = iCommandPlaneEject,					name = _('Eject (3 times)'),						category = _('Systems')},


Edited by Sokol1_br
Link to comment
Share on other sites

I simple hardware solution could be something like this. One micro-switch is activated 3 times. Easy to cut out and make this the center of the sandwich.

 

Edit, I did the drawing quick and just noticed the bottom does not allow enough upward movement, But you get the idea.

 

Miles!! That's it.... so simple really:doh::doh: I was trying to be too complicated! Thanks!:thumbup::thumbup:

 

i used joytokey , it works perfectly for me . what is your problem with it ?

 

Hi Bullitt..

 

I don't have a problem with it, its just something I've never used...

Sinclair ZX81 - 1K RAM - 16K Wobbly Ram Pack - Tape Drive - Kempston Joystick :helpsmilie:

Link to comment
Share on other sites

Hi Tom

 

Is there no way to do this with DCS-BIOS?

 

Use my dcsbios library, it is already configured to send the command three times when you trip the switch ;)

 

sorry saw you aren't using dcsbios.

 

Yes but I'm not currently using DCSBios... ;)

Sinclair ZX81 - 1K RAM - 16K Wobbly Ram Pack - Tape Drive - Kempston Joystick :helpsmilie:

Link to comment
Share on other sites

Miles!! That's it.... so simple really:doh::doh: I was trying to be too complicated! Thanks!:thumbup::thumbup:

 

 

 

 

Agree Miles a very simple solution, just a consideration though, if you pull it too hard it might not register.

Link to comment
Share on other sites

Agree Miles a very simple solution, just a consideration though, if you pull it too hard it might not register.

 

Now then Mr B!

 

I will try it with different distances between the lugs on the microswitch activator (sounds like something from Star Trek!)... Hopefully I'll find something that works however hard it's pulled.. :D

Sinclair ZX81 - 1K RAM - 16K Wobbly Ram Pack - Tape Drive - Kempston Joystick :helpsmilie:

Link to comment
Share on other sites

There are multiple way to get it working.

We have software (Joy2Key or any other macro software), electromechanical solution like the one from Miles or you could do a small electronic circuit which gives 3 pulses if triggered (Modulo).

Tbh, the software solution is probably the easiest and most stable variant.

If you are already using a programmable electronic controller for the other buttons, you are able to programm it within the "firmware".

Intel I9 10900k @5.1GHz | MSI MEG Z490 Unify | Corsair Vengeance 64GB - 3600MHz | EVGA RTX 3090 FTW3
VPC T-50 Base /w Viper & Hornet Grip | VPC Rotor TCS Pro w/ Hawk-60 Grip | TM TPR
LG C2 42" | Reverb G2 | TIR 5 | PointCtrl | OpenKneeboard

Link to comment
Share on other sites

  • Recently Browsing   0 members

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