Jump to content

Assigning commands to TM Warthog toggle switches/buttons.


davedontmind

Recommended Posts

I'm trying to configure some of the Ka-50 commands on my TM Warthog HOTAS, but I'm not sure how to do it correctly on some of the toggle buttons/switches.

 

For example, I'd like to use the "speedbrake forward" switch on the side of the throttle unit for autopilot on/off, but physically the switch is flipped to the on position and remains there until I move it to the off position, which means in game I have to move the switch forward and back to centre to turn the autopilot on, then repeat that to turn it off; what I'd prefer is to move it to the "on" (forward) position to turn the autopilot on, and return to the "off" (centre) position to turn the autopilot off. Is this possible and, if so, how?

Link to comment
Share on other sites

For example, I'd like to use the "speedbrake forward" switch on the side of the throttle unit for autopilot on/off, but physically the switch is flipped to the on position and remains there until I move it to the off position, which means in game I have to move the switch forward and back to centre to turn the autopilot on, then repeat that to turn it off; what I'd prefer is to move it to the "on" (forward) position to turn the autopilot on, and return to the "off" (centre) position to turn the autopilot off. Is this possible and, if so, how?

 

I think this can't be done by simply editing the button assignments in Options -> Controls.

 

It may be possible by editing the correct .lua files for Black Shark.

 

I did solve this problem (the very same one, indeed :)) by creating a TARGET profile. I use the TARGET script editor, so I don't know how to achieve this in the TARGET GUI.

 

Here's a snippet from my script (it's obviously not PHP, but the syntax highlighting works well with the forum's PHP markup):

 

	
// Speedbrake = Route mode/Descent mode.

// Speed brake forward sets route mode (r) and sets a flag.
MapKey(&Throttle, SPDF, CHAIN(
 PULSE + 'r', 
 EXEC("route_mode_active = 1;")));

// Speed brake middle only resets route mode if the flag is "1".
// The flag is then reset independent of its previous state.
MapKey(&Throttle, SPDM, CHAIN(
 EXEC("if (route_mode_active) ActKey(PULSE + KEYON + 'r');"),
 EXEC("route_mode_active = 0;")));		

// Holding speed brake back = Descent mode.
MapKey(&Throttle, SPDB, 'd');

 

If've attached the complete script for reference.

dcs_bs_yurgon_v01.tmc.txt

  • Like 1
Link to comment
Share on other sites

Aww. I was hoping to avoid Target, because I don't need or want it for the A10 module, so using it for Black Shark would mean having to exit DCS World, start up Target with the right profile, then restart DCS World when I want to switch aircraft.

 

On the other hand, it *is* rather flexible! Thanks very much for the script, I might just give it a go!

Link to comment
Share on other sites

YOu are able to edit the LUA file in order to use the Toggle switches in blackshark with the warthog. and it works great. Just reamber to back up your controler profile after you make it.

 

Can you be more specific? Which LUA file?

And how do I use the toggle switches in Black Shark?

Link to comment
Share on other sites

sure. First you will want to take and assinge all your toggle keys you want to operate within black shark inside the game profile. For istance. one toggle key i have is to turn the laser from off to standby. Find the laser standby switch in the key confige in the game. select it and then flip the toggle swithc. and the game should say such and such switch for the laser standby. And do this for all the toggle switches you want to have in black shark.

 

Then find your Throttle - Hotas Warthog.lua file in the C: drive/user/(username)/Savedgames/DCSBlackShark2/Config/Input/KA-50/Joystick.

 

Open that up with notpad++.

After you have opened up the Notepad++ do a search for the laser standby

 

By defult it should say {combos = {{key = "JOY_BTN25"}, }, down = iCommandPlaneLaserRangerOnOff, name = "Laser standby On/Off switch", category = "Ins Targeting Mode Controls Panel PVR"},

 

then by adding The Red text This will alow the same comand to happen when you flip the toggle switch back. {combos = {{key = "JOY_BTN25"}, }, down = iCommandPlaneLaserRangerOnOff, up = iCommandPlaneLaserRangerOnOff, name = "Laser standby On/Off switch", category = "Ins Targeting Mode Controls Panel PVR"},

 

 

Jesse

  • Like 1
Link to comment
Share on other sites

Aww. I was hoping to avoid Target, because I don't need or want it for the A10 module, so using it for Black Shark would mean having to exit DCS World, start up Target with the right profile, then restart DCS World when I want to switch aircraft.

 

Yeah, I just fully realized this after I'd created my BS TARGET profile.

 

I've already flamed over at SimHQ because of some of the shortcomings of TARGET. I still can't understand why it would force users to combine all their controllers into that virtual device. In retrospect, it's not like ED haven't said for a long time that they wanted to integrate their simulations into what is now known as World.

 

Thanks to the others for all the tips here, I'll sure take a closer look when I rebuild my BS profile without TARGET.

Link to comment
Share on other sites

Target seems quite powerful and flexible, but my biggest gripe with it is that it replaces my separate Joystick & Throttle devices with a single combined virtual device.

 

I understand why it's done that way, but it means that when you're running target your games suddenly see a completely different input device, so settings don't tend to carry over from when you weren't running Target. And due to DirextX limitations, the virtual controller has a limited number of virtual buttons less than the actual number of physical buttons, so you need to emulate keystrokes with the extra buttons.

 

And it's not as slick as other joystick software either, in that you need to manually start the software then load and run the profile you want. Other joystick/mouse utilities I've had in the past just start automatically, sit in the system tray, and run a default profile which you can switch with a quick right-click on the icon. It'd be nice if Target did this too.

Link to comment
Share on other sites

And it's not as slick as other joystick software either, in that you need to manually start the software then load and run the profile you want. Other joystick/mouse utilities I've had in the past just start automatically, sit in the system tray, and run a default profile which you can switch with a quick right-click on the icon. It'd be nice if Target did this too.

 

Regarding this last point. You can start Target and run a profile with one command. I've made shortcuts like this on my desktop for all my profiles:

 

"C:\Program Files (x86)\Thrustmaster\TARGET\x64\TARGETGUI.exe" -r "E:\Thrustmaster\Target scripts\ka-50.tmc"

 

This works for scripts and GUI profiles.

 

When you stop the script it also automatically exits Target. So it's pretty easy to start and stop and switch profiles. And if you don't like to have extra shortcuts on your desktop you can always make a custom toolbar in your taskbar for the shortcuts. :thumbup:

  • Like 1
Link to comment
Share on other sites

Target seems quite powerful and flexible, but my biggest gripe with it is that it replaces my separate Joystick & Throttle devices with a single combined virtual device.

 

I understand why it's done that way, but [...]

 

Well, I don't understand it. :)

 

I don't think it would have been rocket science to make it configurable via TARGET how controllers are seen by the application (like "real", "virtual combined", "virtual as configured in the script").

 

This way, I could easily configure a button or two on the Warthog stick and another button or two on the throttle via TARGET but retain the basic Plug&Play compatibility with A-10C. I could also load a new TARGET profile while in-game (without quitting DCS) as long as both profiles keep the controller names (or possibly HID IDs) identical so that DCS won't even see that anything changed.

 

Regarding this last point. You can start Target and run a profile with one command.

 

Quite an interesting way to do this, good input!

 

But I think what davedontmind was referring to is that other HOTAS hardware will simply keep the profile previously loaded, even after power-off. The F-16 FLCS and Cougar (both by TM just like the Warthog) worked that way. If I play the same sim all the time, I wouldn't even need to load Foxy/TARGET/whatever because the profile was already/still loaded into the device itself.

Link to comment
Share on other sites

Sadly when i tryed to use Target with the update of Blackshark 2 i had lag issues. Sadly with the lag issues of the game to the target software. the target software would not always reconise that i had tossed a toggle switche or push a button, In them cases the switch would never get reconised in the game. This became a major annoyance and drawback as what i do with the joystick would not go into the game. By using the LUA files with in the game to program the toggle switches you due two things. Number 1, Removed the lag issue from the target software where it wouldnt reconize switches being fliped from the throtal to the game. And number 2 when setting up the LUA file for each aircraft you no longer had to alt tab out of the game to switch the target software program for each aircraft as it was already configured in the .LUA file. So from this i can switch from the A10, Blackshark, and P51 with out having to alt tab from multiplayer to switch programs on the target software. To me this is a Win win situation all the way around.

 

Jesse.

Link to comment
Share on other sites

  • 2 months later...

Sorry for resurrecting this thread, but I just got my TM Warthog and I'm reading through all this the first time.

 

Without using the Target software, how does DCS not see a "toggle" switch being continually pressed? Is there a setting in the options to let DCS know whether it's a push button or a toggle switch? or "Press" and "Pulse" in the target software?

 

From the sounds of it, it seems a lot of people choose to use the lua script within DCS instead of using the target software. I didn't realize until this post that there was no task bar icon for Target, so switching between profiles for every plane in DCS world could be quite annoying.

Intel i5-2500k @ 4.4GHz w/ H70 liquid cooler, ASRock PRO3-M Z68 Mobo, 32G 1600Mhz Mushkin RAM, EVGA GTX970 4GB , OCZ Agility 3 128g SSD, SanDisk 240g SSD, Win7 64-bit

--Twitch: http://www.twitch.tv/livingfood --

Link to comment
Share on other sites

  • 2 months later...

I used LUA script editing to do mine. Kinda annoying that it doesn't sync properly with the route/decent mode switch set as the speed brake on my TM warthog though.

 

Still, it's an easy fix (just hold the speed brake aft and when you release it, it will sync in game and on your throttle)

 

You can only program it to send the 'route mode' command as a toggle command instead of specifying on or off.

 

The decent mode is programmed to activate only when a button is held down and stop when it is released.

 

I wish buttons could easily be set to operate this way from the in game options... Would make configuring toggle switches a breeze.

 

I found this thread helped a lot and explained some of the shortcomings of LUA editing with the KA50.

 

http://forums.eagle.ru/showthread.php?t=89226

Link to comment
Share on other sites

  • Recently Browsing   0 members

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