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


Notices

Reply
 
Thread Tools Display Modes
Old 10-16-2017, 12:58 PM   #371
LeCuvier
Member
 
Join Date: May 2013
Location: South of France
Posts: 645
Reputation power: 7
LeCuvier has a spectacular aura aboutLeCuvier has a spectacular aura aboutLeCuvier has a spectacular aura aboutLeCuvier has a spectacular aura about
Default Radiator Flaps

@vortexringstate: I have tried to create a OPEN/CLOSED command. This does not work as the command does not work with "down" and "up" at all. It requires a 3-state switch input ON/OFF/ON with spring return to OFF.
__________________
LeCuvier
Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM| GTX-970 | Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
LeCuvier is offline   Reply With Quote
Old 11-03-2017, 03:21 PM   #372
Baz000
Member
 
Join Date: May 2015
Posts: 323
Reputation power: 3
Baz000 will become famous soon enoughBaz000 will become famous soon enough
Default

How would you use target to do what is done with the .lua code editing? I prefer using a gui instead of hundreds of lines of code.
Baz000 is offline   Reply With Quote
Old 11-03-2017, 04:22 PM   #373
majapahit
Member
 
Join Date: Jul 2009
Posts: 711
Reputation power: 11
majapahit has a spectacular aura aboutmajapahit has a spectacular aura aboutmajapahit has a spectacular aura aboutmajapahit has a spectacular aura aboutmajapahit has a spectacular aura about
Default

Quote:
Originally Posted by Baz000 View Post
How would you use target to do what is done with the .lua code editing? I prefer using a gui instead of hundreds of lines of code.
Use TARGET TARGETGUI.exe to set up you commands per button per the manual.

Create 'new',
use 'basic' otherwise you'll have those 5x 'shifted' states unless you want that,
assign which controllers you want to use,
assign Axis (leave default),
assign commands to buttons by double click the button and then
type 'Event Name'
(f.i. 'gear up AND down' which would involve not just 'Pulse', but rather both a 'Press' and a 'Release)
Add Event and Save Event which then shows up in the right column 3. of events
'SAVE' (bottom left) this script TARGETGUI script so it is actually a file for safekeeping
'RUN CONFIGURATION' to test the script
when OK (save again if you forgot)
do
VIEW SCRIPT this is the TARGETScriptEditor.exe version of the commands file
(you need to learn the TARGETScriptEditor syntax which is much quicker)

you now have 3 options
1 - always load though the TargetGUI and "Run Configuration"
2 - or, run the script translation created by 'VIEW SCRIPT' with TARGETScriptEditor
3 - or, you run the script translation created by 'VIEW SCRIPT' a .tmc file that is a definitions batch as a command line with TargetGUI

simple what? (yep Thrustmaster did a horrible job)

So to set up a KA-50 script, you
- test an define starting with TargetGUI (and save f.i. as <KA-50.fcf>)
- then you create a .tmc file by 'VIEW SCRIPT' that you can run with TARGETScriptEditor (and saved as <KA-50.tmc>
- then when all is tested and running nicely you can run the .tmc <KA-50.tmc> as a command line with TargetGUI in for instance a setup batch file, as in my KA-50_setup.bat that loads my trackIR etc and has the line

rundll32 shell32.dll,ShellExec_RunDLL "k:\Program Files (x86)\Thrustmaster\TARGET\x64\TARGETGUI.exe" -r "i:\TEKST\My Games\DCS\TMTARGET_profiles\KA-50.tmc"

after you have learned the syntax of the .tmc file, that's a lot quicker.
__________________
Yoke/Rudder/3Quadrants | AP panel | FFB joystick | Headtracker | TH HOTAS | GTX 1080 | Win 7 x64 | Voicerecognition | 40" 1080p TV | 2x24" 1980x1200 monitor | 24" 1080p touchscreen | 16GB RAM
majapahit is offline   Reply With Quote
Old 11-05-2017, 12:25 PM   #374
The LT
Member
 
The LT's Avatar
 
Join Date: Jan 2013
Location: Moscow, Russian Federation
Posts: 294
Reputation power: 5
The LT will become famous soon enoughThe LT will become famous soon enough
Send a message via ICQ to The LT
Default

Quote:
Originally Posted by Baz000 View Post
How would you use target to do what is done with the .lua code editing? I prefer using a gui instead of hundreds of lines of code.
Well, that's too bad for you, as it is much easier to fix the code instead of fumbling around with a crappy GUI.
__________________
My controls & seat
Spoiler:
Main controls: , BRD-N v4 Flightstick (Kreml C5 controller), TM Warthog Throttle (Kreml F3 controller), BRD-F2 Restyling Bf-109 Pedals w. damper, TrackIR5, Gametrix KW-908 (integrated into RAV4 seat)

Stick grips:

Thrustmaster Warthog
Thrustmaster Cougar (x2)
Thrustmaster F-16 FLCS
BRD KG13

Standby controls:
BRD-M2 Mi-8 Pedals (Ruddermaster controller)
BRD-N v3 Flightstick w. exch. grip upgrade (Kreml C5 controller)
Thrustmaster Cougar Throttle

Pilot seat
The LT is offline   Reply With Quote
Old 11-05-2017, 02:17 PM   #375
LeCuvier
Member
 
Join Date: May 2013
Location: South of France
Posts: 645
Reputation power: 7
LeCuvier has a spectacular aura aboutLeCuvier has a spectacular aura aboutLeCuvier has a spectacular aura aboutLeCuvier has a spectacular aura about
Default

Quote:
Originally Posted by The LT View Post
Well, that's too bad for you, as it is much easier to fix the code instead of fumbling around with a crappy GUI.
I have used TARGET and I didn't find it crappy. You can do things with TARGET that you cannot do with .lua editing, e.g. generating a sequence of commands with one pushbutton press.
However, when I started using TrackIR and now had two pieces of software that had to work alongside with DCS World, I had rather frequent malfunctions. So my love for TARGET cooled somwhat. Nowadys I use the VIRPIL T-50 joystick and TARGET doesn't work with that. So TARGET isn't even an option any more.
I understand there are other programs that are conceptually similar to TARGET and work with most HOTAS devices; but I have come to the conclusion that any solution requiring multiple pieces of software to inter-operate has a relatively high potential for failure.
__________________
LeCuvier
Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM| GTX-970 | Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
LeCuvier is offline   Reply With Quote
Old 11-05-2017, 02:32 PM   #376
majapahit
Member
 
Join Date: Jul 2009
Posts: 711
Reputation power: 11
majapahit has a spectacular aura aboutmajapahit has a spectacular aura aboutmajapahit has a spectacular aura aboutmajapahit has a spectacular aura aboutmajapahit has a spectacular aura about
Default

Quote:
Originally Posted by LeCuvier View Post
However, when I started using TrackIR and now had two pieces of software that had to work alongside with DCS World, I had rather frequent malfunctions.
My experience with additional software and plenty of USB devices, the USB assignments f**k up.

I use
JoyIDs to check the ID of the joystick,
USBDeview to clean out the USB assignments and start over,

I've notices with many USB devices you can only use a certain sequence of ports or things go haywire, which is trial and error and then never change a successful way of assignments sequence.

I have a TMWH and a Logitech g940 together, Trackir and a MCPCombo, and a assortment of keyboard pads, race wheels etc. Windows 7 x64

When I would attach my G940 (FFB) to another USB port, things won't work.

I tried Win10 when it was introduced, what bad USB management that was, Win 8.1 better but not so stable USB management as slower Win 7. I'll try Win 10 again when I upgrade to a new motherboard, and hopefully it has improved.
__________________
Yoke/Rudder/3Quadrants | AP panel | FFB joystick | Headtracker | TH HOTAS | GTX 1080 | Win 7 x64 | Voicerecognition | 40" 1080p TV | 2x24" 1980x1200 monitor | 24" 1080p touchscreen | 16GB RAM
majapahit is offline   Reply With Quote
Old 11-18-2017, 10:07 AM   #377
Axelerator
Member
 
Axelerator's Avatar
 
Join Date: Jul 2014
Location: Montpellier, France
Posts: 685
Reputation power: 6
Axelerator has a spectacular aura aboutAxelerator has a spectacular aura aboutAxelerator has a spectacular aura aboutAxelerator has a spectacular aura about
Default

Just stumbled on this thread. 5 & 1/2 years later is there anyway I can setup toggles in the UI without having to do it manually like the OP explained? Thanks!
__________________
Axelerator is offline   Reply With Quote
Old 11-18-2017, 11:25 AM   #378
majapahit
Member
 
Join Date: Jul 2009
Posts: 711
Reputation power: 11
majapahit has a spectacular aura aboutmajapahit has a spectacular aura aboutmajapahit has a spectacular aura aboutmajapahit has a spectacular aura aboutmajapahit has a spectacular aura about
Default

Quote:
Originally Posted by Axelerator View Post
Just stumbled on this thread. 5 & 1/2 years later is there anyway I can setup toggles in the UI without having to do it manually like the OP explained? Thanks!
I discovered the hack that adds 128 (or 68 ) additional DX definitions to the standard TARGET profile, normally its limited to DX 32 which is way to few for TMWH,
so your 'virtual TMWH' runs out of UI assignments at the throttle pretty quickly (button 6 or something),

adding DX128 makes all/most TMWH 'positions' (also 'OFF") accessible through the UI

So, you load a target .tmc profile with the additional DX assignments,

"C:\Program Files (x86)\Thrustmaster\TARGET\scripts\targetdx128.tmh"

edit the .tmc header

"include "targetdx128.tmh" // (use expanded targetdx128.tmh instead of target.tmh - default Thrustmaster function code)

have targetdx128.tmh in your target script path
<"c:\Program Files (x86)\Thrustmaster\TARGET\scripts">

et voila
many more TMWH ON/OFF accessible through the normal DCS config UI

(still takes some effort though till you've figured this out)

find the thread of the original poster about this, hidden deep, but its still confusing (but I use it though)
Attached Files
File Type: zip target dx128 128 DX BUTTONS.zip (9.8 KB, 8 views)
__________________
Yoke/Rudder/3Quadrants | AP panel | FFB joystick | Headtracker | TH HOTAS | GTX 1080 | Win 7 x64 | Voicerecognition | 40" 1080p TV | 2x24" 1980x1200 monitor | 24" 1080p touchscreen | 16GB RAM
majapahit 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 01:02 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.