Skip to content

Commit

Permalink
Merge pull request #25 from Touille/beta
Browse files Browse the repository at this point in the history
2.2.03.3b
  • Loading branch information
Touille authored Feb 3, 2017
2 parents ab3ea78 + 7fdb60f commit fb1f21c
Show file tree
Hide file tree
Showing 10 changed files with 458 additions and 313 deletions.
59 changes: 38 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Elite Dangerous Warthog Target Script (HCS Keys Binding) 2.2.03.3b 2017/01/31
# Elite Dangerous Warthog Target Script (HCS Keys Binding) 2.2.03.3b 2017/02/02

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

##
***Special thanks go out to Aussiedroid, DarKcyde0, WraithMG11235, Synkc, Solarfly and Farinhir***
##

- [x] Complete
- [ ] Implemented / Need More Test

Expand All @@ -18,15 +22,22 @@

### BEFORE FLYING:

***First, I'm sorry for my English, as it is not my native language. You are Welcome to help me on my English Skill, and, obviously, with my Coding Skill (it is, also, not my native language) ;)***

__All the Settings are in the Settings File.__

__The Command's are on the Joystick and Throttle Chart : [S]ShortPress, [L]LongPress, [EL]ExtraLongPress, [S3]Modifier Key on Joystick__

**This Script require you have Check this Files before you start to Fly, so, please, take some minutes to check them.**

The Script work with a lot of States value. Some of them are very important:

* Landing Gear Switch (Throttle EAC Switch) state is Switch Down : Retracted / Switch Up : Deployed
* **Landing Gear Switch** (Throttle EAC Switch) state is **Switch Down : Retracted / Switch Up : Deployed**

* Cargo Scoop Switch (Throttle RDR ALTM Switch) state is Switch Down : Retracted / Switch Up : Deployed
* **Cargo Scoop Switch** (Throttle RDR ALTM Switch) state is **Switch Down : Retracted / Switch Up : Deployed**

* Harpoints (Joystick MASTER Mode Control Button Longpress) is a press Button, so no switch state. You need to know, it start retracted in Script
* **Harpoints** (Joystick MASTER Mode Control Button Longpress) is a press Button, so no switch state. You need to know, **it start retracted when you launch the Script**


When you launch the Game, the script start with this states (according the switch position for LGears and CScoop).
If, for example, hardpoints is already deployed you should "tell" to the script it is without sending Command Key ; Press [S3] and Joystick MASTER Mode Control Button Longpress, to "align" the Harpoints state betwen game and script.
That goes for LGears and CScoop to. You can Switch the states without sending game commands, like previously, Press [S3] and switch LGears or/and CScoop if "mis aligned"
Expand All @@ -36,33 +47,37 @@ I suggest, when you launch the game, to make one change to PIP before deploying

Because of all this tracking states in the script, __HCS User should use L.Gears, C.Scoop, Hardpoints, and PIP on HOTAS__. Other commands should be OK to use via HCS

Almost ALL Optional Extra (OptimalPIPMode, Stop Fire Retract Hardpoints, Silent Runing OFF on Fire, SuperCruise on Throttle, ....) Can be switched ON/OFF on the Fly, Check Joystick and Throttle Chart's.

### FEATURES:

- [ ] Support MFD (2), Rudders and T.Flight rudders (NOT TESTED YET)
- [x] HMD / TrackIR Option for Some Function : Head Reset, Pause (TrackIr), Led Intensity. (Setup In Settings File)
- [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 or Off On The Fly)
- [x] Game Menu Up on Idle Throttle states. (Setup In Settings File)
- [x] Supercruise On Throttle when boosting if throttle at 100%. (Can be switched ON/OFF On The Fly)
- [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 or Off On The Fly
- [x] Support [Toggle] & [Hold] mode for Game Settings : Reverse Throttle, Flight Assist & Silent Runing (option in Settings File Default is Reverse Throttle [HOLD], Flight Assist [HOLD], Silent Runing [TOGGLE]. If you want to change modify in ED AND in the setting file xxxGameMode)
- [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
- [x] Support [Toggle] & [Hold] mode for Game Settings : Reverse Throttle, Flight Assist & Silent Runing (Check Settings File : Default is Reverse Throttle [HOLD], Flight Assist [HOLD], Silent Runing [TOGGLE]. If you want to change this : Modify in ED AND in the Settings file xxxGameMode)
- [x] Enhanced Functions Like Game Menu (Set Speed to 0, put silence runing off, PIP to tank then open game menu...when game menu is closed, restore previous PIP Mode...), System jump (target next system in route, Retract hardpoint if needed, Frameshift drive, then in Warp, set speed to 0 (safe next system entrance) ...More advanced functions will come later
- [ ] Rotate Joystick Axis to account for center Joystick mounting position (CenterJoystickMount & JoystickAngle options in Settings file)
- [ ] Nvidia Shadowplay and AMD Relive Video Capture and Streaming Support. (Setup In Settings File)
- [ ] Steam Screenshot Support. (For Normal Screenshot only : Setup In Settings File)
- [ ] Rotate Joystick Axis to account for center Joystick mounting position (CenterJoystickMount & JoystickAngle)
- [ ] Nvidia Shadowplay and AMD Relive Video Capture and Streaming Support. (By Default, they are Disable)
- [ ] Steam Screenshot Support. (For Normal Screenshot only : Off by Default)


### LED:

- [x] Easy Led Configuration : You can chose what you want to be assigned (Settings File)
- [x] Throttle LED intensity On The Fly (S3 + Friction Control Axis)
- [x] Throttle LED Intensity on Idle Throttle states. (Setup In Settings File. Default is Backlight Throttle LED is OFF (ThrottleLEDOnIDLE in settings file))
- [ ] Support Flashing Led (for now, only configured for Capture video and streaming video LED (Shadowplay or Relive) if you activate it and change default LED to respective one : settings file)

- [x] Support Toggle & Flashing Throttle LED's (For now, Flashing LED is only configured for Capture video and streaming video LED (Shadowplay or Relive) if you activate this and change default LED to respective one in Settings file)
- [ ] Support Toggle & Flashing MFD LED's
- [ ] Support Toggle & Flashing Throttle & MFD's Backlight (For now, Flashing Throttle Backlight is only for Escape Fight : Autopilot Fonction (Panic Mode, for the Fun :) )
- [x] Easy Led Configuration : You can chose what you want to be assigned (Just Put LED1,LED2 ... on what you want the LED to be : Check Settings file comments / LED SETTINGS to know more about How To ..)
- [x] Throttle Backlight intensity On The Fly (S3 + Friction Control Axis)
- [x] Throttle Backlight Intensity on Idle Throttle states. (Setup In Settings File. Default is Backlight Throttle LED is OFF (ThrottleLEDOnIDLE in settings file))

### PIP:

- [x] Automatic PIP Mode (Backup & Restrore previous PIP Mode) When Deploy or Retract Hardpoints, Escape Fight, Fire, Game Menu, ... (Setup In Settings File ON or OFF). Can be switched On or Off On The Fly
- [x] Automatic PIP Mode (Backup & Restrore previous PIP Mode) When Deploy or Retract Hardpoints, Escape Fight, Fire, Game Menu,... Can be switched ON/OFF On The Fly
- [x] PIP Management Hat Switch offering 12 different presets depending how long you hold down the button.

### PTT:
Expand All @@ -77,15 +92,17 @@ Because of all this tracking states in the script, __HCS User should use L.Gears

### JOYSTICK & THROTTLE CURVE:

- [x] 3 Joystick Curve Switchable On The Fly (slew stick is include in this function) (Setup the Curve In Settings File. Switch In Game With Throttle FLAPS)
- [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) (Setup In Settings File)
- [x] Enhanced Joystick Curves tailored for Flight Assist Off (Joystick Curve will return to previous state when FAON is release)

### AUTOPILOT MODE:

- [x] 3 Autopilot Mode : Easy Request and Cancel Docking procedure, Escape Fight and System Jump

### EXPLORER MODE:

***Thinking to make a mode wich restore all the Original ED Gameplay with one Switch (without all the advanced option (like optimalPIP, PIP Preset's, SecureRetract,...) instead of explorer mode. Let me know what you think.***

- [x] Desactivate some advanced functions you don't need for Exploration with one switch: Automatic PIP Mode (for fire & hardpoints), Automatic retract Hardpoint when you stop fire,... (if activated). If switch off this mode, it will return to all your previous choices.
- [ ] You don't need to keep fire key pressed to scan system or use Scan (System, wake...), just press and release. ( This function work on both Fire, chose wich you want to assign to scan in Settings File : ExploreModeFire , Triger use for Scan : 0 is Tg1, 1 is S2, 2 is Tg1 and S2 )
4 changes: 2 additions & 2 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/01
// V2.2.03.3b 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 @@ -89,7 +89,7 @@ int main()
// ;) //
//--------------------------------------------------------------------------------------------------------------------------------------------------------------//

printf("--------------------------V2.2.03.3b----2017/01/31------------------------\x0a");
printf("--------------------------V2.2.03.3b----2017/02/03------------------------\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
29 changes: 15 additions & 14 deletions Thrustmaster Warthog Script/ED+HCS v2.2_Functions_CORE.tmh
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/01
// V2.2.03.3b 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 @@ -31,7 +31,7 @@
//PIP Management
int initPIPPower(int x=0, int y=0, int z=0){

// Check Wich Command to Send and if it need to be Send
// Check Which Command to Send and if it need to be Send
if(x == 0 & y == 0 & z == 0){if(vOptimalPIP != 0){vOptimalPIP = 0; vPIP=!vPIP;}} //2 SYS 2 ENG 2 WEP (0)
else if(z != MID | z == 0){
if(y != 0){
Expand All @@ -45,7 +45,7 @@
if (x == SYS){if(vOptimalPIP != 4){vOptimalPIP = 4; vPIP=!vPIP;}} //4 SYS 2 WEP (4)
else if(x == ENG){if(vOptimalPIP != 2){vOptimalPIP = 2; vPIP=!vPIP;}} //4 ENG 2 WEP (2)
}
}else if(y ==0){
}else if(y == 0){
if (x == SYS){if(vOptimalPIP != 10){vOptimalPIP = 10; vPIP=!vPIP;}} //4 SYS 1 ENG 1 WEP (10)
else if(x == ENG){if(vOptimalPIP != 11){vOptimalPIP = 11; vPIP=!vPIP;}} //4 ENG 1 SYS 1 WEP (11)
else if(x == WEP){if(vOptimalPIP != 12){vOptimalPIP = 12; vPIP=!vPIP;}} //4 WEP 1 SYS 1 ENG (12)
Expand Down Expand Up @@ -265,16 +265,19 @@
if(!SecureRetract & (sHardPoints | sCargo | sGears))initFrameShiftDrive();//IF SecureRectract = 0 Engage FSD To match the game mechanic and don't launch the speed to 0 from mSystemJump Macro if HardPoints or Cargo Scoop Or L Gears Deployed
else{
initSecureRectract();
if(OptimalPIPMode){
initPIPPower(ENG, SYS); //4 ENG 2 SYS (1)
}
if(OptimalPIPMode){initPIPPower(ENG, SYS);} //4 ENG 2 SYS (1)
ActKey(KEYON+PULSE+mSystemJump);
if(DebugMode | DebugMMode) printf("Engage System Jump\x0a");
}
}

//FUNCTION: Escape Fight All we want is to Escape Fight so We don't check the OptimalPIPMode states, if you want, you can UnComment the 2 Lines to check Them
int initEscapeFight(){
//TEST PANIC MODE
initBACKLIGHT(Throttle_BL, vThrottleLightBackup, 250); //Throttle BackLigtt Flashing ON
init_PANIC_LED(165);
DeferCall(11000, &ActKey, KEYON+PULSE+EXEC("initBACKLIGHT(Throttle_BL, vThrottleLightBackup, 250);")); //Throttle BackLigtt Flashing OFF, we need to Send it again to toggle the flag and stop the flashing
//END OF TEST
if(!SecureRetract){ //if SecureRetract is Disable
if(DebugMode | DebugMMode) printf("Secure Retract was OFF we switch it to ON for 2 sec for Escaping Fight\x0a");
SecureRetract=!SecureRetract; //we Enable it
Expand Down Expand Up @@ -306,9 +309,7 @@
if(DebugMode) printf("Docking Initialisation\x0a");
initSecureRectract();
ActKey(KEYON+PULSE+mRequestCancelDock);
if(OptimalPIPMode){
DeferCall(3000, &ActKey, KEYON+PULSE+EXEC("initPIPPower(SYS, ENG);")); //4 SYS 2 ENG (3)
}
if(OptimalPIPMode){DeferCall(3000, &ActKey, KEYON+PULSE+EXEC("initPIPPower(SYS, ENG);"));} //4 SYS 2 ENG (3)
}

//--------------------------------------------------------------------------------------------------------------------------------------------------------------//
Expand All @@ -334,12 +335,12 @@
if (GFXVideo == 1){ //Nvidia Shadowplay
sNVidiaCaptureVideo=!sNVidiaCaptureVideo;
ActKey(KEYON+PULSE+NVidiaCaptureVideo);
initLED(ToogleNVidiaCaptureVideoLED, sNVidiaCaptureVideo, 250);
initLED(NVidiaCaptureVideo_LED, sNVidiaCaptureVideo, 500);
if(DebugMode | DebugMMode)printf("NVidia ShadowPlay Capture Video [%d]\x0a", sNVidiaCaptureVideo);
}else if (GFXVideo == 2){ //AMD Relive
sAMDCaptureVideo=!sAMDCaptureVideo;
ActKey(KEYON+PULSE+AMDCaptureVideo);
initLED(ToogleAMDCaptureVideoLED, sAMDCaptureVideo, 250);
initLED(AMDCaptureVideo_LED, sAMDCaptureVideo, 500);
if(DebugMode | DebugMMode)printf("AMD Relive Capture Video [%d]\x0a", sAMDCaptureVideo);
}else{ //None
if(DebugMode | DebugMMode)printf("No Software selected for Capture Video\x0a");
Expand All @@ -351,12 +352,12 @@
if (GFXVideo == 1){ //Nvidia Shadowplay
sNVidiaStreaming=!sNVidiaStreaming;
ActKey(KEYON+PULSE+NVidiaStreaming);
initLED(ToogleNVidiaStreamingLED, sNVidiaStreaming, 250);
initLED(NVidiaStreaming_LED, sNVidiaStreaming, 250);
if(DebugMode | DebugMMode)printf("NVidia ShadowPlay Streaming [%d]\x0a", sNVidiaStreaming);
}else if (GFXVideo == 2){ //AMD Relive
sAMDStreaming=!sAMDStreaming;
ActKey(KEYON+PULSE+AMDStreaming);
initLED(ToogleAMDStreamingLED, sAMDStreaming, 250);
initLED(AMDStreaming_LED, sAMDStreaming, 250);
if(DebugMode | DebugMMode)printf("AMD Relive Streaming [%d]\x0a", sAMDStreaming);
}else{ //None
if(DebugMode | DebugMMode)printf("No Software selected for Streaming\x0a");
Expand Down Expand Up @@ -397,6 +398,6 @@
vVoicePTT=!vVoicePTT;
ActKey(KEYON+UP+vPTT);
}
initLED(ToggleVoicePTTLED, vVoicePTT);
initLED(VoicePTT_LED, vVoicePTT, 500);
if(DebugMode & !sPTTMode) printf("Mic Toggle [%d] [Actived[1] DesActived[0] / PTT [%d] [External:[0]Internal:[1]] / Mode [%d] PUSH:[0] TOGGLE:[1]]\x0a", vVoicePTT, sPTTState, sPTTMode);
}
Loading

0 comments on commit fb1f21c

Please sign in to comment.