Skip to content

Commit

Permalink
T16000.M Soution
Browse files Browse the repository at this point in the history
T16000.M Soution
  • Loading branch information
zeplintwo committed Jul 30, 2021
1 parent 5ee6eb0 commit 73d3a2a
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 16 deletions.
12 changes: 6 additions & 6 deletions Analog_WASD_Key_Binds.ttm
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
//
//---------------------------------------------------------------------------

define ThrottleUp USB[0x57] //numpad + throttle step up
define ThrottleUp USB[0xE1] //L_Shift throttle step up
define AltThrottleUp USB[0x55] //numpad * alternate throttle step up
define ThrottleDown USB[0x56] //numpad - throttle step down
define ThrottleDown USB[0xE0] //L_Ctrl - throttle step down
define AltThrottleDown USB[0x54] //numpad / alternate throttle step down
define TrimInc USB[0x59] //numpad 1 trim increase step up
define TrimDecr USB[0x5A] //numpad 2 trim decrease step down
define PitchDown USB[0x16] //s pitch down, nose down
define PitchUp USB[0x1A] //w pitch up, nose up
define RollRight USB[0x07] //d roll right, roll clockwise
define RollLeft USB[0x04] //a roll left, roll anti-clockwise
define YawRight USB[0x08] //e yaw right, nose right
define YawLeft USB[0x14] //q yaw left, nose left
define RollRight USB[0x08] //e roll right, roll clockwise
define RollLeft USB[0x14] //q roll left, roll anti-clockwise
define YawRight USB[0x07] //d yaw right, nose right
define YawLeft USB[0x04] //a yaw left, nose left
define ThrustUp USB[0x52] //up arrow translate, accend, stafe thrust up
define ThrustDown USB[0x51] //down arrow translate, decend, thrust down
define ThrustRight USB[0x4F] //right arrow translate, strafe,thrust right
Expand Down
4 changes: 2 additions & 2 deletions Analog_WASD_Key_Defines.ttm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int T16LeftBinds(){
MapKey(&T16000L, TS2,0);
MapKey(&T16000L, TS3,0);
MapKey(&T16000L, TS4,0);
MapKey(&T16000L, B5,0);
MapKey(&T16000L, B5,EXEC("T16000Logic();"));//Reserved for PWM Logic
MapKey(&T16000L, B6,0);
MapKey(&T16000L, B7,0);
MapKey(&T16000L, B8,0);
Expand All @@ -115,7 +115,7 @@ MapKey(&T16000L, TS1,0);
MapKey(&T16000, TS2,0);
MapKey(&T16000, TS3,0);
MapKey(&T16000, TS4,0);
MapKey(&T16000, B5,0);
MapKey(&T16000, B5,EXEC("T16000Logic();"));//Reserved for PWM Logic
MapKey(&T16000, B6,0);
MapKey(&T16000, B7,0);
MapKey(&T16000, B8,0);
Expand Down
15 changes: 14 additions & 1 deletion Analog_WASD_Pre-Axis_Macros.ttm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ int MainPWMStart(){
}
}

int T16000Logic(){
if (CCount<1){
CCount=CCount+1;
printf("Loading PWM Logic\xa");
ActKey( KEYON+DOWN+REXEC(0,100,"PWMLogic();",RNOSTOP));
}
else{
CCount=0;
printf("Unloading PWM Logic\xa");
ActKey( KEYON+UP+EXEC("StopAutoRepeat(0);"));
}
}

int AxisToKeySet(){
if (WarthogStick == 1){
RightDev.YValue = Joystick[JOYY]; // Pitch
Expand Down Expand Up @@ -126,7 +139,7 @@ int AxisToKey(int DC,short PKey){ // Application of Dutycycle call to keypress
//---------------------------------------------------------------------------

int PWMLogic(){
//printf("tick \xa");
if (Debug) printf("tick \xa");
AxisToKeySet();
if (RightDev.YValue < (-RightDev.MinRangeY) | RightDev.YValue > RightDev.MinRangeY){ //Joystick Y axis
PulseFormer(RightDev.YValue,RightDev.HalfRangeY,RightDev.LastNegY,RightDev.LastPosY,RightDev.KeyNegY,RightDev.KeyPosY);
Expand Down
4 changes: 2 additions & 2 deletions Analog_WASD_Profile.tmc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
//---------------------------------------------------------------------------
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_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
Expand Down
10 changes: 5 additions & 5 deletions Analog_WASD_User_Settings.ttm
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ short JSZoom[] = {0,0,-2}; //{Progresive,Flat,Percision
//
// You must have WarthogStick or T16000Stick in the On (1) postion and the other Off (0).

int WarthogStick = 1; //Default 1
int WarthogThrottle = 1; //Default 1
int WarthogStick = 0; //Default 1
int WarthogThrottle = 0; //Default 1

// T16000.M Thrustmaster as right stick
//
// set T16000Stick to 1 for dual T16000.m and 0 to turn this off.
//
// You must have WarthogStick or T16000Stick in the On (1) postion and the other Off (0).

int T16000Right = 0; //Default 0
int T16000Left = 0; //Default 0
int T16000Right = 1; //Default 0
int T16000Left = 1; //Default 0

// Keyboard emulation of control azis
//
Expand All @@ -73,7 +73,7 @@ int T16000HalfRange = 8191; //half of the above full swe
int T16000RotAxisRange = 255;
int T16000RotHalfRange = 128;
int TouchDelay = 25; //Release timer for the dutycycle system in milliseconds (1000 ms is one second)if keys are not beeing relased increase this time(default is 25)
int PWMTimeLenght = 100; //timing for full pulse to occure the total lenght of time for it duty in milliseconds (default is 100)
int PWMTimeLenght = 200; //timing for full pulse to occure the total lenght of time for it duty in milliseconds (default is 100)
int A10JoyAxisRange = 65535; //full sweep values for joystick axis (default is 65535)
int A10JoyHalfRange = 32767; //half of the above full sweep value (default is 32767)
float DeadZoneCalPerc1 = 0.025; //(For Joystick) the percentage of values from axis to be ignored around center this is for axis to key dutycycle (default is 0.025) approxamatly 1600 on each side or 3200 total.
Expand Down
Binary file added docs/img/t16000m-template-L.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/t16000m-template-L.xcf
Binary file not shown.
Binary file added docs/img/t16000m-template-R.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/t16000m-template-R.xcf
Binary file not shown.

0 comments on commit 73d3a2a

Please sign in to comment.