Jump to content

How to set up toggle switches (a tutorial)


Recommended Posts

Can anyone let me know how to setup a three position switch for the new vr zoom? I want to use the pinky switch on my warthog throttle. Full back-normal view, middle-vr zoom, forward-spyglass zoom....

I have found, in the file "...\Eagle Dynamics\DCS World OpenBeta\Config\Input\UiLayer\joystick\default.lua", 3 new VR-related commands:

- toggle VR Zoom

- toggle VR Spyglass Zoom

- recenter VR Headset

Are these the commands you want to combine on a 3-position switch?

If yes, please provide desired switch position for each of the commands. I will then create a modified version of the file for you to test (because I don't have VR).

Edit: actually, only the "Spyglass Zoom" is new. The 2 other commands already existed in the previous version (still in stable version)


Edited by LeCuvier

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

I have found, in the file "...\Eagle Dynamics\DCS World OpenBeta\Config\Input\UiLayer\joystick\default.lua", 3 new VR-related commands:

- toggle VR Zoom

- toggle VR Spyglass Zoom

- recenter VR Headset

Are these the commands you want to combine on a 3-position switch?

If yes, please provide desired switch position for each of the commands. I will then create a modified version of the file for you to test (because I don't have VR).

Edit: actually, only the "Spyglass Zoom" is new. The 2 other commands already existed in the previous version (still in stable version)

So I think that's the problem, I only want to use two of them. I want the picky switch aft to be normal view. Pinky switch middle (off) to be VR zoom. Then have pinky switch forward be spyglass zoom if possible.

 

Sent from my SM-N975U using Tapatalk

Link to comment
Share on other sites

...I want the picky switch aft to be normal view. ...

And what's the command for "Normal View"? Isn't it the "recenter VR headset"?

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

And what's the command for "Normal View"? Isn't it the "recenter VR headset"?
That's the problem, since DCS does the VR zoom as toggles, there isn't a normal view command, you just toggle off the VR zoom.

 

Sent from my SM-N975U using Tapatalk

Link to comment
Share on other sites

That's the problem, since DCS does the VR zoom as toggles, there isn't a normal view command, you just toggle off the VR zoom.

 

Sent from my SM-N975U using Tapatalk

What exactly does the "recenter VR Headset" do? Just re-center the view, or also "normalize" the zoom?

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

It only recenters the view, you can do it while still zoomed in.

 

Sent from my SM-N975U using Tapatalk

While you use VR, does the Num ENTER key re-set your VR zoom?

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

well, I see no solution then.

Maybe you should post a request under bugs/problems for this functionality gap.

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...
Can anyone let me know how to setup a three position switch for the new vr zoom? I want to use the pinky switch on my warthog throttle. Full back-normal view, middle-vr zoom, forward-spyglass zoom.

 

Thanks!

 

 

Sent from my iPad using Tapatalk Pro

 

 

So I was actually able to get somewhat close to this functionality. With this code aft on the pinky switch is unzoomed, then it'll toggle VR Zoom when the pinky switch is moved from aft to middle, and then toggle spyglass when going from middle to forward.

 

Unfortunately, I cannot get it to toggle from spyglass zoom at the forward position back to VR Zoom at the middle position. Going from forward to middle on the switch just sets the view back to the normal unzoomed setting.

 

 

{category = vr , down = iHeadTrackerZoomToggle         , up = iHeadTrackerZoomToggle , value_down = 0.0 , value_up = 1.0 , name = ('Custom Toggle VR Zoom')},
{category = vr , down = iHeadTrackerSpyglassZoomToggle , up = iHeadTrackerZoomToggle , value_down = 1.0 , value_up = 0.0 , name = ('Custom Toggle VR Spyglass Zoom')}, 

I've tried a few different things here, but it seems that you just can't toggle a different setting when releasing a switch right now.


Edited by BobFlex
Link to comment
Share on other sites

  • 2 weeks later...
So I was actually able to get somewhat close to this functionality. With this code aft on the pinky switch is unzoomed, then it'll toggle VR Zoom when the pinky switch is moved from aft to middle, and then toggle spyglass when going from middle to forward.

 

Unfortunately, I cannot get it to toggle from spyglass zoom at the forward position back to VR Zoom at the middle position. Going from forward to middle on the switch just sets the view back to the normal unzoomed setting.

 

 

{category = vr , down = iHeadTrackerZoomToggle         , up = iHeadTrackerZoomToggle , value_down = 0.0 , value_up = 1.0 , name = ('Custom Toggle VR Zoom')},
{category = vr , down = iHeadTrackerSpyglassZoomToggle , up = iHeadTrackerZoomToggle , value_down = 1.0 , value_up = 0.0 , name = ('Custom Toggle VR Spyglass Zoom')}, 

I've tried a few different things here, but it seems that you just can't toggle a different setting when releasing a switch right now.

 

 

Have you tried changing the value up to 1.0 on the second line? That should give you the result you're after. Value up is essentially the 'off' position but you need it to be the 'on' position for VR zoom.

 

 

 

So:

 

 

 

{category = vr , down = iHeadTrackerZoomToggle         , up =  iHeadTrackerZoomToggle , value_down = 0.0 , value_up = 1.0 , name =  ('Custom Toggle VR Zoom')},
{category = vr , down = iHeadTrackerSpyglassZoomToggle , up =  iHeadTrackerZoomToggle , value_down = 1.0 , value_up = 1.0 , name =  ('Custom Toggle VR Spyglass Zoom')}, 


Edited by jalfrezi

Intel Core i9 9900K 5.0GHz · Gigabyte GeForce RTX 2080 SUPER · Gigabyte Z390 AORUS PRO · Alienware 34" AW3418DW · Corsair 2TB M.2 NVMe · 64Gb Corsair Vengeance 3200MHz DDR4 · Windows 10 · TM HOTAS Warthog · VPC ACE-2 Rudder Pedals · VPC V.F.X Grip · VPC MongoosT-50CM2 Grip · Virpil WarBRD base · HP Reverb Pro · 3x TM MFD · Buddy-Fox A-10 UFC · 2x LG Throttle Quadrants · LG Switch Panel · LG Multi Panel · LG Radio Panel · Buttkicker Gamer & JetSeat

 

Nick Jennings

Link to comment
Share on other sites

You are not telling us which aircraft this is for. So I cannot test what I think.

 

However, I did a search across all the modules I have and I did not see any case where the "iCommandPlaneGear" uses the value_down and/or value_up expressions. Normally the iCommandPlaneGear command toggles between UP and DOWN.

For the F/A-18C I have created this line of code to do exactly what you want:

{down = iCommandPlaneGearUp, up = iCommandPlaneGearDown, name = _('Landing Gear Control Handle 2-Pos UP/DOWN'),    category = {_('Left Vertical Panel')}},

That same line would probably work with some other aircraft as well, but the "Category" should be changed of course.

Going forward, please make sure you indicate which aircraft you are looking at!

 

If someone could guide me how to implement this that would be great! I'm sure there is a guide in here explaining it a little more but I can't find it and this is exactly what I want it to do.

 

Many thanks to all of you who help poor struggling people like me!!

 

-Sko

Link to comment
Share on other sites

So I was actually able to get somewhat close to this functionality. With this code aft on the pinky switch is unzoomed, then it'll toggle VR Zoom when the pinky switch is moved from aft to middle, and then toggle spyglass when going from middle to forward.

 

Unfortunately, I cannot get it to toggle from spyglass zoom at the forward position back to VR Zoom at the middle position. Going from forward to middle on the switch just sets the view back to the normal unzoomed setting.

 

 

{category = vr , down = iHeadTrackerZoomToggle         , up = iHeadTrackerZoomToggle , value_down = 0.0 , value_up = 1.0 , name = ('Custom Toggle VR Zoom')},
{category = vr , down = iHeadTrackerSpyglassZoomToggle , up = iHeadTrackerZoomToggle , value_down = 1.0 , value_up = 0.0 , name = ('Custom Toggle VR Spyglass Zoom')}, 

I've tried a few different things here, but it seems that you just can't toggle a different setting when releasing a switch right now.

Thank you!!!!! I totally missed this earlier. It isn't perfect but it's so much better than the stock way. I tried changing the 1 like was recommended but that didn't go back to standard zoom either, stays at Spyglass until I go to normal, but still, THANK YOU!!!

 

Sent from my SM-N975U using Tapatalk

Link to comment
Share on other sites

  • 2 weeks later...
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

{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

[sIGPIC][/sIGPIC]

 

my DCS World - Ka50 Pit Project: :pilotfly:

http://www.ka50.de

Link to comment
Share on other sites

...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

Link to comment
Share on other sites

...F/A-18C Parking Brake, twist & Pull in one pulsed action

{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:

{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:

{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

Link to comment
Share on other sites

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.

[sIGPIC][/sIGPIC]

 

my DCS World - Ka50 Pit Project: :pilotfly:

http://www.ka50.de

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 weeks later...

Hello! help please adjust the switch to two positions up and down. bf-109

 

 

Stick Buttons --------------------------------------------------------------------------

-- Trigger Buttons

{ down = device_commands.Button_74, cockpit_device_id = devices.FUSEBOX, value_down = 1.0, name = _('Input.Bf109K4.safety'), category = _('Stick')},

{ down = iCommandPlaneFire, up = iCommandPlaneFireOff, name = _('Input.Bf109K4.trigger_a'), category = _('Stick')},

{ down = iCommandPlanePickleOn, up = iCommandPlanePickleOff, name = _('Input.Bf109K4.trigger_b1'), category = _('Stick')},

{ down = device_commands.Button_53, up = device_commands.Button_53, cockpit_device_id = devices.FUSEBOX, value_down = 1.0, value_up = 0.0, name = _('Input.Bf109K4.trigger_b2'), category = _('Stick')},

{ down = device_commands.Button_54, up = device_commands.Button_54, cockpit_device_id = devices.FUSEBOX, value_down = 1.0, value_up = 0.0, name = _('Input.Bf109K4.trigger_t'), category = _('Stick')},

 

-- Charge Button

{ down = device_commands.Button_55, up = device_commands.Button_55, cockpit_device_id = devices.FUSEBOX, value_down = 1.0, value_up = 0.0, name = _('Input.Bf109K4.trigger_d'), category = _('Stick')},

432124626_Inked_LI.jpg.f9cebe963dde69808de6913ff73cf2b7.jpg


Edited by oltim

Система 10 про. Железяки: Мать Z690M, ccd m2 500gb,  i5 12600, 3090 24gb., DDR4 64gb (2667), монитор LG C1 4K 120Hz 55, Opentrack.

Link to comment
Share on other sites

Hello! help please adjust the switch to two positions up and down. bf-109

Which command? You have listed 6 commands, most of which have up and down defined. Also, can you state briefly what the purpose is?

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

I have listed the handle block of the handle, where the desired command is located, you need to configure the safety bracket to raise, lower (enable, disable).

576585692_Inked_LI.thumb.jpg.7f804db9e03b1fc9d990e137dce43e62.jpg


Edited by oltim

Система 10 про. Железяки: Мать Z690M, ccd m2 500gb,  i5 12600, 3090 24gb., DDR4 64gb (2667), монитор LG C1 4K 120Hz 55, Opentrack.

Link to comment
Share on other sites

Hi,

I hope this has not been already asked / discussed, but I could not find any useful resources for that:

 

When configuring a "switch" (NOT a modifier), this can serve as some sort of "Mode" behaviour, where I can map one single button to act as different functions, depending on the "Mode".

Lets say one button can be for Weapon Release when the switch is off and as a Flaps toggle when the switch is on.

That works, all good.

But is there a way to get any indication in which "mode" the switch currently is?

Something like showing a small text message?

 

Not afraid of LUA scripting..

 

Thanks

Link to comment
Share on other sites

  • Recently Browsing   0 members

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