Jump to content

Recommended Posts

Posted

Hi All,

 

I've mapped a few toggle switches from my Thrustmaster Warthog throttle for the P-51D.

 

In general, this works fine.

I edit the lua file and with some experimentation find the proper commands and values for up and down positions of the switches.

 

For example, the Rear Warning Radar is mapped to the RDR ALTM toggle like so:

 

{combos = {{key = "JOY_BTN25"}, }, down = 3002, up = 3001, cockpit_device_id = 25, value_down = 1, value_up = 0, name = "Rear warning radar Power", category = "Rear Warning Radar"},

 

In the example above I experimented to discover that I needed up set to a different number than down. Don't know for sure if I really need the value_up set to 0, but this is what works.

 

The nice thing about the above setup is that regardless of my toggle switch position at startup, toggling it will get it in sync with the sim.

 

My question/problem.

 

I'd like to do the same thing for the Fuel Booster toggle switch.

However, it looks like it doesn't have a separate command ID, and it seems to ignore the value set, so it functions as an ON/OFF toggle, REGARDLESS of what I set for value_up and value_down to.

 

For example, my current attempt at it:

 

{combos = {{key = "JOY_BTN16"}, }, down = 3006, up = 3006, cockpit_device_id = 15, value_down = 1, value_up = 0, name = "Fuel Booster", category = "Engine Control Panel"},

 

The problem with this two-fold. If it is out of sync at the start, then it won't go back into sync (so turning the toggle off turns the Fuel Booster on, etc.)

Worse, SOMETIMES if I have the toggle switch ON at the start (meaning in the down state), the P-51D seems to read it at startup and toggles the Fuel Booster off.

 

This is kind of bad when you do an instant action, start in mid air, and have your fuel booster turn off and your engine die...

 

So, is there some other way I can do this with a toggle switch? Some undocumented ID I can use for "up?" A different set of numbers to plug into value_up and value_down?

 

Thanks in advance for any suggestions.

Posted

Hi,

 

The question is : are the toggle switches equal to normal joystick-push-buttons ?

 

Normal joystick-push-buttons ( bound to a command in options\controls\p51 real ) seems to have only one input to DCS - pushed ( what with parameters ) and not up / down / next / ...

 

Nothing - pushed ( = down ? ) - back to nothing

 

:music_whistling: Elsewhere in the deep of DCS follows the reaction :

toggle switch position / command

 

This works for on / off or rotary - only down ! no up or next !

 

C:\Users\123\Saved Games\DCS\Config\Input\P-51D\joystick\Saitek X52 Flight Controller {71049520-E3F3-11e2-8005-444553540000}.lua

 

{combos = {{key = "JOY_BTN9"}, }, down = 3002, cockpit_device_id = 25, value_down = 1, name = "Rear warning radar Power", category = "Rear Warning Radar"},

 

{combos = {{key = "JOY_BTN10"}, }, down = 3006, cockpit_device_id = 15, value_down = 1, name = "Fuel Booster", category = "Engine Control Panel"},

 

{combos = {{key = "JOY_BTN10"}, }, down = 3019, cockpit_device_id = 13, value_down = 1, name = "Bomb-rocket selector switch (rotary)", category = "Front Switch Box"},

Posted

If you want you can have a look at my Input Config in my signature for the P-51D. I use a lot of the 2 and 3-way switches on my TM Warthog to start up and operate the P-51D. I think you can do a full startup with the HOTAS (did not fly it for a while), apart from the Battery switch.

Posted

Thanks for the profile. I've already created something similar, with a bit of lua editing as well, but I'm happy to use some of your setup!

 

However, my real question is how to figure out in the lua files which of the planes toggle switches or rotary dials can be properly mapped to their multiple states, meaning that they have either multiple Command values, or different value_down and value_up settings, or both.

 

Examples of this working:

 

The A-10C EAC Arm/Off toggle has two separate command values. So you can map your physical (single-throw) toggle switch in the lua with:

 

down = iCommandPlane_EAC_ARM,

up = iCommandPlane_EAC_OFF,

The A-10C Anti-Collicion Lights switch has both different command values and different value_up and value_down:

 

down = 3010,

up = 3011,

value_down = 1,

value_up = -1,

 

As I said, with some experimentation, I determined that the P-51D Rear Warning Radar also works like this, with:

 

down = 3002,

up = 3001,

value_down = 1,

value_up = 0,

 

This means, that even if my toggle is out of sync with the plane's toggle, going back and forth with it will get it in sync. Note that neither the up= or the value_up= were documented.

 

The problem is that some things, like the P-51D Fuel Booster, seem to only have a single iCommand value, and though I can set value_down = 1 and value_up = 0 for it, setting EITHER value just toggles the state of plane's toggle to it's opposite state. Thus, if my toggle switch is set to OFF, and the planes starts out as ON, then turning my toggle ON turns the plane's toggle OFF...

 

The "Synchronize with HOTAS" option doesn't fix this. Instead, it (sometimes, but not always??) will see that my physical toggle switch is ON, and will take that to mean that it should turn the plane's toggles switch OFF!

 

The best way I could work with this would be if there was a list of the controls per plane that specified if the control could only work as a toggle (like the Fuel Booster) and if it could work as more than that, specified the valid values (and their function) for:

 

up

down

value_up

value_down

 

Note that the A-10C lua files seem to be pretty fully specified, with actual iCommand names for most up and down values, making this much easier. It's the P-51D and UH-1H that are, um, rather difficult to interpret.

 

These have got to be documented somewhere. Here's hoping the documentation comes to light!

Posted (edited)

Sorry for the late response, I wanted to test something first before replying.

I fired up my P-51D now with my profile and this is how it works for me:

 

When my Fuel Booster Switch on the HOTAS (APU Start for me) is ON when I start the Sim, the Switch is also ON in the Game. When I start the Game with the Switch in the OFF position on the HOTAS, it´s also OFF in the game.

 

BUT!!! It does not work like this with all the Switches. Yes, I have the Synchronize with HOTAS on in the Game options and several months ago I posted in the Bug section that the option is not working for all switches. And this might be your problem here maybe.

 

On the other hand, when I have switches which are not synchronized, this is what happens for me:

HOTAS switch is on, although the Sim starts with the Switch in the Pit set to off. When I flip my switch on the Hotas from on to off, the switch in the Pit does NOT move for me. When I flip the switch on the Hotas from off to on now, the switch in the pit is set to on.

In short: When my switches are not synchronized by the game when I start the sim, the first flip of the switch is doing nothing in the Pit on the first flip when they were not synchronized.

 

What I do is using a small checklist to set the switches before I enter the plane. Or when I forget it it´s not a big deal, then some switches will just do nothing when I flip them the first time.

 

But I did not see the problem you have, that they are always out of synch.

 

This is how the Fuel Booster switch looks in my LUA:

{combos = {{key = "JOY_BTN20"}, }, down = 3006, up = 3006, cockpit_device_id = 15, value_down = 1, value_up = 0, name = "Fuel Booster", category = "Engine Control Panel"},

 

It´s the APU Switch on the TM Warthog for me.

 

Don´t ask me how I found out all the switches. I think selected for example Fuel Boost in the Game options and flipped a switch once. Saved the profile and went to the LUA and did the manual work. But I have no Idea anymore how I found out which switches supported 2 states. Maybe I just assumed it was like this and I had luck with my whole profile? Because I cannot remember that I found one switch with the behaviour you described in my profile, so I fear I cannot really help you here other than pointing to my profile. Try it out, if some switches behave different in my profile than yours, you could compare the LUA and maybe post the difference here so it might help others too (me included) in the future.

 

 

Edit: Now that I re-read my line I posted above, I´m probably just lucky. Since the down and up value for the Fuel Booster are the same, I probably was lucky to use the APU button, because this one IS synchronized by the "Synchronize HOTAS with the cockpit" option. And some other switches on the TM Warthog are not. So you did nothing wrong and maybe both of us should jump in the Bug section (again) and ask for a fix of the Synchronize with HOTAS feature.

Edited by buedi
Posted

You were right with your last comment there.

 

I changed my mapping over to use the APU Start (instead of the ENG L Fuel) toggle for the fuel booster and now it doesn't automatically put it out of sync if I start with the switch in the ON position.

 

So there looks to be a definite bug with only some of the HOTAS buttons being synchronized.

 

That's really too bad, as it makes syncing up control panels (I'm planning to build some soon, though mostly for the A-10C) kind of a nightmare, especially as different missions or instant action have you start with different toggle settings.

 

I'll try to add another bug report, and will post if I come up with useful mappings or other solutions.

 

And thanks!

  • Recently Browsing   0 members

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