Skip to content

Commit

Permalink
Merge pull request #27 from Touille/beta
Browse files Browse the repository at this point in the history
2.2.03.3R
  • Loading branch information
Touille authored Feb 5, 2017
2 parents d9535a4 + e0e34f0 commit b458fb5
Show file tree
Hide file tree
Showing 13 changed files with 257 additions and 192 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Root PresetName="ED+HCS V2.2.03.3b" MajorVersion="1" MinorVersion="8">
<Root PresetName="ED+HCS V2.2.03.3R" MajorVersion="1" MinorVersion="8">
<KeyboardLayout>en-GB</KeyboardLayout>
<LockedDevice>{NoDevice}</LockedDevice>
<MouseXMode Value="" />
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Elite Dangerous Warthog Target Script (HCS Keys Binding) 2.2.03.3b 2017/02/02
# Elite Dangerous Warthog Target Script (HCS Keys Binding) 2.2.03.3R 2017/02/05

![ED LOGO](http://edassets.org/img/preview/elite-dangerous-logo_grey.png)

Expand Down Expand Up @@ -55,7 +55,7 @@ Almost ALL Optional Extra (OptimalPIPMode, Stop Fire Retract Hardpoints, Silent
- [x] HMD / TrackIR Option for Some Function : Head Reset, Pause (TrackIr), Led Intensity.
- [ ] Easy Switch resest On The Fly for Landing Gear, Cargo Scoop, Light, Hardpoints, Rotational Correction (if misaligned with game states just switch (it's should work) Or Press S3 + Switch)
- [x] Easy Debug Msg OFF (Debugmode OFF (0) Or ON (1) In Settings File)
- [x] Supercruise On Throttle when boosting if throttle at 100%. (Can be switched ON/OFF On The Fly)
- [ ] Supercruise On Throttle when throttle > 99% (Can be switched ON/OFF On The Fly, Disable by default). If you use Hardware Afterburner Detent you need to pass detent to supercruise.
- [x] Game Menu Up on Idle Throttle states. (Off by Default)
- [x] Secure Retract Mode : Automatic Retract of Hardpoint Gear and cargo when engaging Escape Fight Mode, Supercruise, FrameshiftDrive,...
- [x] Dual stage trigger Combined Fire on Triger 1 to allow combined Primary & Secondary fire or for the trigger to be separated to Primary fire only. Can be switched ON/OFF On The Fly
Expand Down Expand Up @@ -95,6 +95,8 @@ Almost ALL Optional Extra (OptimalPIPMode, Stop Fire Retract Hardpoints, Silent
- [x] 3 Joystick Curve Switchable On The Fly (Slew stick is include in this function) Switch In Game With Throttle FLAPS
- [x] 2 Throttle Curve Switchable On The Fly (normal & precison). Can be switched On & Off On The Fly (S3 (Joystick Nosewhell Steering Button) + Press RED Button on Throttle Arm)
- [x] Enhanced Joystick Curves tailored for Flight Assist Off (Joystick Curve will return to previous state when FAON is release)
- [ ] Support Joystick Axis trimming : memorize the X and Y axis position and calculate the difference to the
center of the axis, and then apply it to the X and Y axis (Throttle Coolie Switch [S3]UP to engage, [S3]DOWN to reset : Check Chart) OR Trim Old Way with Offset you can chose in Setting (Trim_INC)(Check Throttle Chart)

### AUTOPILOT MODE:

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 30 additions & 21 deletions Thrustmaster Warthog Script/ED+HCS v2.2.tmc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) 2017 Thomas Duployez (CMDR Touille)
// V2.2.03.3b 2017/02
// V2.2.03.3R 2017/02
// Distributed freely under the MIT License.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -44,7 +44,7 @@ int main()
Configure(&TWCSThrottle, MODE_EXCLUDED);

//Rudders
if(Rudders < 2)Configure(&TFRPRudder, MODE_EXCLUDED);
if(Rudders < 2) Configure(&TFRPRudder, MODE_EXCLUDED);
else Configure(&TFRPRudder, MODE_FILTERED);

//MFD
Expand All @@ -62,34 +62,43 @@ int main()
SetKBRate(PulseTime, DelayTime);
SetKBLayout(KBLayout);

if(DebugMode | DebugMMode)printf("-------------------------Hardware Initialisation--------------------------\x0a");
if(DebugMode | DebugMMode) printf("-------------------------Hardware Initialisation--------------------------\x0a");

// Initiate Axis Mappings
if(DebugMode | DebugMMode)printf("Initialising Joystick Axis\x0a");initJoystickAxis();
if(DebugMode | DebugMMode)printf("Initialising Throttle Axis\x0a");initThrottleAxis();
if(Rudders == 2){if(DebugMode | DebugMMode)printf("Initialising Rudders Axis\x0a");initRudders();}
if(DebugMode | DebugMMode) printf("Initialising Joystick Axis\x0a"); initJoystickAxis();
if(DebugMode | DebugMMode) printf("Initialising Throttle Axis\x0a"); initThrottleAxis();
if(Rudders == 2){
if(DebugMode | DebugMMode) printf("Initialising Rudders Axis\x0a");
initRudders();
}

// Initiate Curve Mappings
if(DebugMode | DebugMMode)printf("Initialising Joystick Curve\x0a");initSetJoystickCurves();
if(DebugMode | DebugMMode)printf("Initialising Throttle Curve\x0a");initSetThrottleCurves();
if(DebugMode | DebugMMode) printf("Initialising Joystick Curve\x0a"); initSetJoystickCurves();
if(DebugMode | DebugMMode) printf("Initialising Throttle Curve\x0a"); initSetThrottleCurves();

//Initiate MFD
if(USEMFD > 0){if(DebugMode | DebugMMode)printf("Initialising Right MFD\x0a");initRightMFD();}
if(USEMFD > 1){if(DebugMode | DebugMMode)printf("Initialising Left MFD\x0a");initLeftMFD();}
if(USEMFD > 0){
if(DebugMode | DebugMMode) printf("Initialising Right MFD\x0a");
initRightMFD();
}
if(USEMFD > 1){
if(DebugMode | DebugMMode) printf("Initialising Left MFD\x0a");
initLeftMFD();
}

// Initiate Led State
if(DebugMode | DebugMMode)printf("Initialising LED States\x0a");initLEDStates();
if(DebugMode | DebugMMode) printf("Initialising LED States\x0a"); initLEDStates();

// Initiate Custom & PIP Functions (ED+HCS_Macros_v2.2.tmh)
initCustomCommands();

if(DebugMode)initPrintState();
if(DebugMode) initPrintState();

//--------------------------------------------------------------------------------------------------------------------------------------------------------------//
// ;) //
//--------------------------------------------------------------------------------------------------------------------------------------------------------------//

printf("--------------------------V2.2.03.3b----2017/02/03------------------------\x0a");
printf("--------------------------V2.2.03.3R----2017/02/05------------------------\x0a");
printf("---------Enhanced Elite Dangerous Warthog Profile by CMDR Touille---------\x0a");
printf("------------------------------Fly Safe CMDR! o7---------------------------\x0a");
printf("-o/--o/--o/-Aussiedroid-DarKcyde0-WraithMG11235-Synkc-Solarfly-o/--o/--o/-\x0a");
Expand Down Expand Up @@ -183,17 +192,17 @@ int main()
MapKeyIO(&Throttle, MSR, TEMPO(PULSE+FighterHoldFire, PULSE+FighterAggressive, LongPressDelay), PULSE+SelectWingman3); // RIGHT

// -------------------------Coolie Hat Switch
MapKey(&Throttle, CSU, ThrustUp); // UP
MapKey(&Throttle, CSD, ThrustDown); // DOWN
MapKey(&Throttle, CSL, ThrustLeft); // LEFT
MapKey(&Throttle, CSR, ThrustRight); // RIGHT
MapKeyIO(&Throttle, CSU, TEMPO(EXEC("TrimDXAxis(DX_Y_AXIS, - Trim_INC);"), EXEC("TrimDXAxis(DX_X_AXIS, CURRENT);TrimDXAxis(DX_Y_AXIS, CURRENT);"), LongPressDelay), ThrustUp); // UP
MapKeyIO(&Throttle, CSD, TEMPO(EXEC("TrimDXAxis(DX_Y_AXIS, Trim_INC);"), EXEC("TrimDXAxis(DX_X_AXIS, SET(0));TrimDXAxis(DX_Y_AXIS, SET(0));"), LongPressDelay), ThrustDown); // DOWN
MapKeyIO(&Throttle, CSL, EXEC("TrimDXAxis(DX_X_AXIS, -Trim_INC);"), ThrustLeft); // LEFT
MapKeyIO(&Throttle, CSR, EXEC("TrimDXAxis(DX_X_AXIS, Trim_INC);"), ThrustRight); // RIGHT

//--THROTTLE ARM SWITCH-----------------------------------------------------------------------------------------------------------------------------------------//

// -------------------------Speedbrake
MapKey (&Throttle, SPDF, TEMPO(EXEC("initFrameShiftDrive();"), EXEC("initSystemJump();"), ExtraPressDelay)); // Switch FORWARD
// MapKey (&Throttle, SPDM, 0); // Switch MIDDLE
MapKeyIO(&Throttle, SPDB, EXEC("initToggleSuperCruiseMode();"), TEMPO(EXEC("initThrottleBoost();"), EXEC("initSuperCruise();"), LongPressDelay)); // Switch BACK HOLD
MapKeyIO(&Throttle, SPDB, EXEC("initToggleSuperCruiseMode();"), TEMPO(EXEC("initThrottleBoost();"), EXEC("initSuperCruise();"), LongPressDelay)); // Switch BACK HOLD

// -------------------------Boat Switch
MapKey(&Throttle, BSF, PULSE+GalaxyMap); // Switch FORWARD
Expand Down Expand Up @@ -325,7 +334,7 @@ int main()
// MapKey(&RMFD, BRTD, 0);
// MapKey(&RMFD, CONU, 0);
// MapKey(&RMFD, COND, 0);
if(DebugMode)printf("...Done\x0a");
if(DebugMode) printf("...Done\x0a");
}

//Set Left MFD
Expand Down Expand Up @@ -356,7 +365,7 @@ int main()
// MapKey(&LMFD, BRTD, 0);
// MapKey(&LMFD, CONU, 0);
// MapKey(&LMFD, COND, 0);
if(DebugMode)printf("...Done\x0a");
if(DebugMode) printf("...Done\x0a");
}

//--------------------------------------------------------------------------------------------------------------------------------------------------------------//
Expand All @@ -370,7 +379,7 @@ int EventHandle(int type, alias o, int x)
// Throttle: LED On-The-FLy Backlight Control
if(&o == &Throttle & x == THR_FC & Joystick[S3]){
vThrottleLightBackup = (AxisVal(Throttle[THR_FC], &axdata) - 32766) / 256 * -1; //HOLD S3 on Joystick & Move Friction Control Axis
ActKey(PULSE+KEYON+LED (&Throttle, LED_INTENSITY, vThrottleLightBackup));
initBACKLIGHT(Throttle_BL, vThrottleLightBackup);
}

// Combine rudder toe brakes into new axis, mapped to DX_THROTTLE_AXIS
Expand Down
Loading

0 comments on commit b458fb5

Please sign in to comment.