-
Notifications
You must be signed in to change notification settings - Fork 0
/
Analog_WASD_Profile.tmc
61 lines (54 loc) · 2.79 KB
/
Analog_WASD_Profile.tmc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Part of Analog_WASD_Profile#.# keybinds packages
//---------------------------------------------------------------------------
//
// Analog_WASD scripts from Zeplin for HOTAS and Joystick Integration 0.1
//
// Master Branch on GetHub: https://github.com/zeplintwo/AnalogWASD-2
//
// Scripts and codes are inspired from ED and other sources Aussiedroid has heavly influnced me.
//
// This is a early attempt to build a Keymap for Analog_WASD for the Warthog HOTAS and T16000.M Dual sticks.
// Most of the code checks out and works in exteral testing and the short game play that I have tested it.
//
// Please report any bugs, features or suggestion to above script branch.
//
// This is a WIP there will be issues.
//
// Use Analog_WASD_User_Setting#.#.ttm to adjust user preferances.
//
// Script is built on the some generic keybinds for the default Analog_WSAD keybinds.
//
// Use Analog_WASD_Keymaps#.#.ttm to adjust any changes to keybinds for script to function properly. I will try to keep up with changes as needed.
//
//---------------------------------------------------------------------------
include "target_zeplin_dx128-v0.1.tmh" //modded target.tmh file so that it looks diffrent from stock
include "Analog_WASD_User_Settings.ttm" //User editable setting for the script
include "Analog_WASD_Key_Binds.ttm" //Keybinds setup for all supported devices where you have the assigment to a button
include "Analog_WASD_Key_Defines.ttm" //Keymaps for TARGET scripting where an USB Hex is assigned a name. includes the 128 DX Buttons for future usage
include "Analog_WASD_Macros.ttm" //macros for the script to work properly
include "Analog_WASD_Pre-Axis_Macros.ttm" //macros for the Axis to Key with a dutycycle logic
include "Analog_WASD_Functions.ttm" //Functions for the higher confgurations of the script but do not directly work with the PWM macros
//program startup
int main(){
//following lines turn off other thrustmaster stick
Configure(&HCougar, MODE_EXCLUDED);
Configure(&JoystickF18, MODE_EXCLUDED);
Configure(&LMFD, MODE_EXCLUDED);
Configure(&RMFD, MODE_EXCLUDED);
Configure(&TFRPRudder, MODE_EXCLUDED);
Configure(&TWCSThrottle, MODE_EXCLUDED);
Configure(&TFRPHARudder, MODE_EXCLUDED);
//end of exclustions
if(Init(&EventHandle)) return 1; // declare the event handler, return on error
SetKBRate(PulseLength, DelayLength);
SetKBLayout(KB_ENG);
ControlAxisCurveSetup();
if (AnalogWASD_Pre_axis == 1){ //Coding needed to make Joystick Axis control a key with a dutycycle
MainPWMStart();
}
}
//event handler
int EventHandle(int type, alias o, int x){
DefaultMapping(&o, x);
//add event handling code here
}