How to set up toggle switches (a tutorial) - Page 65 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 12-03-2019, 06:38 AM   #641
Oldcooltronix
Junior Member
 
Oldcooltronix's Avatar
 
Join Date: Dec 2014
Location: Paderborn
Posts: 99
Default

Quote:
Originally Posted by Fubarbrickdust View Post
I made an interesting discovery while messing about with input default.lua files the other day...

You can actually include the 'pressed' state with a line of code to combine all 3 input states into one binding.

Works very well with momentary toggles and buttons, or standard toggles that are programmed to send a 'pulse'. And especially useful for in-game switches with covers, you can combine the entire cover and switch actions into one binding.


F/A-18C Parking Brake, twist & Pull in one pulsed action
Code:
{down=gear_commands.EmergParkHandleSelectPark,pressed=gear_commands.EmergParkHandleOnOff,up=gear_commands.EmergParkHandleSelectPark,cockpit_device_id=devices.GEAR_INTERFACE,value_down=1.0,value_pressed=-1.0,value_up=0.0,name=_('Emergency/Parking Brake Handle [3 Action Special] - CCW+Pull'),category=_('[13] Front Left - Vertical Panel')},
I hope some of you find this useful.

Cheers,
Brick.
Thanks, very cool combination. My problem is to release the brake with a button. I have to press it twice to release the brake.

Is there a possibility of programming, so that the brake is released with only one pressure on the button?

Thanks and Greetings
Tronix
__________________


my DCS World - Ka50 Pit Project:
http://www.ka50.de
Oldcooltronix is offline   Reply With Quote
Old 12-03-2019, 10:27 AM   #642
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,603
Default

Quote:
Originally Posted by Oldcooltronix View Post
...Is there a possibility of programming, so that the brake is released with only one pressure on the button?
Tronix
Brick's addition provides single button press action for "Twist CCW and Pull".
You need to bind a second button to the stock command "Emergency/Parking Brake Handle CCW". When you press that button the handle will turn 45° CCW and when you release the button it will turn into the "Emergency" position and Stow. Only a single button press/release is required.
__________________
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
LeCuvier is offline   Reply With Quote
Old 12-03-2019, 10:36 AM   #643
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,603
Default

Quote:
Originally Posted by Fubarbrickdust View Post
...F/A-18C Parking Brake, twist & Pull in one pulsed action
Code:
{down=gear_commands.EmergParkHandleSelectPark,pressed=gear_commands.EmergParkHandleOnOff,up=gear_commands.EmergParkHandleSelectPark,cockpit_device_id=devices.GEAR_INTERFACE,value_down=1.0,value_pressed=-1.0,value_up=0.0,name=_('Emergency/Parking Brake Handle [3 Action Special] - CCW+Pull'),category=_('[13] Front Left - Vertical Panel')},
I hope some of you find this useful.

Cheers,
Brick.
Looking at this line of code, and trying it in the cockpit, it seemed to me that the "up" part does not do anything. I tried two variants that require only 2 actions each:
Variant 1:
Code:
{down=gear_commands.EmergParkHandleSelectPark, up=gear_commands.EmergParkHandleOnOff,cockpit_device_id=devices.GEAR_INTERFACE,value_down=1.0,value_up=-1.0,name=_('Emergency/Parking Brake Handle V2 - CCW+Pull'),category=_('[13] Front Left - Vertical Panel')},
Variant 2:
Code:
{down=gear_commands.EmergParkHandleSelectPark, pressed=gear_commands.EmergParkHandleOnOff, cockpit_device_id=devices.GEAR_INTERFACE,value_down=1.0,value_pressed=-1.0,name=_('Emergency/Parking Brake Handle V3] - CCW+Pull'),category=_('[13] Front Left - Vertical Panel')},
Both seem to do the same as your line. Am I missing something?
__________________
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
LeCuvier is offline   Reply With Quote
Old 12-03-2019, 11:12 AM   #644
Oldcooltronix
Junior Member
 
Oldcooltronix's Avatar
 
Join Date: Dec 2014
Location: Paderborn
Posts: 99
Default

Quote:
Originally Posted by LeCuvier View Post
Brick's addition provides single button press action for "Twist CCW and Pull".
You need to bind a second button to the stock command "Emergency/Parking Brake Handle CCW". When you press that button the handle will turn 45° CCW and when you release the button it will turn into the "Emergency" position and Stow. Only a single button press/release is required.
Exactly that is my problem. Due to the design of the button pressed. I need a function that rotates 45 degrees and then stowed with just a touch of a button.
__________________


my DCS World - Ka50 Pit Project:
http://www.ka50.de
Oldcooltronix is offline   Reply With Quote
Old 12-03-2019, 01:31 PM   #645
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,603
Default

Quote:
Originally Posted by Oldcooltronix View Post
Exactly that is my problem. Due to the design of the button pressed. I need a function that rotates 45 degrees and then stowed with just a touch of a button.
Where is the problem? Just bind a button to the command "Emergency/Parking Brake Handle CCW"and that will do the trick.
__________________
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
LeCuvier is offline   Reply With Quote
Old 12-03-2019, 02:21 PM   #646
Oldcooltronix
Junior Member
 
Oldcooltronix's Avatar
 
Join Date: Dec 2014
Location: Paderborn
Posts: 99
Default

Quote:
Originally Posted by LeCuvier View Post
Where is the problem? Just bind a button to the command "Emergency/Parking Brake Handle CCW"and that will do the trick.
Thank you for your help. I have rebuilt my construction of parking brake lever.
__________________


my DCS World - Ka50 Pit Project:
http://www.ka50.de
Oldcooltronix is offline   Reply With Quote
Reply

Tags
controls, lua, tm warthog, toggle switches, tutorials

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 09:11 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.