Jump to content

Blind leading the blind? TM Warthog Toggles.


Recommended Posts

Posted

So as a TM warthog user I've used the above Lua modifications for some time on the spst switches of the warthog to make it work with mig21.

 

The thing I don't like about this is the keys time out after a long time. Example I bind the "Alternate Air to Air mode" to my bottom left switch labeled EAC. After flying for a while with the switch up, flipping it down does nothing and i have to flip it back up and down again to make it register. Annoying. Also having to edit the config file with every update is annoying.

 

So, on to the moral of the story, I got into using Vaicom, which is really neat, and it necessitates using Autohotkey or Target to bind keyboard controls to the stick buttons. I absolutely can't stand target, and I resisted the idea of starting even more stuff before starting the game, but I'm really loving autohotkey so far for this purpose.

 

I looked it up and found someone elses solution who was using a Leo Bodnar board with the same kind of toggles and it works spectacularly well with the warthog. Most importantly, it never times out, and the switches are always extremely responsive. Very pleased with the results after a little work. And it's future proof because it works well with any keyboard command.

 

I'm a complete novice with the software, so anyone who has more experience with it feel free to offer suggestions on improvement, but this below works really well for the WH switches.

 

 

; --- HOTAS WH Throttle Button 29

3Joy29:: ; Sets for Device 3 button 29

Send +#e ; Send throttle stop toggle

SetTimer, WaitForButtonUp29, 10

return

 

WaitForButtonUp29:

if GetKeyState("3Joy29")

return

Send +#e ; Send throttle stop toggle

SetTimer, WaitForButtonUp29, off

return

 

 

The above for example makes the throttle stop work properly when moving the throttle in and out of the latch position. This same layout works for every one of the always on toggles on the throttle, and works quite well I might add. You will have to get the correct device ID for the throttle, mine was "3Joy" or 3rd joystick.

 

I highly recommend trying it. I find it much less intrusive to use than target. You just double click your script after and it runs in the system tray, right click and end to kill it. http://www.autohotkey.com

 

Also recommend post #2 in this thread http://forums.eagle.ru/showthread.php?t=151296 in regards to the linked test script to find your stick ID, and also to consider trying out Vaicom, it's pretty fun to use and works surprisingly well.

Posted

I do use a lot of toggle switches, both on my BU8036X board and my Warthog Throttle. And I have some extra programming for it on the joystick\default.lua My experience is that the switches in the MiG-21 sometimes don't behave correctly. I think it is imperfections in the MiG-21 coding itself, rather then any hardware related issues. If described and assigned correctly in the defaul.lua, DCS should 'read' the position of your toggle switches. It does so for most of them. But not the radar on/off/standby switch, the ASP missile/bombing and ASP auto/manual switch. And the landing/taxi light switch has issues as well. But I never had any issues with timed-out switches like you are describing.

 

Is there any special switces you need assigned to a toggle on the Warthog? I can help you with the joystick lua code.

Happy Flying! :pilotfly:

Posted (edited)

I was using the sticky thread above for the method of setting up the WH throttle for mig 21. The one titled "TM Warthog Keybinds for 3 and 2 position switches"

 

The methodology for how I was adding it was to take the section with the alternate commands and paste it into the existing "default.lua" joystick file. Rather than replacing the whole file, just to avoid any oddness with the defaults file changing in a patch versus the one provided for download in that thread.

 

I've always had problems with the buttons timing out as described though in using that file. Plus I could never figure out a way to get the throttle stop lock to work right. Not sure what I might have been doing wrong if anything.

 

If there's a better methodology for utilizing these kind of toggles than described in that thread I wouldn't mind reading about it. Autohotkey works great, but it would still be more seamless to have it done right in game via lua configuration. My homemade toggle switch box is using a board from desktop aviator that uses pulse generation to send separate 250ms pulses on up/down, which is also built on Leo Bodnar parts. So I never have to worry about it, but the downside is it uses 2 buttons up for each switch, so you get less switches per board.

Edited by FeistyLemur
Posted

I've got a command for that in my LUA file. It doesn't work very well but usually it gets the job done. Drop this line in your input\joystick\default.lua. A new assignable command will show itself in the "engine" sub-section. It is called: 'Alt Throttle Lock Toggle' and you can assign button 29 of the Warthog throttle to it.

 

However, there seems to be a limitation to the usefullness of this command. First of all, you should put your throttle in the expected position at the start of the mission. For example, for a cold start at the beginning, you should put the Warthog throttle past the Idle/off detent. After the mission has been loaded and started, you can move the throttle over the detent and the MiG-21 throttle does the same. You can also lock the throttle again. But releasing the Throttle a second time, requires you to move the Warthog twice through the detent.

 

I know, it seems to be broken. But that's how it works right now.

 

--Alternate Throttle start/stop (you might want to wiggle the throttle through the "stop" one or three times)
{down=device_commands.RUDStop_lock, up=device_commands.RUDStop_lock, cockpit_device_id=devices.ENGINE_START_DEVICE, value_down=1.0, value_up=0.0, name='Alt Throttle Lock Toggle', category='Engine'},

Happy Flying! :pilotfly:

Posted (edited)

Hmm, well the way I have it right now in my autohotkey script I find works really well so I might just keep using that. I have to run the AHK script regardless because I need the push to talk for vaicom assigned to a stick button, so I just might as well bind the WH in the same script while I'm at it.

 

The only possible failure conditions for the AHK method are if you A: start the mission with the throttle out of lock. But this is a fact of life for toggle keys that's impossible to avoid to my knowledge. Or B: move the throttle down really fast and drop it into lock before the in game throttle has actually reached the bottom, triggering the lock key-press before it can actually be locked. In those situations, as with all other toggle keys that don't have proper on / off functionality and get out of sync I'm forced to just click the in game cockpit or press the keyboard key manually to resync the de-synced toggle. I can't really think of any workaround for moving the throttle too fast and slapping it into lock before the slider has actually reached the bottom in game. You would have to somehow be able to detect that the games throttle axis is not yet at zero and wait to send the key-press, and I have no idea if that's even possible.

 

The only real downside to AHK is say you want to switch planes you have to alt tab and kill the script and start another one.

Edited by FeistyLemur
  • Recently Browsing   0 members

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