bastianschwarz / warthog.dcs.f18 Goto Github PK
View Code? Open in Web Editor NEWT.A.R.G.E.T. profile for the Thrustmaster HOTAS Warthog and DCS World FA-18C Hornet
License: Other
T.A.R.G.E.T. profile for the Thrustmaster HOTAS Warthog and DCS World FA-18C Hornet
License: Other
Since it's an extra step to run T.A.R.G.E.T. and the profile and then DCS a shortcut would be a good Idea.
Problem will be to find a way to make the DCS path customizable.
Last resort would be a wrapper in another language that holds the path information and builds the CLI command to run target and DCS.
The LED brightness could be used to display the throttle state, either continously or just off/idle/normal/ab
This would be completely useless but a nice gimmick (and a nice excercise) anyway.
After playing around with the T.A.R.G.E.T. CLI commands (which are extremely limited) I think it's probably better to create some kind of launcher:
\path\to\targetgui -r "path\to\profile"
This would also make the installer (#6) much easier since the paths to DCS and T.A.R.G.E.T. don't have to be known on install. The Profile can acutally be treated like an app.
Using modifiers like SHIFT and CTRL blocks other inputs in DCS. This is not really suprising but something I didn't think of since the modifiers in DCS are only used for momentary button presses; you never hold a button press with a modifier AND try to press another button. But on the HOTAS this can happen
I mostly run into this problem on high angle bombing runs: I extend the speedbrake in the dive and retract it in the climb. Since I just throw the speedbraek switch in the hold position, this blocks all input because LCTRL is pressed.
A new Idea to play around with is to just increase the DX buttons and bind the buttons ingame. Since the profile won't work without custom key bindings anyway it doesn't matter if I load the profile for 1 or 100 buttons.
First code test:
// default defined in target.tmh
stGameCfg morebuttons = { 100, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}; //first number is the number of buttons, copied from default and modified
//called in main
if(Init(&EventHandle, 0)) return 1; // Call init with 2nd bitmask to prevent virtual devices form being created
PlugGame(&morebuttons, "Mine"); // create my own virtual device with my custom definition
excludeDevices();
Default Mapping from TARGET:
// called in Init()
MapList(&Joystick, &JoystickMap);
// defined at the bottom of target.tmh
int JoystickMap[]={TG1,DX1, S2,DX2, S3,DX3, S4,DX4, S1,DX5, TG2,DX6, H2U,DX7, H2R,DX8, H2D,DX9, H2L,DX10, H3U,DX11, H3R,DX12, H3D,DX13, H3L,DX14,
H4U,DX15, H4R,DX16, H4D,DX17, H4L,DX18, H4P,DX19, H1U,DXHATUP, H1R,DXHATRIGHT, H1D,DXHATDOWN, H1L,DXHATLEFT};
Use something similar to create DX buttons?
int i; while(i<256) { USB[i] = i+1000; i = i+1; } // fill the USB table
TODOs
It would be really handy to provide an Installer/Updater that extracts the target scripts, creates a shortcut to run TARGET + DCS and installs the DCS button mapping into the SavedGames folder.
This is probably the next step after #4 is finished.
Basics:
Nice to have:
Also: Defining an installer that quickyl grows in complexity is totally not feature creep ...
The LED states are currently initialized to simply "all off" at script start.
This should be reworked to actually read the current button/throttle states and set the LEDs accordingly.
One possible way could be to have a initialzeLED function that gets the button and the desired state and keeps them in a map and setting the LEDs once everything is setup.
Today I had problems extending the hook. Probably it's best to switch from Cycle to UP/DOWN Keybinds
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.