├── Thrustmaster Warthog Chart ├── Warthog_button_num.png ├── Elite Dangerous - Thrustmaster Warthog Chart - Joystick.jpg ├── Elite Dangerous - Thrustmaster Warthog Chart - Throttle.jpg └── Thrustmaster Warthog Mounting Plates │ ├── HotasWarrhog_Stick_Plate.pdf │ └── HotasWarthog_Throttle_Plate.pdf ├── Thrustmaster Warthog Script ├── ED+HCS v3.3_Settings.tmh ├── ED+HCS v3.3_Functions_HARDWARE.tmh ├── ED+HCS v3.3_Macros.tmh ├── ED+HCS v3.3_Variables.tmh ├── ED+HCS v3.3_Functions_TOGGLE.tmh ├── ED+HCS v3.3_USBKey.ttm ├── ED+HCS v3.3_API_TCP.tmh ├── ED+HCS v3.3_KeyBindings.ttm ├── ED+HCS v3.3_Functions_CORE.tmh └── ED+HCS v3.3.tmc ├── Send data over TCP to Target ├── ED-Warthog-Target-Script_Addon.exe ├── README.md └── ED-Warthog-Target-Script_Addon.cpp ├── Default Keybinds - HCS Voice Packs └── HCS Default Keybinds ED 2.2.03.pdf ├── .gitattributes ├── .gitignore ├── LICENSE.txt ├── README.md └── Default Keybinds - Elite Dangerous └── ED+HCS V3.3b.3.0.binds /Thrustmaster Warthog Chart/Warthog_button_num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Touille/ED-Warthog-Target-Script/HEAD/Thrustmaster Warthog Chart/Warthog_button_num.png -------------------------------------------------------------------------------- /Thrustmaster Warthog Script/ED+HCS v3.3_Settings.tmh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Touille/ED-Warthog-Target-Script/HEAD/Thrustmaster Warthog Script/ED+HCS v3.3_Settings.tmh -------------------------------------------------------------------------------- /Thrustmaster Warthog Script/ED+HCS v3.3_Functions_HARDWARE.tmh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Touille/ED-Warthog-Target-Script/HEAD/Thrustmaster Warthog Script/ED+HCS v3.3_Functions_HARDWARE.tmh -------------------------------------------------------------------------------- /Send data over TCP to Target/ED-Warthog-Target-Script_Addon.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Touille/ED-Warthog-Target-Script/HEAD/Send data over TCP to Target/ED-Warthog-Target-Script_Addon.exe -------------------------------------------------------------------------------- /Default Keybinds - HCS Voice Packs/HCS Default Keybinds ED 2.2.03.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Touille/ED-Warthog-Target-Script/HEAD/Default Keybinds - HCS Voice Packs/HCS Default Keybinds ED 2.2.03.pdf -------------------------------------------------------------------------------- /Thrustmaster Warthog Chart/Elite Dangerous - Thrustmaster Warthog Chart - Joystick.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Touille/ED-Warthog-Target-Script/HEAD/Thrustmaster Warthog Chart/Elite Dangerous - Thrustmaster Warthog Chart - Joystick.jpg -------------------------------------------------------------------------------- /Thrustmaster Warthog Chart/Elite Dangerous - Thrustmaster Warthog Chart - Throttle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Touille/ED-Warthog-Target-Script/HEAD/Thrustmaster Warthog Chart/Elite Dangerous - Thrustmaster Warthog Chart - Throttle.jpg -------------------------------------------------------------------------------- /Thrustmaster Warthog Chart/Thrustmaster Warthog Mounting Plates/HotasWarrhog_Stick_Plate.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Touille/ED-Warthog-Target-Script/HEAD/Thrustmaster Warthog Chart/Thrustmaster Warthog Mounting Plates/HotasWarrhog_Stick_Plate.pdf -------------------------------------------------------------------------------- /Thrustmaster Warthog Chart/Thrustmaster Warthog Mounting Plates/HotasWarthog_Throttle_Plate.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Touille/ED-Warthog-Target-Script/HEAD/Thrustmaster Warthog Chart/Thrustmaster Warthog Mounting Plates/HotasWarthog_Throttle_Plate.pdf -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.cpp -text crlf diff 7 | 8 | # Standard to msysgit 9 | *.doc diff=astextplain 10 | *.DOC diff=astextplain 11 | *.docx diff=astextplain 12 | *.DOCX diff=astextplain 13 | *.dot diff=astextplain 14 | *.DOT diff=astextplain 15 | *.pdf diff=astextplain 16 | *.PDF diff=astextplain 17 | *.rtf diff=astextplain 18 | *.RTF diff=astextplain 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Thomas Duployez (CMDR Touille) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Send data over TCP to Target/README.md: -------------------------------------------------------------------------------- 1 | 2018/12/24 2 | 3 | ED_API_over_TCP.exe NEED to be placed in the same directory as Status.json and other log/json ED files : 4 | ``` 5 | \Users\\Saved Games\Frontier Developments\Elite Dangerous\ 6 | ``` 7 | This exe file is, right now, in beta stage 8 | 9 | * You need to use the script provided this branch for using it 10 | * You should get Flags value and time it have been sent to target in the main windows console program 11 | * You should get States change in the Target Script console windows. You can desactivate the meassages in Setting file : DebugFlagsMode 0 instead of 1 12 | * We retreive all the Flags from Status.json files in the script : 13 | 14 | int s_Docked; 15 | int s_Landed; 16 | int s_LandingGearDown; 17 | int s_ShieldUp; 18 | int s_Supercruise; 19 | int s_FlightAssistOff; 20 | int s_HardpointsDeployed; 21 | int s_InWing; 22 | int s_LightsOn; 23 | int s_CargoScoopDeployed; 24 | int s_SilentRunning; 25 | int s_ScoopingFuel; 26 | int s_SrvHandbrake; 27 | int s_SrvTurret; 28 | int s_SrvUnderShip; 29 | int s_SrvDriveAssist; 30 | int s_FsdMassLocked; 31 | int s_FsdCharging; 32 | int s_FsdCooldown; 33 | int s_LowFuel; 34 | int s_OverHeating; 35 | int s_HasLatLong; 36 | int s_IsInDanger; 37 | int s_BeingInterdicted; 38 | int s_InMainShip; 39 | int s_InFighter; 40 | int s_InSRV; 41 | int s_HUDAnalysis; 42 | int s_NightVision; 43 | -------------------------------------------------------------------------------- /Thrustmaster Warthog Script/ED+HCS v3.3_Macros.tmh: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 Thomas Duployez (CMDR Touille) 2 | // V3.3.01b 2018/12 3 | // Distributed freely under the MIT License. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 23 | // MACRO FUNCTIONS // 24 | // All delay can be edited in Settings file // 25 | // D() 75 //Default Delay 75 // 26 | // MiniPulseDelay 150 //Shortest Delay 150 // 27 | // ShortPulseDelay 250 //Shorter Delay 250 // 28 | // MediumPulseDelay 350 //Medium Delay 350 // 29 | // LongPulseDelay 500 //Long Delay 500 // 30 | // ExtraPulseDelay 2000 //Longest Delay 2000 // 31 | // FSDOFFDelay 34000 //When to Press 0 Speed Key after Engaging FSD (Explorer System Jump) // 32 | // FSDJumpScanDelay 2000 //Delay to triger System Scan After Explorer System JUMP // 33 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 34 | 35 | int mRequestCancelDock, mSystemJump, mEscapeFight, mHeatSinkonSilentRuning, mClassifiedCamera, mExplorerSystemJump, mTargetNearestStar; 36 | int initCustomCommands(){ 37 | 38 | //MACRO: Auto-Docking Request 39 | mRequestCancelDock = CHAIN( 40 | LOCK+ 41 | PULSE+TargetPanel, D(MiniPulseDelay), 42 | PULSE+UINextPanel, D(MiniPulseDelay), 43 | PULSE+UINextPanel, D(MiniPulseDelay), 44 | PULSE+UISelect, D(MiniPulseDelay), 45 | PULSE+UIDown, D(MiniPulseDelay), 46 | PULSE+UISelect, D(MiniPulseDelay), 47 | PULSE+UIPrevPanel, D(MiniPulseDelay), 48 | PULSE+UIPrevPanel, D(MiniPulseDelay), 49 | PULSE+UIBack, D(MiniPulseDelay), 50 | PULSE+SetSpeed0, 51 | LOCK 52 | ); 53 | 54 | //MACRO: System Jump 55 | mSystemJump = CHAIN( 56 | PULSE+SelectNextSystemInRoute, D(ShortPulseDelay), 57 | PULSE+SetSpeed100, D(ExtraPulseDelay), 58 | EXEC("initFrameShiftDrive();") 59 | ); 60 | 61 | //MACRO: Explorer Mode System Jump 62 | mExplorerSystemJump = CHAIN( 63 | PULSE+SelectNextSystemInRoute, D(ShortPulseDelay), 64 | PULSE+SetSpeed100, D(ExtraPulseDelay), 65 | EXEC("initFrameShiftDrive();"), D(FSDOFFDelay), 66 | PULSE+SetSpeed0, D(FSDJumpScanDelay) 67 | ); 68 | 69 | //MACRO: Target Nearest Star 70 | // mTargetNearestStar = CHAIN( 71 | // LOCK+ 72 | // PULSE+TargetPanel, D(MiniPulseDelay), 73 | // PULSE+UILeft, D(MiniPulseDelay), 74 | // PULSE+UIUp, D(MiniPulseDelay), 75 | // PULSE+UIUp, D(MiniPulseDelay), 76 | // PULSE+UIUp, D(MiniPulseDelay), 77 | // PULSE+UIRight, D(MiniPulseDelay), 78 | // PULSE+UISelect, D(MiniPulseDelay), 79 | // PULSE+UISelect, D(MiniPulseDelay), 80 | // PULSE+UIBack, 81 | // LOCK 82 | // ); 83 | 84 | //MACRO: Escape Fight 85 | mEscapeFight = CHAIN( 86 | PULSE+SetSpeed100, D(MediumPulseDelay), 87 | PULSE+EngineBoost, D(LongPulseDelay), 88 | PULSE+EngineBoost, D(LongPulseDelay), 89 | EXEC("initSuperCruise();") 90 | ); 91 | 92 | //MACRO: Heat Sink on Silence Runing 93 | mHeatSinkonSilentRuning = CHAIN( 94 | PULSE+SilentRunning, D(HeatSinkonSilentRuningDelay), 95 | PULSE+DeployHeatSink 96 | ); 97 | 98 | //MACRO: Free Camera (External) 99 | mClassifiedCamera = CHAIN( 100 | PULSE+SetSpeed0, D(ShortPulseDelay), //If you don't want speed return to 0 when engaging camera mode comment this line (//) 101 | PULSE+ClassifiedCamera, D(LongPulseDelay) 102 | ); 103 | 104 | } -------------------------------------------------------------------------------- /Send data over TCP to Target/ED-Warthog-Target-Script_Addon.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #define _WINSOCK_DEPRECATED_NO_WARNINGS 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | //#include 9 | //#include 10 | #include 11 | #include 12 | #include 13 | #include "rapidjson/filereadstream.h" 14 | #include "rapidjson/error/en.h" 15 | 16 | using namespace rapidjson; 17 | 18 | #pragma comment(lib, "ws2_32.lib") 19 | 20 | /* 21 | void escape() { 22 | } 23 | */ 24 | 25 | int main() 26 | { 27 | std::cout << "Hello world!" << std::endl; 28 | std::cout << "ED-Warthog-Target-Script 3.x : Status.json Flags Addon" << std::endl; 29 | //std::cout << "Press escape to quit" << std::endl; 30 | 31 | //spawn new thread that calls escape() 32 | //std::thread first(escape); 33 | 34 | //Create an Empty string to be able to save the Status.json string later 35 | std::string jsonStr_Backup; 36 | 37 | //Create a buffer where FileReadStream can store the data 38 | char readBuffer[512]; //[DM] status.json length often exceeds 256. 39 | 40 | LOOP:for (;;) { 41 | 42 | //Load the Status.json file using FileReadStream 43 | // FILE *ifs = _fsopen("C:/Users/tomdu/Saved Games/Frontier Developments/Elite Dangerous/Status.json", "rb", _SH_DENYNO); 44 | FILE *ifs = _fsopen("Status.json", "rb", _SH_DENYNO); 45 | 46 | //Can't open Status.json File ? 47 | if (ifs == 0) { 48 | std::cerr << "Can't open Status.json.This program should be In : /Users/.../Saved Games/Frontier Developments/Elite Dangerous/" << std::endl; 49 | system("PAUSE"); 50 | return EXIT_FAILURE; 51 | } 52 | 53 | //Create the RapidJSON Document of Status.json File : status 54 | FileReadStream isw (ifs, readBuffer, sizeof(readBuffer)); 55 | 56 | //Close the status.json File 57 | fclose(ifs); 58 | 59 | //Create RapidJSON Values in RapidJSON "Document" 60 | Document status; 61 | status.ParseStream(isw); 62 | 63 | //Parse Error ? File Empty ? No Problem, we will read the json file again ;) 64 | if (status.HasParseError()) 65 | { 66 | fprintf(stderr, "Error(offset %u): %s\n", (unsigned)status.GetErrorOffset(), GetParseError_En(status.GetParseError())); 67 | Sleep(100); 68 | goto LOOP; 69 | } 70 | 71 | //Allocates a memory buffer for writing the whole JSON to be able to compare it below 72 | StringBuffer buffer; 73 | Writer writer{ buffer }; 74 | status.Accept(writer); 75 | 76 | //Store the allocated memory buffer in a string (jsonStr) to be able to compare it (with jsonStr_Backup) below 77 | //If they are same, we don't need to do the parsing, and socket stuff 78 | const std::string jsonStr{ buffer.GetString() }; 79 | 80 | //If the Status.json File content have changed since his last reading : 81 | //Parse the File and send the Value(s) we need through TCP to Target 82 | if (jsonStr != jsonStr_Backup) 83 | { 84 | //Backup the New Status.json in a string as jsonStr_Backup 85 | jsonStr_Backup.assign(jsonStr); 86 | 87 | //Retreive Json "Flags" int Value 88 | int v_Flags = 0; 89 | if (status.HasMember("Flags")) { 90 | assert(status["Flags"].IsNumber()); //Flags 91 | // v_Flags = status["Flags"].GetInt(); 92 | v_Flags = status["Flags"].GetUint(); 93 | //printf("Flags = %d\n", v_Flags); 94 | } 95 | 96 | /* //Retreive Json "Pips" array Value, we don't use it yet but we will need it later 97 | if (status.HasMember("Pips")){ 98 | const Value& p = status["Pips"]; //Pips as Array 99 | assert(p.IsArray()); 100 | // for (SizeType i = 0; i < p.Size(); i++) { // Uses SizeType instead of size_t 101 | // printf("p[%d] = %d\n", i/2, p[i].GetInt()); 102 | // } 103 | }*/ 104 | 105 | //Clear and minimize the RapidJSON Document of Status.json File : status 106 | status.SetObject(); 107 | 108 | //If we are In Game, we can Diplay the status.json content in windows console and send the Data through Socket TCP to Target 109 | if (v_Flags != 0) { 110 | 111 | //Display the status.json content in windows console 112 | std::cout << jsonStr << std::endl; 113 | //std::cout << "Status.json Backup = " << jsonStr_Backup << std::endl; 114 | 115 | //Since Flags is an int, we convert it to String to be able to send through Socket TCP 116 | std::string s_Flags = std::to_string(v_Flags); 117 | const char * c = s_Flags.c_str(); 118 | 119 | // Send Data through Socket TCP 120 | char buf[128]; 121 | sockaddr_in addr; 122 | WSADATA WSAData; 123 | WSAStartup(2, &WSAData); 124 | gethostname(buf, sizeof(buf)); 125 | hostent *server = gethostbyname(buf); 126 | if (server) 127 | { 128 | SOCKET s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); 129 | if (s != INVALID_SOCKET) 130 | { 131 | memcpy(&addr.sin_addr, server->h_addr, server->h_length); 132 | addr.sin_family = server->h_addrtype; 133 | addr.sin_port = htons(1000); // use TCP port 1000, the same as the one in TARGET script 134 | if (!connect(s, (sockaddr*)&addr, sizeof(addr))) 135 | { 136 | *(unsigned short*)buf = 2 + (unsigned short)strlen(c); // data size = xxx bytes (packet length + data) 137 | strcpy_s(buf + 2, *(unsigned short*)buf, c); // c : 8 bytes of data for Flags 138 | send(s, buf, *(unsigned short*)buf, 0); // send (packet length + data) bytes of data 139 | } 140 | closesocket(s); 141 | } 142 | } 143 | WSACleanup(); 144 | v_Flags = 0; //Clear Json Flags Value 145 | } 146 | //We are not In Game !!!! 147 | else { 148 | std::cerr << "Warning : You need to be logged in Elite Dangerous ..." << std::endl; 149 | } 150 | } 151 | Sleep(500); 152 | } 153 | return 0; 154 | } 155 | -------------------------------------------------------------------------------- /Thrustmaster Warthog Script/ED+HCS v3.3_Variables.tmh: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 Thomas Duployez (CMDR Touille) 2 | // V3.3.01b 2018/12 3 | // Distributed freely under the MIT License. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 23 | // USED IN FUNCTION // 24 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 25 | 26 | //Hardware 27 | int vJoystickCurveProfile; //initSetJoystickCurves() initJoystickCurves() initToggleEnhancedFAOFF() 28 | int vJoystickCurveProfileBackup; //initToggleEnhancedFAOFF() 29 | int vThrottleCurveProfile; //initSetThrottleCurves() 30 | 31 | //Game 32 | int vSecureEscapeFight; 33 | int vLG; //initToggleLandingGear() 34 | int vCS; //initToggleCargoScoop() 35 | int vFA; //initToggleEnhancedFAOFF() Flight Assist [TOGGLE] Mode Ingame 36 | int v_HasLatLongCurve; 37 | 38 | //initVoicePTT() 39 | int vVoicePTT; 40 | int vPTT; 41 | int vVoice; 42 | 43 | //initToggleSilentRuning() 44 | int vSilentRuningBackup; //initFire() 45 | int vSLonFire; //initFire() 46 | int vSLonEscapeFight; //initEscapeFight() 47 | int vSLonGameMenu; //initToggleGameMenu() 48 | int vSLonCamera; //initToggleCamera() 49 | 50 | //initFire() 51 | int vPrimaryFire; //initPrimaryFire() 52 | int vSecondaryFire; //initSecondaryFire() 53 | int vScanPrimaryFire; 54 | int vScanSecondaryFire; 55 | 56 | //LED Management : initLED() 57 | int LED_DEVICE; 58 | int LED_OUTPOUT; 59 | //------------Throttle 60 | int flagHover_T_LED1; //flashing_T_LED1() 61 | int flagHover_T_LED2; //flashing_T_LED2() 62 | int flagHover_T_LED3; //flashing_T_LED3() 63 | int flagHover_T_LED4; //flashing_T_LED4() 64 | int flagHover_T_LED5; //flashing_T_LED5() 65 | //------------Right MFD 66 | define RMFD_LED1 0x40 //Right MFD LED1 67 | define RMFD_LED2 0x400 //Right MFD LED2 68 | int flagHover_RMFD_LED1; //flashing_RMFD_LED1() 69 | int flagHover_RMFD_LED2; //flashing_RMFD_LED2() 70 | //------------Left MFD 71 | define LMFD_LED1 0x50 //Left MFD LED1 72 | define LMFD_LED2 0x500 //Left MFD LED1 73 | int flagHover_LMFD_LED1; //flashing_LMFD_LED1() 74 | int flagHover_LMFD_LED2; //flashing_LMFD_LED2() 75 | 76 | //BACKLIGHT Management : initBACKLIGHT() 77 | int BACKLIGHT_DEVICE; 78 | //------------Throttle 79 | define Throttle_BL 0x60 80 | // int vThrottleLight; 81 | int vThrottleLightBackup; 82 | int flagHover_T_BL; //flashing_T_BL() 83 | //------------Right MFD 84 | define RMFD_BL 0x70 85 | // int vRMFDLight; 86 | int vRMFDLightBackup; 87 | int flagHover_RMFD_BL; //flashing_RMFD_BL() 88 | //------------Left MFD 89 | define LMFD_BL 0x80 90 | // int vLMFDLight; 91 | int vLMFDLightBackup; 92 | int flagHover_LMFD_BL; //flashing_LMFD_BL() 93 | //------------For the Fun 94 | int PANIC_LED = 1; 95 | 96 | // --PIP Management--------------------------------------------------------------------------------------------------------------------------------------------// 97 | 98 | //initPIPPower() 99 | // int M_Crew; 100 | int vOptimalPIP; 101 | int vPIP; 102 | int PIPx, PIPy, PIPz; 103 | define SYS 1 104 | define ENG 2 105 | define WEP 3 106 | define MID 4 107 | 108 | //initPIPBackup() 109 | int vPIPB; 110 | int vOptimalPIPFireBackup; //initFire() 111 | define OptimalPIPFireBackup 1 112 | int vOptimalPIPEFBackup; //initEscapeFight() 113 | define OptimalPIPEFBackup 2 114 | int vOptimalPIPGMBackup; //initToggleGameMenu() 115 | define OptimalPIPGMBackup 3 116 | int vOptimalPIPCCBackup; //initToggleCamera() 117 | define OptimalPIPCCBackup 4 118 | // int vOptimalPIPBoostBackup; //initThrottleBoost() 119 | // define OptimalPIPBoostBackup 5 120 | 121 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 122 | // TOGGLE STATES // 123 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 124 | 125 | //Extra 126 | int sVoiceAttack; //initToggleVoiceAttackMic() Voice Attack Mic 127 | int sNVidiaCaptureVideo; //initCaptureVideo() Nvidia Shadowplay Capture 128 | int sAMDCaptureVideo; //initCaptureVideo() AMD Relive Capture 129 | int sNVidiaStreaming; //initStreamingVideo() Nvidia Shadowplay Streaming 130 | int sAMDStreaming; //initStreamingVideo() AMD Relive Streaming 131 | 132 | //Game 133 | int sIDLE; //initToggleIDLEonThrottle() Throttle IDLE 134 | int sRT; //initToggleReverseThrottle() Reverse Throttle 135 | int sGameMenu; //initGameMenu() Game Menu 136 | int sHeadLook; //initToogleHeadLook() Head Look 137 | // int sExplorerMode; //initToggleExplorerMode() Desactivate Functions for Exploring (OptimalPIPMode when fire, StopFireRetractHardpoints ...) 138 | int sCameraMode; //initToggleCamera() Classified Camera 139 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Elite Dangerous Warthog Target Script (HCS Keys Binding) 3.3.01b 2018/12/24 : IF YOU USED PREVIOUS VERSION PLEASE READ BELOW 2 | 3 | ![ED LOGO](https://www.elitedangerous.com/img/logo-elite-dangerous-2018.a1fb88a3.png) 4 | 5 | 6 | ***Special thanks go out to Aussiedroid, DarKcyde0, WraithMG11235, Synkc, Solarfly and Farinhir*** 7 | 8 | --- 9 | - [x] Complete 10 | - [ ] Implemented / Need More Test 11 | --- 12 | ## INSTALATION: 13 | 14 | * __All files from Thrustmaster Warthog Script folder need to be in the same folder.__ The Warthog Script can be run from any location. 15 | * __Copy__ the Elite Dangerous Binds Profile __ED+HCS V3.X.XX.XX.3.0.binds__ from __Default Keybinds - Elite Dangerous Folder__ to: 16 | ``` 17 | \Users\\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings 18 | ``` 19 | * __Copy__ the __ED-Warthog-Target-Script_Addon.exe__ from __Send data over TCP to Target Folder__ to : 20 | ``` 21 | \Users\\Saved Games\Frontier Developments\Elite Dangerous\ 22 | ``` 23 | * __Right Click__ on the exe, __Send to__ and select __Desktop create shortcut__ 24 | --- 25 | ## WHEN YOU WANT TO PLAY : 26 | - __Launch the ED-Warthog-Target-Script_Addon.exe__ 27 | -First Option : __With the shortcut__ previously created 28 | -Second Option : Let the script Start the exe for you -> __Edit ED+HCS v3.3.tmc file, find the line below and replace with your Windows username and Uncomment the line__ (ex : Replace __*< USER >*__ with __*martin*__ and __remove the //__ at the begining) 29 | ``` 30 | //system("spawn -w \"C:\\Users\\< USER >\\Saved Games\\Frontier Developments\\Elite Dangerous\" \"C:\\Users\\< USER >\\Saved Games\\Frontier Developments\\Elite Dangerous\\ED-Warthog-Target-Script_Addon.exe\""); 31 | ``` 32 | - Just __Drag&Drop ED+HCS v3.3.tmc in TARGET Script Editor and Run__. (Default script path can also be set in the options). __Always make sure the script is running prior to starting Elite Dangerous.__ 33 | - Most commands can be tested prior to starting the game in Target Script Editor using the Debug Message, Event Tester and Device Analyzer. 34 | - __Launch Elite Dangerous, Options, Controls and chose the correct Binds Profile__ __ED+HCS V3.X.XX.XX.3.0.binds__ 35 | - __Play :)__ 36 | ### WARNING : If you want to change Bindings keys IN GAME, Make sure to use ENG(UK) Keyboard layout in Wndows. If you did not, your Bindings file will be unusable with the script. (ED change some keys inside the file to the current windows keyboard layout, even if you don't change them) 37 | --- 38 | --- 39 | --- 40 | ## BEFORE FLYING: 41 | 42 | ***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) ;)*** 43 | 44 | __All the Settings are in the Settings File__ : **ED+HCS v3.3_Settings.tmh** 45 | 46 | __The Command's are on the Joystick and Throttle Chart : [S]ShortPress, [L]LongPress, [EL]ExtraLongPress, [S3]Modifier Key on Joystick (Joystick Nosewhell Steering Button)__ 47 | 48 | **This Script require you have Check this Files before you start to Fly, so, please, take some minutes to check them.** 49 | 50 | When you are in game, if, Throttle Switch are misaligned for Landing Gears, Cargo Scoop or Lights, Just toggle the Switch. 51 | 52 | The Optimal PIP Mode, make Backup of Previous engaged PIP. By Default it will return to //2 SYS 2 ENG 2 WEP (0) if you don't make change before deploying Hardpoints or Fire after the game launch. 53 | I suggest, when you launch the game, to make one change to PIP before deploying hardpoints and another before fire, so the script can backup those value. 54 | 55 | 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. 56 | 57 | ## FEATURES: 58 | 59 | - [ ] __Support MFD (2), Rudders and T.Flight rudders__ (NOT TESTED YET) 60 | - [x] HMD / TrackIR Option for Some Function : Head Reset, Pause (TrackIr), Throttle Led Intensity. 61 | - [x] Easy Debug Msg OFF (Debugmode OFF (0) Or ON (1) In Settings File) 62 | - [ ] __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. 63 | - [x] Game Menu Up on Idle Throttle states. (Off by Default) 64 | - [x] __Secure Retract Mode__ : Automatic Retract of Hardpoint Gear and cargo when engaging Escape Fight Mode, Supercruise, FrameshiftDrive,... 65 | - [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 66 | - [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) 67 | - [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 68 | - [x] __Rotate Joystick Axis to account for center Joystick mounting position__ (CenterJoystickMount & JoystickAngle) 69 | - [ ] __Nvidia Shadowplay__ and __AMD Relive__ Video Capture and Streaming Support. (By Default, they are Disable) 70 | - [ ] __Steam Screenshot__ Support. (For Normal Screenshot only : Off by Default) 71 | - [ ] Possibility to swap Joystick and Throttle Maping in settings file (for now : SWAP SAME TYPE (Push, Toggle 2 positions, Toggle 3 positions or Hat) ONLY AND ON THE SAME DEVICE) 72 | 73 | 74 | ### LED: 75 | 76 | - [x] __Support Toggle & Flashing Throttle LED's__ 77 | - [x] __Support Toggle & Flashing MFD LED's__ 78 | - [x] __Support Toggle & Flashing Throttle & MFD's Backlight__ 79 | - [x] __Easy Led Configuration__ : You can chose what you want to be assigned for each LED (5) (Check Settings file comments / LED SETTINGS to know more about How To ..) 80 | - [x] __Throttle Backlight intensity On The Fly__ (S3 (Joystick Nosewhell Steering Button) + Friction Control Axis) 81 | - [x] __Throttle Backlight Intensity on Idle Throttle states__. (Setup In Settings File. Default is Backlight Throttle LED is OFF (ThrottleLEDOnIDLE in settings file)) 82 | - [x] __Flash briefly the Throttle BackLight__ for Game Event : Over Heating, Is In Danger, Being Interdicted, Low Fuel (< 25%) and Shield Down : Option (WarningLED) can be Desactived in Settings file, ON by default 83 | 84 | ### PIP: 85 | 86 | - [x] __Automatic PIP Mode__ (Backup & Restrore previous PIP Mode) when Fire, Escape Fight, Game Menu,... Can be switched ON/OFF On The Fly 87 | - [x] __PIP Management Joystick Hat Switch__ offering __12 different presets__ depending how long you hold down the Hat Button. 88 | 89 | ### PTT: 90 | 91 | - [x] Default PTT Mode (Toggle or Hold). Can be switched On The Fly (S3 (Joystick Nosewhell Steering Button) + Short Press Engine Operate Ign/Norm LEFT) 92 | - [x] Default PTT (Internal or External). Can be switched On The Fly (S3 (Joystick Nosewhell Steering Button) + Long Press Engine Operate Ign/Norm LEFT) 93 | 94 | ### HEAT SINK: 95 | 96 | - [ ] __Automatic Heat Sink On Silent Runing__. Can be switched On The Fly (Extra Long Data Management Switch UP) 97 | - [ ] __Automatic Heat Sink when Over Heating ( > 100% )__. You can Desactivate this option (HeatSinkOnOverHeat) in Settings file. ON by default 98 | - [x] __Automatic Silent Runing Off & On when Fire__ (if silent runing is up before fire) and for other functions. Can be switched On The Fly (Short Data Management Switch UP) 99 | 100 | ### JOYSTICK & THROTTLE CURVE: 101 | 102 | - [x] __3 Joystick Curve Switchable On The Fly__ (Slew stick is include in this function) Switch In Game With Throttle FLAPS 103 | - [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) 104 | - [x] __Enhanced Joystick Curves tailored for Flight Assist Off__ (Joystick Curve will return to previous state when FAON is release) Option You can also select the tailored curve (FAOffCurve) 105 | - [ ] __Enhanced Joystick Curves tailored when Approching Planet__ (Joystick Curve will return to previous state when you will leave Planet) Option (HasLatLongAssist) can be Desactived in Settings file, ON by default. You can also select the tailored curve (HasLatLongCurve) 106 | - [ ] __Support Joystick Axis trimming__ : memorize the X and Y axis position and calculate the difference to the 107 | 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) 108 | 109 | ### AUTOPILOT MODE: 110 | 111 | - [x] __3 Autopilot Mode__ : Easy Request and Cancel Docking procedure, Escape Fight and System Jump -------------------------------------------------------------------------------- /Thrustmaster Warthog Script/ED+HCS v3.3_Functions_TOGGLE.tmh: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 Thomas Duployez (CMDR Touille) 2 | // V3.3.01b 2018/12 3 | // Distributed freely under the MIT License. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 23 | // TOGGLE FUNCTIONS // 24 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 25 | 26 | //TOGGLE: Menu and LED OFF on Idle (Check PERSONAL SETTINGS in Settings File) 27 | int initToggleIDLEonThrottle(){ 28 | if(!Joystick[P_S3]){ //Reset On The FLY P_S3 + SWITCH 29 | if(Throttle[IDLELON]){ 30 | sIDLE = 1; 31 | initBACKLIGHT(Throttle_BL, ThrottleLightOnIDLE); 32 | if(USEMFD > 0)initBACKLIGHT(RMFD_BL, RMFDLightOnIDLE); 33 | if(USEMFD > 1)initBACKLIGHT(LMFD_BL, LMFDLightOnIDLE); 34 | } 35 | else{ 36 | sIDLE = 0; 37 | initBACKLIGHT(Throttle_BL, vThrottleLightBackup); 38 | if(USEMFD > 0)initBACKLIGHT(RMFD_BL, vRMFDLightBackup); 39 | if(USEMFD > 1)initBACKLIGHT(LMFD_BL, vLMFDLightBackup); 40 | } 41 | if(GameMenuOnIDLE) initGameMenu(); //If GameMenu on IDLE Option is 1, Launch Game Menu 42 | initLED(IDLEOnThrottle_LED, sIDLE); 43 | if(DebugMode | DebugMMode) printf("IDLE On Throttle [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sIDLE); 44 | } 45 | } 46 | 47 | //TOGGLE: StopFire Retract Hardpoints 48 | int initToggleStopFireRetractHardpoints(){ 49 | StopFireRetractHardpoints=!StopFireRetractHardpoints; 50 | initLED(StopFireRetractHardpoints_LED, StopFireRetractHardpoints); 51 | if(DebugMode | DebugMMode) printf("Retract HP on Fire [%d] [ENABLE:[1] DISABLE:[0]]\x0a", StopFireRetractHardpoints); 52 | } 53 | 54 | //TOGGLE: SecureRetract 55 | int initToggleSecureRetract(){ 56 | SecureRetract=!SecureRetract; 57 | initLED(SecureRetract_LED, SecureRetract); 58 | if(DebugMode | DebugMMode) printf("SecureRetract [%d] [ENABLE:[1] DISABLE:[0]]\x0a", SecureRetract); 59 | } 60 | 61 | //TOGGLE: Silent Runing OFF on Fire 62 | int initToggleSilentRuningOFFonFire(){ 63 | SilentRuningOFFonFire=!SilentRuningOFFonFire; 64 | initLED(SilentRuningOFFonFire_LED, SilentRuningOFFonFire); 65 | if(DebugMode | DebugMMode) printf("Silent Runing On Fire [%d] [ENABLE:[1] DISABLE:[0]]\x0a", SilentRuningOFFonFire); 66 | } 67 | 68 | //TOGGLE: HeatSink on Silent Runing 69 | int initToggleHeatSinkonSilentRuning(){ 70 | HeatSinkonSilentRuning=!HeatSinkonSilentRuning; 71 | initLED(HeatSinkOnSilentRuning_LED, HeatSinkonSilentRuning); 72 | if(DebugMode | DebugMMode) printf("Heat Sink on Silent Runing [%d] [ENABLE:[1] DISABLE:[0]]\x0a", HeatSinkonSilentRuning); 73 | } 74 | 75 | //TOGGLE: Optimal PIP Mode 76 | int initToggleOptimalPIPMode(){ 77 | OptimalPIPMode=!OptimalPIPMode; 78 | initLED(OptimalPIPMode_LED, OptimalPIPMode); 79 | if(DebugMode | DebugMMode) printf("Optimal PIPMode [%d] [ENABLE:[1] DISABLE:[0]]\x0a", OptimalPIPMode); 80 | } 81 | 82 | //TOGGLE: Supecruise On Throttle Mode 83 | int initToggleSuperCruiseMode(){ 84 | SupecruiseOnThrottle=!SupecruiseOnThrottle; 85 | //If No Hardware AfetrBurner Detent & SupecruiseOnThrottle is Enable : SuperCruise if Throttle > 99% axis 86 | if (SupecruiseOnThrottle & !AfterburnerDetent) KeyAxis(&Throttle, THR_RIGHT, 0, AXMAP1(LIST(0,99,100), EXEC("initSecureRectract();ActKey(KEYON+PULSE+Supercruise);"), 0)); 87 | //If Hardware AfetrBurner Detent & SupecruiseOnThrottle is Enable : SuperCruise if Throttle > 80% axis 88 | else if(SupecruiseOnThrottle & AfterburnerDetent) KeyAxis(&Throttle, THR_RIGHT, 0, AXMAP1(LIST(0,80,100), EXEC("initSecureRectract();ActKey(KEYON+PULSE+Supercruise);"), 0)); 89 | //If SupecruiseOnThrottle is Disable : Do nothing on axis 90 | else KeyAxis(&Throttle, THR_RIGHT, 0, AXMAP1(LIST(0), 0, 0)); 91 | initLED(SupecruiseOnThrottle_LED, SupecruiseOnThrottle); 92 | if(DebugMode | DebugMMode) printf("Supecruise On Throttle [%d] [ENABLE:[1] DISABLE:[0]]\x0a", SupecruiseOnThrottle); 93 | } 94 | 95 | //TOGGLE: Combined Fire 96 | int initToggleCombinedFire(){ 97 | sCombinedFire=!sCombinedFire; 98 | if(sCombinedFire){ //Combine Primary & Secondary Fire on TG2 99 | MapKey (&Joystick, TG2, EXEC("initFire();")); 100 | MapKeyR(&Joystick, TG2, EXEC("initFire();")); 101 | } 102 | else{ //Separate Primary & Secondary Fire Press TG2 do Nothing 103 | MapKey (&Joystick, TG2, 0); 104 | MapKeyR(&Joystick, TG2, 0); 105 | } 106 | initLED(CombinedFire_LED, sCombinedFire); 107 | if(DebugMode | DebugMMode) printf("Primary & Secondary Fire [%d] [COMBINED:[1] SEPARATE[0]]\x0a", sCombinedFire); 108 | } 109 | 110 | //---------------------Voice------------------------------------------------------------------------------------------------------------------------------------// 111 | 112 | //TOGGLE: Voice Attack Mic 113 | int initToggleVoiceAttackMic(){ 114 | if(VoiceAttack){ 115 | sVoiceAttack=!sVoiceAttack; 116 | ActKey(KEYON+PULSE+ToggleVoiceAttackMic); 117 | initLED(VA_LED, sVoiceAttack); 118 | if(DebugMode | DebugMMode) printf("Voice Attack Mic [%d] [MUTE:[1] UNMUTE:[0]]\x0a", sVoiceAttack); 119 | } 120 | } 121 | 122 | //TOGGLE: PTT/PTP 123 | int initTogglePTTPTP(){ 124 | sPTTMode=!sPTTMode; 125 | initLED(PTTMode_LED, sPTTMode); 126 | if(DebugMode | DebugMMode) printf("PTTMode Change [%d] [HOLD:[0] TOGGLE:[1]]\x0a", sPTTMode); 127 | } 128 | 129 | //TOGGLE: External/Internal Voice 130 | int initTogglePTTMode(){ 131 | sPTTState=!sPTTState; 132 | initLED(PTT_LED, sPTTState); 133 | if(DebugMode | DebugMMode) printf("Mic Change [%d] [External:[0]Internal:[1]]\x0a", sPTTState); 134 | } 135 | 136 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 137 | // TOGGLE GAMES FUNCTIONS // 138 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 139 | 140 | //TOGGLE: Landing Gear 141 | int initToggleLandingGear(){ 142 | if(Throttle[T2_EACON] & !s_LandingGearDown | !Throttle[T2_EACON] & s_LandingGearDown | vSecureEscapeFight){ 143 | ActKey(KEYON+PULSE+LandingGear); 144 | } 145 | } 146 | 147 | //TOGGLE: Cargo Scoop 148 | int initToggleCargoScoop(){ 149 | if(Throttle[T2_RDRNRM] & !s_CargoScoopDeployed | !Throttle[T2_RDRNRM] & s_CargoScoopDeployed | vSecureEscapeFight){ 150 | ActKey(KEYON+PULSE+CargoScoop); 151 | } 152 | } 153 | 154 | //TOGGLE: Light 155 | int initToggleLights(){ 156 | if(Throttle[T2_EFRNORM] & !s_LightsOn | !Throttle[T2_EFRNORM] & s_LightsOn){ 157 | ActKey(KEYON+PULSE+ShipLights); //Switch position is UP : Light Is ON 158 | } 159 | } 160 | 161 | //TOGGLE: HUD Mode 162 | int initToggleHUDMode(){ 163 | if(Throttle[T2_EFLNORM] & !s_HUDAnalysis | !Throttle[T2_EFLNORM] & s_HUDAnalysis){ 164 | ActKey(KEYON+PULSE+HUDMode); 165 | } 166 | } 167 | //TOGGLE: HardPoints 168 | int initToggleHardpoints(){ 169 | if(!Joystick[P_S3] | (Joystick[P_S3] & Joystick[TG1]) | (Joystick[P_S3] & Joystick[P_S2])){ // No [P_S3] Pressed OR automatic fire with [P_S3]? 170 | ActKey(KEYON+PULSE+DeployHardpoints); 171 | } else if(Joystick[P_S3] & (!Joystick[TG1] | !Joystick[P_S2])){ //Reset The Flag On The FLY P_S3 + SWITCH 172 | if(DebugMode | DebugMMode) printf("Reset On The Fly with P_S3 : Hardpoints\x0a"); 173 | } 174 | } 175 | 176 | //TOGGLE: Silent Runing 177 | int initToggleSilentRuning(){ 178 | if(Joystick[H3D] | Joystick[TG1] | Joystick[P_S2] | vSLonFire | vSLonEscapeFight | vSLonGameMenu | vSLonCamera){ 179 | if(SilentRuningGameMode){ //Silent Runing [TOGGLE] Mode Ingame 180 | if(HeatSinkonSilentRuning) ActKey(KEYON+PULSE+mHeatSinkonSilentRuning); //Call The Heat Sink on Silent Running Macro 181 | else ActKey(KEYON+PULSE+SilentRunning); 182 | } 183 | else ActKey(KEYON+DOWN+SilentRunning); //Silent Runing [HOLD] Mode Engage 184 | } else { 185 | if(!SilentRuningGameMode & s_SilentRunning) ActKey(KEYON+UP+SilentRunning); //Silent Runing [HOLD] Mode DisEngage 186 | } 187 | } 188 | 189 | //TOGGLE: Enhanced Joystick Curves tailored for Flight Assist Off ONLY IF Rotational Correction is Enable 190 | int initToggleEnhancedFAOFF(){ 191 | if (!s_Supercruise){ 192 | if(Joystick[P_S4]){ 193 | if(FlightAssistGameMode){ //FA [TOGGLE] Mode Ingame 194 | vFA=!vFA; 195 | if(sRCorrection){ 196 | if(vFA){ //FA [TOGGLE] Mode First Pulse Engage 197 | vJoystickCurveProfileBackup = vJoystickCurveProfile; //Backup Current Curves 198 | vJoystickCurveProfile = FAOffCurve; //Apply the Setting FAOffCurve (Settings) 199 | if(vJoystickCurveProfileBackup != FAOffCurve){ //Only if Previous Curve is != from FAOffCurrve preset 200 | initJoystickCurves(); 201 | if(DebugMode | DebugMMode) printf("Curve Profile Adjusted\x0a"); 202 | } 203 | } 204 | else{ //FA [TOGGLE] Mode Second Pulse DisEngage 205 | vJoystickCurveProfile = vJoystickCurveProfileBackup; //Restore Previous Curves 206 | if(vJoystickCurveProfileBackup != FAOffCurve){ //Only if Previous Curve is != from FAOffCurrve preset 207 | initJoystickCurves(); 208 | if(DebugMode | DebugMMode) printf("Curve Profile Return to Default\x0a"); 209 | } 210 | } 211 | } 212 | ActKey(KEYON+PULSE+FlightAssist); 213 | } 214 | else { //FA [HOLD] Mode Ingame Engage 215 | if(sRCorrection){ 216 | vJoystickCurveProfileBackup = vJoystickCurveProfile; //Backup Current Curves 217 | vJoystickCurveProfile = FAOffCurve; //Apply the Setting FAOffCurve (Settings) 218 | if(vJoystickCurveProfileBackup != FAOffCurve){ //Only if Previous Curve is != from FAOffCurrve preset 219 | initJoystickCurves(); 220 | if(DebugMode | DebugMMode) printf("Curve Profile Adjusted\x0a"); 221 | } 222 | } 223 | ActKey(KEYON+DOWN+FlightAssist); 224 | } 225 | } 226 | else if (!s_Supercruise){ 227 | if(!FlightAssistGameMode & s_FlightAssistOff){ //FA [HOLD] Mode Ingame DisEngage 228 | if(sRCorrection){ 229 | vJoystickCurveProfile = vJoystickCurveProfileBackup; //Restore Previous Curves 230 | if(vJoystickCurveProfileBackup != FAOffCurve){ //Only if Previous Curve is != from FAOffCurrve preset 231 | initJoystickCurves(); 232 | if(DebugMode | DebugMMode) printf("Curve Profile Return to Default\x0a"); 233 | } 234 | } 235 | ActKey(KEYON+UP+FlightAssist); 236 | } 237 | } 238 | } 239 | } 240 | 241 | //TOGGLE: Reverse Throttle 242 | int initToggleReverseThrottle(){ 243 | if(Throttle[P_LTB]){ 244 | sRT=!sRT; 245 | if(RFlightThrootleGameMode) ActKey(KEYON+PULSE+ReverseThrottle); //TOGGLE 246 | else ActKey(KEYON+DOWN+ReverseThrottle); //HOLD Key Down 247 | } 248 | else{ //HOLD Key Up 249 | if(!RFlightThrootleGameMode & sRT){ 250 | sRT=!sRT; 251 | ActKey(KEYON+UP+ReverseThrottle); 252 | } 253 | } 254 | initLED(ReverseThrottle_LED, sRT); 255 | if(DebugMode) printf("Reverse Throttle [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sRT ); 256 | } 257 | 258 | //TOGGLE: Rotational Correction 259 | int initToggleRotationalCorrection(){ 260 | sRCorrection=!sRCorrection; 261 | ActKey(KEYON+PULSE+RotationalCorrection); 262 | initLED(RCorrection_LED, sRCorrection); 263 | if(DebugMode) printf("Rotational Correction [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sRCorrection); 264 | } 265 | 266 | //TOGGLE: External Camera 267 | int initToggleCamera(){ 268 | sCameraMode=!sCameraMode; 269 | if(s_SilentRunning){ 270 | vSLonCamera=!vSLonCamera; 271 | initToggleSilentRuning(); //If Silent Runing is Engaged, Disengade it 272 | vSLonCamera=!vSLonCamera; 273 | } 274 | if(sCameraMode){ //Open The Camera Mode 275 | if(OptimalPIPMode){ 276 | initBackupPIPPower(OptimalPIPCCBackup); //Backup Actual PIP Mode OptimalPIPCCBackup (5) 277 | initPIPPower(SYS, ENG); //4 SYS 2 ENG (3) 278 | } 279 | DeferCall(1000, &ActKey, KEYON+PULSE+mClassifiedCamera); //Call The Camera Mode Macro 280 | } 281 | else{ //Close The Camera Mode 282 | ActKey(KEYON+PULSE+ClassifiedCamera); //Push The Camera Mode Key 283 | if(OptimalPIPMode) DeferCall(1000, &ActKey, KEYON+PULSE+EXEC("initRestorePIPPower(vOptimalPIPCCBackup);")); //Restore Previous PIP Mode If vOptimalPIPCCBackup != 4 SYS 2 ENG (3) 284 | } 285 | initLED(Camera_LED, sCameraMode); 286 | if(DebugMode) printf("Classified Camera [%d] [ON:[1] OFF:[0]]\x0a", sCameraMode); 287 | } 288 | 289 | //TOGGLE: Head Look 290 | int initToogleHeadLook(){ 291 | if(!HMD & !TrackIR){ 292 | if(Throttle[P_SC]){ 293 | sHeadLook=!sHeadLook; 294 | if(HeadLookGameMode){ //HeadLook [TOGGLE] Mode Ingame 295 | ActKey(KEYON+PULSE+HeadLook); 296 | if(DebugMode) printf("Head Look [TOOGLE] [%d] [ON:[1] OFF:[0]]\x0a", sHeadLook); 297 | } 298 | else ActKey(KEYON+DOWN+HeadLook); //HeadLook [HOLD] Mode Ingame Engage 299 | } 300 | else{ 301 | if(!HeadLookGameMode & sHeadLook){ //HeadLook [HOLD] Mode Ingame DisEngage 302 | sHeadLook=!sHeadLook; 303 | ActKey(KEYON+UP+HeadLook); 304 | } 305 | } 306 | initLED(HeadLook_LED, sHeadLook); 307 | if(DebugMode & !HeadLookGameMode) printf("Head Look [HOLD] [%d] [ON:[1] OFF:[0]]\x0a", sHeadLook); 308 | } 309 | } 310 | 311 | //TOGGLE: GameMenu 312 | int initToggleGameMenu(){ 313 | sGameMenu=!sGameMenu; 314 | if(s_SilentRunning){ 315 | vSLonGameMenu=!vSLonGameMenu; 316 | initToggleSilentRuning(); //If Silent Runing is Engaged, Disengade it 317 | vSLonGameMenu=!vSLonGameMenu; 318 | } 319 | if(sGameMenu){ //Open The Game Menu 320 | if(OptimalPIPMode){ 321 | initBackupPIPPower(OptimalPIPGMBackup); //Backup Actual PIP Mode OptimalPIPGMBackup (4) 322 | initPIPPower(SYS, ENG); //4 SYS 2 ENG (3) 323 | } 324 | ActKey(KEYON+PULSE+SetSpeed0); 325 | } 326 | else{ //Close The Game Menu 327 | if(OptimalPIPMode) DeferCall(6000, &ActKey, KEYON+PULSE+EXEC("initRestorePIPPower(vOptimalPIPGMBackup);")); //Restore Previous PIP Mode If vOptimalPIPGMBackup != 4 SYS 2 ENG (3) 328 | } 329 | DeferCall(3000, &ActKey, KEYON+PULSE+GameMenu); 330 | initLED(GameMenu_LED, sGameMenu); 331 | if(DebugMode) printf("Game Menu [%d] [ENABLE:[1] DISABLE:[0]]\x0a", sGameMenu); 332 | } -------------------------------------------------------------------------------- /Thrustmaster Warthog Script/ED+HCS v3.3_USBKey.ttm: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 Thomas Duployez (CMDR Touille) 2 | // V3.3.01b 2018/12 3 | // Distributed freely under the MIT License. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 23 | // USB KEY DEFINITIONS // 24 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 25 | 26 | define USB_A USB[0x04] // [ 4] a or A 27 | define USB_B USB[0x05] // [ 5] b or B 28 | define USB_C USB[0x06] // [ 6] c or C 29 | define USB_D USB[0x07] // [ 7] d or D 30 | define USB_E USB[0x08] // [ 8] e or E 31 | define USB_F USB[0x09] // [ 9] f or F 32 | define USB_G USB[0x0A] // [ 10] g or G 33 | define USB_H USB[0x0B] // [ 11] h or H 34 | define USB_I USB[0x0C] // [ 12] i or I 35 | define USB_J USB[0x0D] // [ 13] j or J 36 | define USB_K USB[0x0E] // [ 14] k or K 37 | define USB_L USB[0x0F] // [ 15] l or L 38 | define USB_M USB[0x10] // [ 16] m or M 39 | define USB_N USB[0x11] // [ 17] n or N 40 | define USB_O USB[0x12] // [ 18] o or O 41 | define USB_P USB[0x13] // [ 19] p or P 42 | define USB_Q USB[0x14] // [ 20] q or Q 43 | define USB_R USB[0x15] // [ 21] r or R 44 | define USB_S USB[0x16] // [ 22] s or S 45 | define USB_T USB[0x17] // [ 23] t or T 46 | define USB_U USB[0x18] // [ 24] u or U 47 | define USB_V USB[0x19] // [ 25] v or V 48 | define USB_W USB[0x1A] // [ 26] w or W 49 | define USB_X USB[0x1B] // [ 27] x or X 50 | define USB_Y USB[0x1C] // [ 28] y or Y 51 | define USB_Z USB[0x1D] // [ 29] z or Z 52 | define USB_1 USB[0x1E] // [ 30] 1 or ! 53 | define USB_2 USB[0x1F] // [ 31] 2 or @ 54 | define USB_3 USB[0x20] // [ 32] 3 or # 55 | define USB_4 USB[0x21] // [ 33] 4 or $ 56 | define USB_5 USB[0x22] // [ 34] 5 or % 57 | define USB_6 USB[0x23] // [ 35] 6 or ^ 58 | define USB_7 USB[0x24] // [ 36] 7 or & 59 | define USB_8 USB[0x25] // [ 37] 8 or * 60 | define USB_9 USB[0x26] // [ 38] 9 or ( 61 | define USB_0 USB[0x27] // [ 39] 0 or ) 62 | define USB_RETURNORENTER USB[0x28] // [ 40] Return (Enter) 63 | define USB_ESCAPE USB[0x29] // [ 41] Escape 64 | define USB_DELETEORBACKSPACE USB[0x2A] // [ 42] Delete (Backspace) 65 | define USB_TAB USB[0x2B] // [ 43] Tab 66 | define USB_SPACEBAR USB[0x2C] // [ 44] Spacebar 67 | define USB_HYPHEN USB[0x2D] // [ 45] - or _ 68 | define USB_EQUALSIGN USB[0x2E] // [ 46] = or + 69 | define USB_OPENBRACKET USB[0x2F] // [ 47] [ or { 70 | define USB_CLOSEBRACKET USB[0x30] // [ 48] ] or } 71 | define USB_BACKSLASH USB[0x31] // [ 49] \ or | 72 | define USB_NONUSPOUND USB[0x32] // [ 50] Non-US # or _ 73 | define USB_SEMICOLON USB[0x33] // [ 51] ; or : 74 | define USB_QUOTE USB[0x34] // [ 52] ' or " 75 | define USB_GRAVEACCENTANDTILDE USB[0x35] // [ 53] Grave Accent and Tilde 76 | define USB_COMMA USB[0x36] // [ 54] , or < 77 | define USB_PERIOD USB[0x37] // [ 55] . or > 78 | define USB_SLASH USB[0x38] // [ 56] / or ? 79 | define USB_CAPSLOCK USB[0x39] // [ 57] Caps Lock 80 | define USB_F1 USB[0x3A] // [ 58] F1 81 | define USB_F2 USB[0x3B] // [ 59] F2 82 | define USB_F3 USB[0x3C] // [ 60] F3 83 | define USB_F4 USB[0x3D] // [ 61] F4 84 | define USB_F5 USB[0x3E] // [ 62] F5 85 | define USB_F6 USB[0x3F] // [ 63] F6 86 | define USB_F7 USB[0x40] // [ 64] F7 87 | define USB_F8 USB[0x41] // [ 65] F8 88 | define USB_F9 USB[0x42] // [ 66] F9 89 | define USB_F10 USB[0x43] // [ 67] F10 90 | define USB_F11 USB[0x44] // [ 68] F11 91 | define USB_F12 USB[0x45] // [ 69] F12 92 | define USB_PRINTSCREEN USB[0x46] // [ 70] Print Screen 93 | define USB_SCROLLLOCK USB[0x47] // [ 71] Scroll Lock 94 | define USB_PAUSE USB[0x48] // [ 72] Pause 95 | define USB_INSERT USB[0x49] // [ 73] Insert 96 | define USB_HOME USB[0x4A] // [ 74] Home 97 | define USB_PAGEUP USB[0x4B] // [ 75] Page Up 98 | define USB_DELETEFORWARD USB[0x4C] // [ 76] Delete Forward 99 | define USB_END USB[0x4D] // [ 77] End 100 | define USB_PAGEDOWN USB[0x4E] // [ 78] Page Down 101 | define USB_RIGHTARROW USB[0x4F] // [ 79] Right Arrow 102 | define USB_LEFTARROW USB[0x50] // [ 80] Left Arrow 103 | define USB_DOWNARROW USB[0x51] // [ 81] Down Arrow 104 | define USB_UPARROW USB[0x52] // [ 82] Up Arrow 105 | define USB_KP_NUMLOCK USB[0x53] // [ 83] Keypad NumLock or Clear 106 | define USB_KP_SLASH USB[0x54] // [ 84] Keypad / 107 | define USB_KP_ASTERISK USB[0x55] // [ 85] Keypad * 108 | define USB_KP_HYPHEN USB[0x56] // [ 86] Keypad - 109 | define USB_KP_PLUS USB[0x57] // [ 87] Keypad + 110 | define USB_KP_ENTER USB[0x58] // [ 88] Keypad Enter 111 | define USB_KP_1 USB[0x59] // [ 89] Keypad 1 or End 112 | define USB_KP_2 USB[0x5A] // [ 90] Keypad 2 or Down Arrow 113 | define USB_KP_3 USB[0x5B] // [ 91] Keypad 3 or Page Down 114 | define USB_KP_4 USB[0x5C] // [ 92] Keypad 4 or Left Arrow 115 | define USB_KP_5 USB[0x5D] // [ 93] Keypad 5 116 | define USB_KP_6 USB[0x5E] // [ 94] Keypad 6 or Right Arrow 117 | define USB_KP_7 USB[0x5F] // [ 95] Keypad 7 or Home 118 | define USB_KP_8 USB[0x60] // [ 96] Keypad 8 or Up Arrow 119 | define USB_KP_9 USB[0x61] // [ 97] Keypad 9 or Page Up 120 | define USB_KP_0 USB[0x62] // [ 98] Keypad 0 or Insert 121 | define USB_KP_PERIOD USB[0x63] // [ 99] Keypad . or Delete 122 | define USB_NONUSBACKSLASH USB[0x64] // [100] Non-US \ or | 123 | define USB_APPLICATION USB[0x65] // [101] Application 124 | define USB_POWER USB[0x66] // [102] Power 125 | define USB_KP_EQUALSIGN USB[0x67] // [103] Keypad = 126 | define USB_F13 USB[0x68] // [104] F13 127 | define USB_F14 USB[0x69] // [105] F14 128 | define USB_F15 USB[0x6A] // [106] F15 129 | define USB_F16 USB[0x6B] // [107] F16 130 | define USB_F17 USB[0x6C] // [108] F17 131 | define USB_F18 USB[0x6D] // [109] F18 132 | define USB_F19 USB[0x6E] // [110] F19 133 | define USB_F20 USB[0x6F] // [111] F20 134 | define USB_F21 USB[0x70] // [112] F21 135 | define USB_F22 USB[0x71] // [113] F22 136 | define USB_F23 USB[0x72] // [114] F23 137 | define USB_F24 USB[0x73] // [115] F24 138 | define USB_EXECUTE USB[0x74] // [116] Execute 139 | define USB_HELP USB[0x75] // [117] Help 140 | define USB_MENU USB[0x76] // [118] Menu 141 | define USB_SELECT USB[0x77] // [119] Select 142 | define USB_STOP USB[0x78] // [120] Stop 143 | define USB_AGAIN USB[0x79] // [121] Again 144 | define USB_UNDO USB[0x7A] // [122] Undo 145 | define USB_CUT USB[0x7B] // [123] Cut 146 | define USB_COPY USB[0x7C] // [124] Copy 147 | define USB_PASTE USB[0x7D] // [125] Paste 148 | define USB_FIND USB[0x7E] // [126] Find 149 | define USB_MUTE USB[0x7F] // [127] Mute 150 | define USB_VOLUMEUP USB[0x80] // [128] Volume Up 151 | define USB_VOLUMEDOWN USB[0x81] // [129] Volume Down 152 | define USB_LOCKINGCAPSLOCK USB[0x82] // [130] Locking Caps Lock 153 | define USB_LOCKINGNUMLOCK USB[0x83] // [131] Locking Num Lock 154 | define USB_LOCKINGSCROLLLOCK USB[0x84] // [132] Locking Scroll Lock 155 | define USB_KP_COMMA USB[0x85] // [133] Keypad Comma 156 | define USB_KP_EQUALSIGNAS400 USB[0x86] // [134] Keypad Equal Sign for AS/400 157 | define USB_INTERNATIONAL1 USB[0x87] // [135] International1 158 | define USB_INTERNATIONAL2 USB[0x88] // [136] International2 159 | define USB_INTERNATIONAL3 USB[0x89] // [137] International3 160 | define USB_INTERNATIONAL4 USB[0x8A] // [138] International4 161 | define USB_INTERNATIONAL5 USB[0x8B] // [139] International5 162 | define USB_INTERNATIONAL6 USB[0x8C] // [140] International6 163 | define USB_INTERNATIONAL7 USB[0x8D] // [141] International7 164 | define USB_INTERNATIONAL8 USB[0x8E] // [142] International8 165 | define USB_INTERNATIONAL9 USB[0x8F] // [143] International9 166 | define USB_LANG1 USB[0x90] // [144] LANG1 167 | define USB_LANG2 USB[0x91] // [145] LANG2 168 | define USB_LANG3 USB[0x92] // [146] LANG3 169 | define USB_LANG4 USB[0x93] // [147] LANG4 170 | define USB_LANG5 USB[0x94] // [148] LANG5 171 | define USB_LANG6 USB[0x95] // [149] LANG6 172 | define USB_LANG7 USB[0x96] // [150] LANG7 173 | define USB_LANG8 USB[0x97] // [151] LANG8 174 | define USB_LANG9 USB[0x98] // [152] LANG9 175 | define USB_ALTERNATEERASE USB[0x99] // [153] AlternateErase 176 | define USB_SYSREQORATTENTION USB[0x9A] // [154] SysReq/Attention 177 | define USB_CANCEL USB[0x9B] // [155] Cancel 178 | define USB_CLEAR USB[0x9C] // [156] Clear 179 | define USB_PRIOR USB[0x9D] // [157] Prior 180 | define USB_RETURN USB[0x9E] // [158] Return 181 | define USB_SEPARATOR USB[0x9F] // [159] Separator 182 | define USB_OUT USB[0xA0] // [160] Out 183 | define USB_OPER USB[0xA1] // [161] Oper 184 | define USB_CLEARORAGAIN USB[0xA2] // [162] Clear/Again 185 | define USB_CRSELORPROPS USB[0xA3] // [163] CrSel/Props 186 | define USB_EXSEL USB[0xA4] // [164] ExSel 187 | // 0xA5-0xDF Reserved 188 | define USB_LEFTCONTROL USB[0xE0] // [225]Left Control 189 | define USB_LEFTSHIFT USB[0xE1] // [226] Left Shift 190 | define USB_LEFTALT USB[0xE2] // [227] Left Alt 191 | define USB_LEFTGUI USB[0xE3] // [228] Left GUI 192 | define USB_RIGHTCONTROL USB[0xE4] // [229] Right Control 193 | define USB_RIGHTSHIFT USB[0xE5] // [230] Right Shift 194 | define USB_RIGHTALT USB[0xE6] // [231] Right Alt 195 | define USB_RIGHTGUI USB[0xE7] // [232] Right GUI 196 | // 0xE8-0xFFFF Reserved 197 | define USB__RESERVED USB[0xFFFF] 198 | 199 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 200 | // REFERENCE: USB KEY DEFINITIONS // // 201 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 202 | // // 203 | // A USB[0x04] 1 USB[0x1E] ENTER USB[0x28] PRINT SCREEN USB[0x46] NUMPAD / USB[0x54] F1 USB[0x3A] // 204 | // B USB[0x05] 2 USB[0x1F] ESCAPE USB[0x29] SCROLL LOCK USB[0x47] NUMPAD * USB[0x55] F2 USB[0x3B] // 205 | // C USB[0x06] 3 USB[0x20] BACKSPACE USB[0x2A] PAUSE/BREAK USB[0x48] NUMPAD - USB[0x56] F3 USB[0x3C] // 206 | // D USB[0x07] 4 USB[0x21] TAB USB[0x2B] NUM LOCK USB[0x53] NUMPAD + USB[0x57] F4 USB[0x3D] // 207 | // E USB[0x08] 5 USB[0x22] SPACE USB[0x2C] INSERT USB[0x49] NUMPAD ENT USB[0x58] F5 USB[0x3E] // 208 | // F USB[0x09] 6 USB[0x23] - _ USB[0x2D] HOME USB[0x4A] NUMPAD 1 USB[0x59] F6 USB[0x3F] // 209 | // G USB[0x0A] 7 USB[0x24] = + USB[0x2E] PAGE UP USB[0x4B] NUMPAD 2 USB[0x5A] F7 USB[0x40] // 210 | // H USB[0x0B] 8 USB[0x25] [ { USB[0x2F] DELETE USB[0x4C] NUMPAD 3 USB[0x5B] F8 USB[0x41] // 211 | // I USB[0x0C] 9 USB[0x26] ] } USB[0x30] END USB[0x4D] NUMPAD 4 USB[0x5C] F9 USB[0x42] // 212 | // J USB[0x0D] 0 USB[0x27] \ | USB[0x31] PAGE DOWN USB[0x4E] NUMPAD 5 USB[0x5D] F10 USB[0x43] // 213 | // K USB[0x0E] EUROPE1** USB[0x32] NUMPAD 6 USB[0x5E] F11 USB[0x44] // 214 | // L USB[0x0F] ; : USB[0x33] RIGHT ARROW USB[0x4F] NUMPAD 7 USB[0x5F] F12 USB[0x45] // 215 | // M USB[0x10] ' " USB[0x34] LEFT ARROW USB[0x50] NUMPAD 8 USB[0x60] F13 USB[0x68] // 216 | // N USB[0x11] ` ~ USB[0x35] DOWN ARROW USB[0x51] NUMPAD 9 USB[0x61] F14 USB[0x69] // 217 | // O USB[0x12] , < USB[0x36] UP ARROW USB[0x52] NUMPAD 0 USB[0x62] F15 USB[0x6A] // 218 | // P USB[0x13] . > USB[0x37] NUMPAD . USB[0x63] F16 USB[0x6B] // 219 | // Q USB[0x14] / ? USB[0x38] MUTE USB[0x7F] NUMPAD = USB[0x67] F17 USB[0x6C] // 220 | // R USB[0x15] CAPS LOCK USB[0x39] VOL UP USB[0x80] F18 USB[0x6D] // 221 | // S USB[0x16] VOL DOWN USB[0x81] F19 USB[0x6E] // 222 | // T USB[0x17] L_CTL USB[0xE0] F20 USB[0x6F] // 223 | // U USB[0x18] L_SHIFT USB[0xE1] EUROPE2** USB[0x64] F21 USB[0x70] // 224 | // V USB[0x19] L_ALT USB[0xE2] APPLICATION USB[0x65] F22 USB[0x71] // 225 | // W USB[0x1A] L_WIN USB[0xE3] POWER USB[0x66] F23 USB[0x72] // 226 | // X USB[0x1B] R_CTL USB[0xE4] F24 USB[0x73] // 227 | // Y USB[0x1C] R_SHIFT USB[0xE5] // 228 | // Z USB[0x1D] R_ALT USB[0xE6] // 229 | // R_WIN USB[0xE7] ** Further Special Keyboard Commands on page 54/60 of Target Script Editor Manual ** // 230 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// -------------------------------------------------------------------------------- /Thrustmaster Warthog Script/ED+HCS v3.3_API_TCP.tmh: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 Thomas Duployez (CMDR Touille) 2 | // V3.3.01b 2018/12 3 | // Distributed freely under the MIT License. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 23 | // API Variables // 24 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 25 | 26 | int Flags; 27 | //int size_Flags; 28 | 29 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 30 | // API Constants Status.Json FLAGS // 31 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 32 | 33 | //----------------------flag status.json constances Bit 34 | 35 | //byte f_Docked = 0x00000001; 36 | //byte f_Landed = 0x00000002; 37 | //byte f_LandingGearDown = 0x00000004; 38 | //byte f_ShieldUp = 0x00000008; 39 | //byte f_Supercruise = 0x00000010; 40 | //byte f_FlightAssistOff = 0x00000020; 41 | //byte f_HardpointsDeployed = 0x00000040; 42 | //byte f_InWing = 0x00000080; 43 | //byte f_LightsOn = 0x00000100; 44 | //byte f_CargoScoopDeployed = 0x00000200; 45 | //byte f_SilentRunning = 0x00000400; 46 | //byte f_ScoopingFuel = 0x00000800; 47 | //byte f_SrvHandbrake = 0x00001000; 48 | //byte f_SrvTurret = 0x00002000; 49 | //byte f_SrvUnderShip = 0x00004000; 50 | //byte f_SrvDriveAssist = 0x00008000; 51 | //byte f_FsdMassLocked = 0x00010000; 52 | //byte f_FsdCharging = 0x00020000; 53 | //byte f_FsdCooldown = 0x00040000; 54 | //byte f_LowFuel = 0x00080000; 55 | //byte f_OverHeating = 0x00100000; 56 | //byte f_HasLatLong = 0x00200000; 57 | //byte f_IsInDanger = 0x00400000; 58 | //byte f_BeingInterdicted = 0x00800000; 59 | //byte f_InMainShip = 0x01000000; 60 | //byte f_InFighter = 0x02000000; 61 | //byte f_InSRV = 0x04000000; 62 | //byte f_HUDAnalysis = 0x08000000; 63 | //byte f_NightVision = 0x10000000; 64 | 65 | 66 | //----------------------flag status.json constances Value 67 | 68 | int f_Docked = 1; //Docked, (on a landing pad) 69 | int f_Landed = 2; //Landed, (on planet surface) 70 | int f_LandingGearDown = 4; //Landing Gear Down 71 | int f_ShieldUp = 8; //Shields Up 72 | int f_Supercruise = 16; //Supercruise 73 | int f_FlightAssistOff = 32; //FlightAssist Off 74 | int f_HardpointsDeployed = 64; //Hardpoints Deployed 75 | int f_InWing = 128; //In Wing 76 | int f_LightsOn = 256; //LightsOn 77 | int f_CargoScoopDeployed = 512; //Cargo Scoop Deployed 78 | int f_SilentRunning = 1024; //Silent Running 79 | int f_ScoopingFuel = 2048; //Scooping Fuel 80 | int f_SrvHandbrake = 4096; //Srv Handbrake 81 | int f_SrvTurret = 8192; //Srv Turret 82 | int f_SrvUnderShip = 16384; //Srv UnderShip 83 | int f_SrvDriveAssist = 32768; //Srv DriveAssist 84 | int f_FsdMassLocked = 65536; //Fsd MassLocked 85 | int f_FsdCharging = 131072; //Fsd Charging 86 | int f_FsdCooldown = 262144; //Fsd Cooldown 87 | int f_LowFuel = 524288; //Low Fuel ( < 25% ) 88 | int f_OverHeating = 1048576; //Over Heating ( > 100% ) 89 | int f_HasLatLong = 2097152; //Has Lat Long 90 | int f_IsInDanger = 4194304; //IsInDanger 91 | int f_BeingInterdicted = 8388608; //Being Interdicted 92 | int f_InMainShip = 16777216; //In MainShip 93 | int f_InFighter = 33554432; //In Fighter 94 | int f_InSRV = 67108864; //In SRV 95 | int f_HUDAnalysis = 134217728; //Hud in Analysis mode 96 | int f_NightVision = 268435456; //Night Vision 97 | 98 | 99 | //----------------------State of flag 100 | 101 | int s_Docked; 102 | int s_Landed; 103 | int s_LandingGearDown; //initToggleLandingGear() 104 | int s_ShieldUp; 105 | int s_Supercruise; 106 | int s_FlightAssistOff; //initToggleEnhancedFAOFF() initAxisUpdateFA() 107 | int s_HardpointsDeployed; //initToggleHardpoints() 108 | int s_InWing; 109 | int s_LightsOn; //initToggleLights() 110 | int s_CargoScoopDeployed; //initToggleCargoScoop() 111 | int s_SilentRunning; //initToggleSilentRuning() 112 | int s_ScoopingFuel; 113 | int s_SrvHandbrake; 114 | int s_SrvTurret; 115 | int s_SrvUnderShip; 116 | int s_SrvDriveAssist; 117 | int s_FsdMassLocked; 118 | int s_FsdCharging; 119 | int s_FsdCooldown; 120 | int s_LowFuel; 121 | int s_OverHeating; 122 | int s_HasLatLong; 123 | int s_IsInDanger; 124 | int s_BeingInterdicted; 125 | int s_InMainShip; 126 | int s_InFighter; 127 | int s_InSRV; 128 | int s_HUDAnalysis; 129 | int s_NightVision; 130 | 131 | 132 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 133 | // API Flags Checker // 134 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 135 | 136 | int f_Check(){ 137 | 138 | if(DebugFlagsMode) printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\x0a"); 139 | 140 | //0 1 0000 0001 Docked, (on a landing pad) 141 | if (Flags & f_Docked) s_Docked = 1; 142 | else s_Docked = 0; 143 | initLED(Docked_LED, s_Docked); 144 | if(DebugFlagsMode) printf("Docked [ %d ] [DOCKED:[1] UNDOCKED:[0]]\x0a", s_Docked); 145 | 146 | //1 2 0000 0002 Landed, (on planet surface) 147 | if (Flags & f_Landed) s_Landed = 1; 148 | else s_Landed = 0; 149 | initLED(Landed_LED, s_Landed); 150 | if(DebugFlagsMode) printf("Landed [ %d ] [LANDED:[1] NOT LANDED:[0]]\x0a", s_Landed); 151 | 152 | //2 4 0000 0004 Landing Gear Down 153 | if (Flags & f_LandingGearDown) s_LandingGearDown = 1; 154 | else s_LandingGearDown = 0; 155 | initLED(LandingGearDown_LED, s_LandingGearDown); 156 | if(DebugFlagsMode) printf("Landing Gear [ %d ] [DEPLOYED:[1] RETRACTED:[0]]\x0a", s_LandingGearDown); 157 | 158 | //3 8 0000 0008 Shields Up 159 | if (Flags & f_ShieldUp) s_ShieldUp = 1; 160 | else s_ShieldUp = 0; 161 | initLED(ShieldUp_LED, s_ShieldUp); 162 | if (WarningLED & !s_ShieldUp) initWarningBACKLIGHT(); 163 | if(DebugFlagsMode) printf("Shield Up [ %d ] [YES:[1] NO:[0]]\x0a", s_ShieldUp); 164 | 165 | //4 16 0000 0010 Supercruise 166 | if (Flags & f_Supercruise) s_Supercruise = 1; 167 | else s_Supercruise = 0; 168 | initLED(Supercruise_LED, s_Supercruise); 169 | if(DebugFlagsMode) printf("Supercruise [ %d ] [ENGAGED:[1] DISENGAGED:[0]]\x0a", s_Supercruise); 170 | 171 | //5 32 0000 0020 FlightAssist Off 172 | if (Flags & f_FlightAssistOff) s_FlightAssistOff = 1; 173 | else s_FlightAssistOff = 0; 174 | initLED(FlightAssistOff_LED, s_FlightAssistOff); 175 | if(DebugFlagsMode) printf("Flight Assist [ %d ] [ENABLE:[1] DISABLE:[0]] Rcorrection [%d] [ENABLE:[1] DISABLE:[0]]\x0a", s_FlightAssistOff, sRCorrection); 176 | 177 | //6 64 0000 0040 Hardpoints Deployed 178 | if (Flags & f_HardpointsDeployed) s_HardpointsDeployed = 1; 179 | else s_HardpointsDeployed = 0; 180 | initLED(HardpointsDeployed_LED, s_HardpointsDeployed); 181 | if(DebugFlagsMode) printf("HardPoints [ %d ] [DEPLOYED:[1] RETRACTED:[0]]\x0a", s_HardpointsDeployed); 182 | 183 | //7 128 0000 0080 In Wing 184 | if (Flags & f_InWing) s_InWing = 1; 185 | else s_InWing = 0; 186 | initLED(InWing_LED, s_InWing); 187 | if(DebugFlagsMode) printf("In Wing [ %d ] [YES:[1] NO:[0]]\x0a", s_InWing); 188 | 189 | //8 256 0000 0100 LightsOn 190 | if (Flags & f_LightsOn) s_LightsOn = 1; 191 | else s_LightsOn = 0; 192 | initLED(LightsOn_LED, s_LightsOn); 193 | if(DebugFlagsMode) printf("Lights [ %d ] [ON:[1] OFF:[0]]\x0a", s_LightsOn); 194 | 195 | //9 512 0000 0200 Cargo Scoop Deployed 196 | if (Flags & f_CargoScoopDeployed) s_CargoScoopDeployed = 1; 197 | else s_CargoScoopDeployed = 0; 198 | initLED(CargoScoopDeployed_LED, s_CargoScoopDeployed); 199 | if(DebugFlagsMode) printf("Cargo Scoop [ %d ] [DEPLOYED:[1] RETRACTED:[0]]\x0a", s_CargoScoopDeployed); 200 | 201 | //10 1024 0000 0400 Silent Running 202 | if (Flags & f_SilentRunning) s_SilentRunning = 1; 203 | else s_SilentRunning = 0; 204 | initLED(SilentRuning_LED, s_SilentRunning); 205 | if(DebugFlagsMode) printf("Silent Runing [ %d ] [ON:[1] OFF:[0]]\x0a", s_SilentRunning); 206 | 207 | //11 2048 0000 0800 Scooping Fuel 208 | if (Flags & f_ScoopingFuel) s_ScoopingFuel = 1; 209 | else s_ScoopingFuel = 0; 210 | initLED(ScoopingFuel_LED, s_ScoopingFuel); 211 | if(DebugFlagsMode) printf("Scooping Fuel [ %d ] [DEPLOYED:[1] RETRACTED:[0]]\x0a", s_ScoopingFuel); 212 | 213 | //12 4096 0000 1000 Srv Handbrake 214 | if (Flags & f_SrvHandbrake) s_SrvHandbrake = 1; 215 | else s_SrvHandbrake = 0; 216 | initLED(SrvHandbrake_LED, s_SrvHandbrake); 217 | if(DebugFlagsMode) printf("SrvHand brake [ %d ] [ENGAGED:[1] DISENGAGED:[0]]\x0a", s_SrvHandbrake); 218 | 219 | //13 8192 0000 2000 Srv Turret 220 | if (Flags & f_SrvTurret) s_SrvTurret = 1; 221 | else s_SrvTurret = 0; 222 | initLED(SrvTurret_LED, s_SrvTurret); 223 | if(DebugFlagsMode) printf("Srv Turret [ %d ] [DEPLOYED:[1] RETRACTED:[0]]\x0a", s_SrvTurret); 224 | 225 | //14 16384 0000 4000 Srv UnderShip 226 | if (Flags & f_SrvUnderShip) s_SrvUnderShip = 1; 227 | else s_SrvUnderShip = 0; 228 | initLED(SrvUnderShip_LED, s_SrvUnderShip); 229 | if(DebugFlagsMode) printf("Scooping Fuel [ %d ] [YES:[1] NO:[0]]\x0a", s_SrvUnderShip); 230 | 231 | //15 32768 0000 8000 Srv DriveAssist 232 | if (Flags & f_SrvDriveAssist) s_SrvDriveAssist = 1; 233 | else s_SrvDriveAssist = 0; 234 | initLED(SrvDriveAssist_LED, s_SrvDriveAssist); 235 | if(DebugFlagsMode) printf("Scooping Fuel [ %d ] [ENABLE:[1] DISABLE:[0]]\x0a", s_SrvDriveAssist); 236 | 237 | //16 65536 0001 0000 Fsd MassLocked 238 | if (Flags & f_FsdMassLocked) s_FsdMassLocked = 1; 239 | else s_FsdMassLocked = 0; 240 | initLED(FsdMassLocked_LED, s_FsdMassLocked); 241 | if(DebugFlagsMode) printf("Fsd Mass Locked [ %d ] [YES:[1] NO:[0]]\x0a", s_FsdMassLocked); 242 | 243 | //17 131072 0002 0000 Fsd Charging 244 | if (Flags & f_FsdCharging) s_FsdCharging = 1; 245 | else s_FsdCharging = 0; 246 | initLED(FsdCharging_LED, s_FsdCharging); 247 | if(DebugFlagsMode) printf("FSD Charging [ %d ] [ENGAGED:[1] DISENGAGED:[0]]\x0a", s_FsdCharging); 248 | 249 | //18 262144 0004 0000 Fsd Cooldown 250 | if (Flags & f_FsdCooldown) s_FsdCooldown = 1; 251 | else s_FsdCooldown = 0; 252 | initLED(FsdCooldown_LED, s_FsdCooldown); 253 | if(DebugFlagsMode) printf("FSD Cooldown [ %d ] [ENGAGED:[1] DISENGAGED:[0]]\x0a", s_FsdCooldown); 254 | 255 | //19 524288 0008 0000 Low Fuel ( < 25% ) 256 | if (Flags & f_LowFuel) s_LowFuel = 1; 257 | else s_LowFuel = 0; 258 | initLED(LowFuel_LED, s_LowFuel); 259 | if (WarningLED & s_LowFuel) initWarningBACKLIGHT(); 260 | if(DebugFlagsMode) printf("Low Fuel [% d ] [YES:[1] NO:[0]]\x0a", s_LowFuel); 261 | 262 | //20 1048576 0010 0000 Over Heating ( > 100% ) 263 | if (Flags & f_OverHeating) s_OverHeating = 1; 264 | else s_OverHeating = 0; 265 | initLED(OverHeating_LED, s_OverHeating); 266 | if(DebugFlagsMode) printf("Over Heating [ %d ] [YES:[1] NO:[0]]\x0a", s_OverHeating); 267 | if (HeatSinkOnOverHeat & s_OverHeating) ActKey(KEYON+PULSE+DeployHeatSink); 268 | if (WarningLED & s_OverHeating) initWarningBACKLIGHT(); 269 | 270 | //21 2097152 0020 0000 Has Lat Long 271 | if (Flags & f_HasLatLong) s_HasLatLong = 1; 272 | else s_HasLatLong = 0; 273 | initLED(HasLatLong_LED, s_HasLatLong); 274 | if(DebugFlagsMode) printf("Has Lat Long [ %d ] [YES:[1] NO:[0]]\x0a", s_HasLatLong); 275 | if (sRCorrection & s_HasLatLong & HasLatLongAssist & s_InMainShip & !v_HasLatLongCurve){ 276 | v_HasLatLongCurve=!v_HasLatLongCurve; 277 | vJoystickCurveProfileBackup = vJoystickCurveProfile; //Backup Current Curves 278 | vJoystickCurveProfile = HasLatLongCurve; //Apply the Setting FAOffCurve (Settings) 279 | if(vJoystickCurveProfileBackup != HasLatLongCurve){ //Only if Previous Curve is != from FAOffCurrve preset 280 | initJoystickCurves(); 281 | if(DebugMode | DebugMMode) printf("Has Lat Long Curve Profile Adjusted\x0a"); 282 | } 283 | } 284 | else if (sRCorrection & !s_HasLatLong & HasLatLongAssist & s_InMainShip & v_HasLatLongCurve){ 285 | v_HasLatLongCurve=!v_HasLatLongCurve; 286 | vJoystickCurveProfile = vJoystickCurveProfileBackup; //Restore Previous Curves 287 | if(vJoystickCurveProfileBackup != HasLatLongCurve){ //Only if Previous Curve is != from FAOffCurrve preset 288 | initJoystickCurves(); 289 | if(DebugMode | DebugMMode) printf("Has Lat Long Curve Profile Return to Default\x0a"); 290 | } 291 | } 292 | 293 | //22 4194304 0040 0000 IsInDanger 294 | if (Flags & f_IsInDanger) s_IsInDanger = 1; 295 | else s_IsInDanger = 0; 296 | initLED(IsInDanger_LED, s_IsInDanger); 297 | if(DebugFlagsMode) printf("Is In Danger [ %d ] [YES:[1] NO:[0]]\x0a", s_IsInDanger); 298 | if (WarningLED & s_IsInDanger) initWarningBACKLIGHT(); 299 | 300 | //23 8388608 0080 0000 Being Interdicted 301 | if (Flags & f_BeingInterdicted) s_BeingInterdicted = 1; 302 | else s_BeingInterdicted = 0; 303 | initLED(BeingInterdicted_LED, s_BeingInterdicted); 304 | if(DebugFlagsMode) printf("Being Interdicted [ %d ] [YES:[1] NO:[0]]\x0a", s_BeingInterdicted); 305 | if (WarningLED & s_BeingInterdicted) initWarningBACKLIGHT(); 306 | 307 | //24 16777216 0100 0000 In MainShip 308 | if (Flags & f_InMainShip) s_InMainShip = 1; 309 | else s_InMainShip = 0; 310 | initLED(InMainShip_LED, s_InMainShip); 311 | if(DebugFlagsMode) printf("In Main Ship [ %d ] [YES:[1] NO:[0]]\x0a", s_InMainShip); 312 | 313 | //25 33554432 0200 0000 In Fighter 314 | if (Flags & f_InFighter) s_InFighter = 1; 315 | else s_InFighter = 0; 316 | initLED(InFighter_LED, s_InFighter); 317 | if(DebugFlagsMode) printf("In Fighter [ %d ] [YES:[1] NO:[0]]\x0a", s_InFighter); 318 | 319 | //26 67108864 0400 0000 In SRV 320 | if (Flags & f_InSRV) s_InSRV = 1; 321 | else s_InSRV = 0; 322 | initLED(InSRV_LED, s_InSRV); 323 | if(DebugFlagsMode) printf("In SRV [ %d ] [YES:[1] NO:[0]]\x0a", s_InSRV); 324 | 325 | //27 134217728 0800 0000 Hud in Analysis mode 326 | if (Flags & f_HUDAnalysis) s_HUDAnalysis = 1; 327 | else s_HUDAnalysis = 0; 328 | initLED(HUDAnalysis_LED, s_HUDAnalysis); 329 | if(DebugFlagsMode) printf("HUD Analysis [ %d ] [YES:[1] NO:[0]]\x0a", s_HUDAnalysis); 330 | 331 | //28 268435456 1000 0000 Night Vision 332 | if (Flags & f_NightVision) s_NightVision = 1; 333 | else s_NightVision = 0; 334 | initLED(NightVision_LED, s_NightVision); 335 | if(DebugFlagsMode) printf("NightVision [ %d ] [YES:[1] NO:[0]]\x0a", s_NightVision); 336 | 337 | if(DebugFlagsMode) printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\x0a"); 338 | 339 | } 340 | 341 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 342 | // API PIPS Checker // 343 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// -------------------------------------------------------------------------------- /Thrustmaster Warthog Script/ED+HCS v3.3_KeyBindings.ttm: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 Thomas Duployez (CMDR Touille) 2 | // V3.3.01b 2018/12 3 | // Distributed freely under the MIT License. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 23 | // BINDINGS (Note: Not all Bindings are used directly in this script, even though they are listed below. Where applicable, they're mapped directly in ED.) // 24 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 25 | 26 | //WEAPON CONTROL 27 | define PrimaryFire DX1 // DX1 28 | define SecondaryFire DX2 // DX2 29 | define NextFireGroup USB_PERIOD // . [HCS] 30 | define PrevFireGroup USB_COMMA // , [HCS] 31 | define DeployHardpoints USB_U // U [HCS] 32 | 33 | //TARGET CONTROL 34 | define SelectTargetAhead USB_T // T [HCS] 35 | define SelectNextShip USB_G // G [HCS] 36 | define SelectPrevShip USB_B // B [HCS] 37 | define SelectHighestThreat USB_Y // Y [HCS] 38 | define SelectNextHostileShip USB_H // H [HCS] 39 | define SelectPrevHostileShip USB_N // N [HCS] 40 | define SelectNextSubsystem USB_I // I [HCS] 41 | define SelectPrevSubsystem USB_K // K [HCS] 42 | define SelectNextSystemInRoute USB_M // M [HCS] 43 | 44 | //FLIGHT CONTROL 45 | define RotationalCorrection USB_F4 // F4 46 | define FlightAssist USB_Z // Z [HCS] 47 | define ThrustUp USB_R // R [HCS] 48 | define ThrustDown USB_F // F [HCS] 49 | define ThrustLeft USB_Q // Q [HCS] 50 | define ThrustRight USB_E // E [HCS] 51 | define EngineBoost USB_TAB // TAB [HCS] 52 | define FrameShiftDrive USB_J // J [HCS] 53 | define Supercruise USB_KP_SLASH // NUMPAD / [HCS] 54 | define SetSpeedNeg100 USB_KP_HYPHEN // NUMPAD - [HCS] 55 | define SetSpeedNeg75 USB_KP_9 // NUMPAD 9 [HCS] 56 | define SetSpeedNeg50 USB_KP_8 // NUMPAD 8 [HCS] 57 | define SetSpeedNeg25 USB_KP_7 // NUMPAD 7 [HCS] 58 | define SetSpeed0 USB_X // X [HCS] 59 | define SetSpeed25 USB_KP_1 // NUMPAD 1 [HCS] 60 | define SetSpeed50 USB_KP_2 // NUMPAD 2 [HCS] 61 | define SetSpeed75 USB_KP_3 // NUMPAD 3 [HCS] 62 | define SetSpeed100 USB_KP_PLUS // NUMPAD + [HCS] 63 | define IncreaseThrottle USB_W // W [HCS] 64 | define DecreaseThrottle USB_S // S [HCS] 65 | define ReverseThrottle L_CTL+USB_R // L_CTRL+R 66 | 67 | //SRV CONTROLS 68 | define SRVHandbrake USB_X // X [HCS] 69 | define SRVTurret USB_U // U [HCS] 70 | define SRVVerticalThrust USB_SPACEBAR // Space [HCS] 71 | define SRVRecallDismissShip L_ALT+USB_X // L_ALT+X [HCS] 72 | 73 | //WINGS & FIGHTERS 74 | define SelectWingman1 USB_8 // 8 [HCS] 75 | define SelectWingman2 USB_9 // 9 [HCS] 76 | define SelectWingman3 USB_0 // 0 [HCS] 77 | define WingmanTarget USB_RIGHTCONTROL // R_CTRL [HCS] 78 | define WingmanNavlock USB_RIGHTSHIFT // R_SHIFT [HCS] 79 | define FighterDock L_ALT+USB_B // L_ALT+B [HCS] 80 | define FighterDefensive L_ALT+USB_D // L_ALT+D [HCS] 81 | define FighterAggressive L_ALT+USB_A // L_ALT+A [HCS] 82 | define FighterFocus L_ALT+USB_T // L_ALT+T [HCS] 83 | define FighterHoldFire L_ALT+USB_H // L_ALT+H [HCS] 84 | define FighterHoldPosition L_ALT+USB_S // L_ALT+S [HCS] 85 | define FighterFollow L_ALT+USB_F // L_ALT+F [HCS] 86 | define FighterOrders L_ALT+USB_O // L_ALT+O 87 | 88 | //SHIP SYSTEMS 89 | define CargoScoop USB_HOME // HOME [HCS] 90 | define JettisonAllCargo USB_END // END [HCS] 91 | define LandingGear USB_L // L [HCS] 92 | define ShipLights USB_INSERT // INSERT [HCS] 93 | define IncreseSensorZoom USB_PAGEUP // PAGE UP [HCS] 94 | define DecreaseSensorZoom USB_PAGEDOWN // PAGE DOWN [HCS] 95 | define PowerEng USB_UPARROW // UP Arrow [HCS] 96 | define PowerWep USB_RIGHTARROW // RIGHT Arrow [HCS] 97 | define PowerSys USB_LEFTARROW // LEFT Arrow [HCS] 98 | define BalancePower USB_DOWNARROW // DOWN Arrow [HCS] 99 | 100 | //COOLING & ECM 101 | define SilentRunning USB_DELETEFORWARD // DELETE [HCS] 102 | define DeployHeatSink USB_V // V [HCS] 103 | define UseShieldCell USB_NONUSPOUND // # [HCS] 104 | define FireChaffLauncher USB_C // C [HCS] 105 | define ChargeECM L_CTL+USB_E // CTRL+E 106 | 107 | //UI NAVIGATION 108 | define UIFocus L_SHIFT // L_SHIFT [HCS] 109 | define UISelect USB_SPACEBAR // Space [HCS] 110 | define UIBack USB_DELETEORBACKSPACE // Backspace [HCS] 111 | define UIUp USB_W // W [HCS] 112 | define UIDown USB_S // S [HCS] 113 | define UILeft USB_A // A [HCS] 114 | define UIRight USB_D // D [HCS] 115 | define UINextPanel USB_E // E [HCS] 116 | define UIPrevPanel USB_Q // Q [HCS] 117 | define TargetPanel USB_1 // 1 [HCS] 118 | define SystemPanel USB_4 // 4 [HCS] 119 | define CommsPanel USB_2 // 2 [HCS] 120 | define QuickCommsPanel USB_RETURNORENTER // Enter [HCS] 121 | define RolePanel USB_3 // 3 [HCS] 122 | define UIEscape USB_ESCAPE // Escape 123 | define SystemMap USB_SEMICOLON // : [HCS] 124 | define GalaxyMap USB_SLASH // / [HCS] 125 | define GameMenu USB_P // P [HCS] 126 | define Discovery L_CTL+L_ALT+USB_D // CTRL+ALT+D 127 | define HUDMode L_CTL+L_ALT+USB_H // CTRL+ALT+H 128 | 129 | //MISCELLANEOUS 130 | define MicrophoneMute USB_BACKSLASH // \ [HCS] 131 | define InternalVoiceCommsPTT USB_SLASH // / 132 | define ClassifiedCamera USB_F1 // F1 [HCS] 133 | define OrbitalLines USB_EQUALSIGN // = [HCS] 134 | define HideShipGUI L_CTL+L_ALT+USB_G // CTRL+ALT+G 135 | define ShowFramerate L_CTL+USB_F // CTRL+F 136 | define ShowConnectionStatus L_CTL+USB_B // CTRL+B 137 | define ShowCQCScoreboard L_CTL+USB_C // CTRL+C 138 | define Screenshot USB_F10 // F10 139 | define HighResScreenshot L_ALT+USB_F10 // ALT-F10 140 | define ChangeWeaponColor L_ALT+USB_KP_1 // ALT+NUMPAD 1 141 | define ChangeEngineColor L_ALT+USB_KP_2 // ALT+NUMPAD 2 142 | define NightVision L_CTL+L_ALT+USB_N // CTRL+ALT+N 143 | 144 | //MULTI-CREW 145 | define MC_Mode_Toggle L_CTL+L_ALT+USB_M // CTRL+ALT+M 146 | // define MC_PrimaryFire 147 | // define MC_SecondaryFire 148 | define MC_Primary_Utility L_CTL+USB_Y // CTRL+Y 149 | define MC_Secondary_Utility L_CTL+USB_Z // CTRL+Z 150 | // define MC_Yaw_Left 151 | // define MC_Yaw_Right 152 | // define MC_Pitch_Up 153 | // define MC_Pitch_Down 154 | // define MC_FOV_OUT 155 | // define MC_FOV_IN 156 | define MC_Cycle_UI_Forwards USB_D // D 157 | define MC_Cycle_UI_Backwards USB_A // A 158 | 159 | //CAMERA SUITE 160 | define Previous_Camera USB_COMMA // , 161 | define Next_Camera USB_PERIOD // . 162 | define Enter_Free_Camera USB_T // T 163 | // define Camera_1 USB_1 // 1 164 | // define Camera_2 USB_2 // 2 165 | // define Camera_3 USB_3 // 3 166 | // define Camera_4 USB_4 // 4 167 | // define Camera_5 USB_5 // 5 168 | // define Camera_6 USB_6 // 6 169 | // define Camera_7 USB_7 // 7 170 | // define Camera_8 USB_8 // 8 171 | // define Camera_9 USB_9 // 9 172 | 173 | //FREE CAMERA 174 | // define FC_Toggle_HUD L_CTL+L_ALT+USB_G // CTRL+ALT+G 175 | define FC_Increase_Speed USB_KP_9 // NUMPAD 9 176 | define FC_Decrease_Speed USB_KP_7 // NUMPAD 7 177 | define FC_Zoom_IN USB_KP_3 // NUMPAD 3 178 | define FC_Zoom_OUT USB_KP_1 // NUMPAD 1 179 | define FC_Move_Forward USB_UPARROW // Up Arrow 180 | define FC_Move_Backward USB_DOWNARROW // Down Arrow 181 | // define FC_Move_Left USB_Q // Q 182 | // define FC_Move_Right USB_E // E 183 | // define FC_Move_Up USB_R // R 184 | // define FC_Move_Down USB_F // F 185 | // define FC_Pitch_Up 186 | // define FC_Pitch_Down 187 | // define FC_Yaw_Left 188 | // define FC_Yaw_Right 189 | // define FC_Roll_Left 190 | // define FC_Roll_Right 191 | // define FC_Toggle_Rotation_Lock....DX3 192 | define FC_Lock_To_Vehicle USB_N // N 193 | define FC_Lock_To_World USB_H // H 194 | define FC_Exit_Free_Camera USB_M // M 195 | define FC_Zoom_Dof_Toggle USB_SPACEBAR // Space 196 | define FC_Increase_Blur USB_KP_6 // NUMPAD 6 197 | define FC_Decrease_Blur USB_KP_4 // NUMPAD 4 198 | define FC_Increase_Focus_Distance USB_KP_8 // NUMPAD 8 199 | define FC_Decrease_Focus_Distance USB_KP_2 // NUMPAD 2 200 | 201 | //HOLO-ME 202 | // define HM_Undo 203 | // define HM_Redo 204 | // define HM_Toggle_Mouse_Rotation 205 | 206 | //GALNET AUDIO 207 | // define GA_Play_Pause L_ALT+USB_SPACEBAR 208 | // define GA_Skip_Forward L_ALT+USB_PAGEUP 209 | // define GA_Skip_Backward L_ALT+USB_PAGEDOWN 210 | // define GA_Clear_Queue L_ALT+USB_END 211 | 212 | //FULL SPECTRUM SYSTEM SCANNER 213 | define FSSS_Mode_Toggle L_CTL+L_ALT+USB_S // CTRL+ALT+S 214 | // define FSSS_Discovery_Scan 215 | // define FSSS_Target_Signal 216 | 217 | //DETAILES SURFACE SCAN 218 | // define DSS_Toggle_Front_Back 219 | 220 | 221 | 222 | //----EXTERNAL BINDINGS-----------------------------------------------------------------------------------------------------------------------------------------// 223 | 224 | //HMD 225 | define HMDCenter USB_F12 // F12 [HCS] 226 | 227 | //TRACKIR 228 | define TrackIRCenter USB_END // END 229 | define TrackIRPause USB_PAUSE // PAUSE 230 | 231 | //TS3, MUMBLE, VENTRILO,... 232 | define ExternalVoiceCommsPTT USB_GRAVEACCENTANDTILDE // ~ (Map this to your Ventrilo/Mumble/Skype/TS3/... PTT Key) 233 | 234 | //VOICE ATTACK 235 | define ToggleVoiceAttackMic L_ALT+USB_F2 // ALT+F2 236 | // define ToggleVoiceAttackGlobal L_ALT+USB_V // (ALT)+V 237 | 238 | //STEAM 239 | define TakeSteamScreenshot L_ALT+USB_F12 // L_ALT+F12 (Map L_ALT+F12 to your Steam ScreenShot Key : Steam -> Settings -> In-Game) 240 | // define ShowSteamOverlay L_SHIFT+USB_TAB // SHIFT+TAB 241 | 242 | //NVIDIA SHADOWPLAY 243 | define NVidiaCaptureVideo L_ALT+USB_F9 // L_ALT+F9 244 | define NVidiaStreaming L_ALT+USB_F8 // L_ALT+F8 245 | 246 | //AMD RELIVE 247 | define AMDCaptureVideo L_CTL+L_SHIFT+USB_R // L_CTRL+L_SHIFT+R 248 | define AMDStreaming L_CTL+L_SHIFT+USB_G // L_CTRL+L_SHIFT+G 249 | 250 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 251 | // REFERENCE: DEFAULT THRUSTMASTER WARTHOG DX MAPPINGS // // 252 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 253 | // // 254 | // JOYSTICK: // // Trim Control: // // TMS Hat: // // DMS Hat: // // CMS Hat: // // 255 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------// 256 | // TG1 = DX1 H1U = DXHATUP H2U = DX7 H3U = DX11 H4U = DX15 // 257 | // TG2 = DX6 H1D = DXHATDOWN H2D = DX9 H3D = DX13 H4D = DX17 // 258 | // S1 = DX5 H1L = DXHATLEFT H2L = DX10 H3L = DX14 H4L = DX18 // 259 | // S2 = DX2 H1R = DXHATRIGHT H2R = DX8 H3R = DX12 H4R = DX16 // 260 | // S3 = DX3 H4P (Hat4 pressed down) = DX19 // 261 | // S4 = DX4 // 262 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------// 263 | // // 264 | // THROTTLE: // // Mic Switch: // // Coolie Hat Switch: // Autopilot Switches: // Engine Fuel Flow: // FLAPS: // // IDLE: // // 265 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------// 266 | // SC (slew pressed in) = DX1 MSP (mic pressed in) = DX2 CSU = DXHATUP APENG = DX26 EFLNORM = DX16 FLAPU = DX22 IDLERON = DX29 // 267 | // LTB = DX15 MSU = DX3 CSR = DXHATRIGHT APPAT = DX27 EOLMOTOR = DX18 FLAPD = DX23 IDLELON = DX30 // 268 | // SPDF = DX7 MSR = DX4 CSD = DXHATDOWN APALT = DX28 EFRNORM = DX17 // 269 | // SPDB = DX8 MSD = DX5 CSL = DXHATLEFT EORMOTOR = DX19 // 270 | // BSF = DX9 MSL = DX6 // 271 | // BSB = DX10 // 272 | // CHF = DX11 // EAC On/Off: // // Engine Oper Ign/Norm: // // APU Start Switch: // RDR/NORM: // // Landing Gear/Warning: // // 273 | // CHB = DX12 ------------------------------------------------------------------------------------------------------------------------------------// 274 | // PSF = DX13 // EACON = DX24 EOLIGN = DX31 APUON = DX20 RDRNRM = DX25 LDGH = DX21 // 275 | // PSB = DX14 // EORIGN = DX32 // 276 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------// -------------------------------------------------------------------------------- /Thrustmaster Warthog Script/ED+HCS v3.3_Functions_CORE.tmh: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 Thomas Duployez (CMDR Touille) 2 | // V3.3.01b 2018/12 3 | // Distributed freely under the MIT License. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 23 | // PIP MANAGEMENT FUNCTIONS // 24 | // initPIPPower(x,y,z) Params = SYS, ENG, WEP, MID // 25 | // x gets 4 PIPs, y gets 2 PIPs, if z = MID get 50/50 of x and y (3x 3y) // 26 | // If only x, balanced 1 PIP on each 2ndary power // 27 | // If no params, balances power. // 28 | // initRestorePIPPower(j) Params = vOptimalPIP[XXXXX]Backup (ex: initRestorePIPPower(vOptimalPIPFireBackup) ) // 29 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 30 | 31 | //PIP Management 32 | int initPIPPower(int x=0, int y=0, int z=0){ 33 | 34 | // Check Which Command to Send and if it need to be Send 35 | if(x == 0 & y == 0 & z == 0 & vOptimalPIP != 0){vOptimalPIP = 0; vPIP=!vPIP;} //2 SYS 2 ENG 2 WEP (0) 36 | else if(z != MID | z == 0){ 37 | if(y != 0){ 38 | if(y == SYS){ 39 | if (x == ENG & vOptimalPIP != 1){vOptimalPIP = 1; vPIP=!vPIP;} //4 ENG 2 SYS (1) 40 | else if(x == WEP & vOptimalPIP != 6){vOptimalPIP = 6; vPIP=!vPIP;} //4 WEP 2 SYS (6) 41 | } 42 | else if(y == ENG){ 43 | if (x == SYS & vOptimalPIP != 3){vOptimalPIP = 3; vPIP=!vPIP;} //4 SYS 2 ENG (3) 44 | else if(x == WEP & vOptimalPIP != 5){vOptimalPIP = 5; vPIP=!vPIP;} //4 WEP 2 ENG (5) 45 | } 46 | else if(y == WEP){ 47 | if (x == SYS & vOptimalPIP != 4){vOptimalPIP = 4; vPIP=!vPIP;} //4 SYS 2 WEP (4) 48 | else if(x == ENG & vOptimalPIP != 2){vOptimalPIP = 2; vPIP=!vPIP;} //4 ENG 2 WEP (2) 49 | } 50 | } 51 | else if(y == 0){ 52 | if (x == SYS & vOptimalPIP != 10){vOptimalPIP = 10; vPIP=!vPIP;} //4 SYS 1 ENG 1 WEP (10) 53 | else if(x == ENG & vOptimalPIP != 11){vOptimalPIP = 11; vPIP=!vPIP;} //4 ENG 1 WEP 1 SYS (11) 54 | else if(x == WEP & vOptimalPIP != 12){vOptimalPIP = 12; vPIP=!vPIP;} //4 WEP 1 SYS 1 ENG (12) 55 | } 56 | } 57 | else if(z == MID){ 58 | if (y == SYS & x == ENG | y == ENG & x == SYS & vOptimalPIP != 7){vOptimalPIP = 7; vPIP=!vPIP;} //3 SYS 3 ENG (7) 59 | else if(y == ENG & x == WEP | y == WEP & x == ENG & vOptimalPIP != 8){vOptimalPIP = 8; vPIP=!vPIP;} //3 ENG 3 WEP (8) 60 | else if(y == SYS & x == WEP | y == WEP & x == SYS & vOptimalPIP != 9){vOptimalPIP = 9; vPIP=!vPIP;} //3 SYS 3 WEP (9) 61 | } 62 | if(vPIP){ //If Previous Command is NOT the same as the New one, Push Command 63 | vPIP=!vPIP; 64 | if(DebugMode) printf("Initialising PIP Mode [%d]\x0a", vOptimalPIP); 65 | 66 | // Map out PIPs 67 | if(x == 0) PIPx = 0; 68 | else if(x == SYS) PIPx = PULSE+ PowerSys; 69 | else if(x == ENG) PIPx = PULSE+ PowerEng; 70 | else if(x == WEP) PIPx = PULSE+ PowerWep; 71 | 72 | if(y == 0) PIPy = 0; 73 | else if(y == SYS) PIPy = PULSE+ PowerSys; 74 | else if(y == ENG) PIPy = PULSE+ PowerEng; 75 | else if(y == WEP) PIPy = PULSE+ PowerWep; 76 | 77 | if(z == 0 & z != MID) PIPz = 0; 78 | else if(z == MID) PIPz = PIPy; 79 | 80 | // Send PIPS 81 | ActKey(KEYON+ CHAIN(LOCK+PULSE+ BalancePower, D(PIPPulseDelay),PIPx, D(PIPPulseDelay),PIPy, D(PIPPulseDelay),PIPx, D(PIPPulseDelay),PIPx, D(PIPPulseDelay),PIPz, LOCK)); 82 | } 83 | else{ 84 | //if(DebugMode) printf("This PIP is Already Pushed [%d]\x0a", vOptimalPIP); 85 | } 86 | } 87 | 88 | //PIP Restore Management 89 | int initRestorePIPPower(int j=0){ 90 | if(j != vOptimalPIP){ // Send Good Backup PIPS only if previous PIP Swith is != of Backuped Value 91 | //if(DebugMode){printf("Reset PIP ?: PIPRestore [%d] vOptimalPIP [%d]\x0a", j, vOptimalPIP);} 92 | if(DebugMode) printf("Restore Previous PIP [%d] (preset PIP 1-12)\x0a",j); 93 | if (j == 0) initPIPPower(); //2 SYS 2 ENG 2 WEP (0) 94 | else if(j == 1) initPIPPower(ENG,SYS); //4 ENG 2 SYS (1) 95 | else if(j == 2) initPIPPower(ENG,WEP); //4 ENG 2 WEP (2) 96 | else if(j == 3) initPIPPower(SYS,ENG); //4 SYS 2 ENG (3) 97 | else if(j == 4) initPIPPower(SYS,WEP); //4 SYS 2 WEP (4) 98 | else if(j == 5) initPIPPower(WEP,ENG); //4 WEP 2 ENG (5) 99 | else if(j == 6) initPIPPower(WEP,SYS); //4 WEP 2 SYS (6) 100 | else if(j == 7) initPIPPower(SYS,ENG,MID); //3 SYS 3 ENG (7) 101 | else if(j == 8) initPIPPower(ENG,WEP,MID); //3 ENG 3 WEP (8) 102 | else if(j == 9) initPIPPower(SYS,WEP,MID); //3 SYS 3 WEP (9) 103 | else if(j == 10) initPIPPower(SYS); //4 SYS 1 ENG 1 WEP (10) 104 | else if(j == 11) initPIPPower(ENG); //4 ENG 1 SYS 1 WEP (11) 105 | else if(j == 12) initPIPPower(WEP); //4 WEP 1 SYS 1 ENG (12) 106 | } 107 | else{ 108 | //if(DebugMode)printf("This PIP is Already OK [%d]\x0a", vOptimalPIP); 109 | } 110 | } 111 | 112 | //PIP Backup Management 113 | int initBackupPIPPower(int p=0){ 114 | if(p == 1 | p == 2 | p == 3 | p == 4){ 115 | if (p == 1 & vOptimalPIPFireBackup != vOptimalPIP){vOptimalPIPFireBackup = vOptimalPIP; vPIPB=!vPIPB;} //OptimalPIPFireBackup (1) 4 WEP 2 SYS (6) Fire 116 | else if(p == 2 & vOptimalPIPEFBackup != vOptimalPIP){vOptimalPIPEFBackup = vOptimalPIP; vPIPB=!vPIPB;} //OptimalPIPEFBackup (2) 4 ENG 2 SYS (1) & 4 SYS 2 ENG (3) EscapeFight 117 | else if(p == 3 & vOptimalPIPGMBackup != vOptimalPIP){vOptimalPIPGMBackup = vOptimalPIP; vPIPB=!vPIPB;} //OptimalPIPGMBackup (3) 4 SYS 2 ENG (3) ToggleGameMenu 118 | else if(p == 4 & vOptimalPIPCCBackup != vOptimalPIP){vOptimalPIPCCBackup = vOptimalPIP; vPIPB=!vPIPB;} //OptimalPIPCCBackup (4) 4 SYS 2 ENG (3) ToggleCamera 119 | // else if(p == 5 & vOptimalPIPBoostBackup!= vOptimalPIP){vOptimalPIPBoostBackup= vOptimalPIP; vPIPB=!vPIPB;} //OptimalPIPBoostBackup(5) 4 ENG 2 SYS (1) ThrottleBoost 120 | } 121 | if(vPIPB){ 122 | vPIPB=!vPIPB; 123 | if(DebugMode) printf("Backuped PIP [%d] (1:Fire,2:EF,3:GM,4:CC) Previous PIP [%d]\x0a",p, vOptimalPIP); 124 | } 125 | } 126 | 127 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 128 | // MAIN GAMES FUNCTIONS // 129 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 130 | 131 | //--FIRE--------------------------------------------------------------------------------------------------------------------------------------------------------// 132 | 133 | //FUNCTION: Init Fire 134 | int initFire(){ 135 | if(Joystick[TG1] | Joystick[P_S2]){ 136 | if(SilentRuningOFFonFire & s_SilentRunning & !vSLonFire){ //ShutDown Silent Runing if it running 137 | vSLonFire=!vSLonFire; 138 | vSilentRuningBackup = s_SilentRunning; //Backup Actual Silent Runing State 139 | if(DebugMode) printf("Shut Down Silent Runing\x0a"); 140 | initToggleSilentRuning(); 141 | } 142 | if(OptimalPIPMode & !s_HUDAnalysis) initBackupPIPPower(OptimalPIPFireBackup); //Backup Actual PIP Mode OptimalPIPFireBackup (1) 143 | if(HardPointsonFireGameMode & !s_HardpointsDeployed & !s_HUDAnalysis){ //Deploy Hardpoint if HardPointsonFireGameMode is Enable 144 | initToggleHardpoints(); 145 | //if(DebugMode) printf("Deploy Hardpoints On Fire\x0a"); 146 | } 147 | if(OptimalPIPMode & !s_HUDAnalysis){ //PIP Mode 4 WEP 2 SYS 148 | initPIPPower(WEP,SYS); //4 WEP 2 SYS (6) 149 | //if(DebugMode) printf("OptimalPIPMode On Fire\x0a"); 150 | } 151 | if(Joystick[P_S3]){ 152 | if(Joystick[TG1] & !vScanPrimaryFire) vScanPrimaryFire=!vScanPrimaryFire; 153 | if((Joystick[P_S2] | (Joystick[TG2] & sCombinedFire)) & !vScanSecondaryFire) vScanSecondaryFire=!vScanSecondaryFire; 154 | } 155 | } 156 | 157 | //Fire !! 158 | initPrimaryFire(); 159 | initSecondaryFire(); 160 | 161 | if(!Joystick[TG1] & !Joystick[P_S2]){ 162 | if(OptimalPIPMode & !s_HUDAnalysis) initRestorePIPPower(vOptimalPIPFireBackup); //Restore Previous PIP Mode 163 | if(HardPointsonFireGameMode & StopFireRetractHardpoints & s_HardpointsDeployed & !s_HUDAnalysis) initToggleHardpoints();//Retract Hardpoint if StopFireRetractHardpoints & HardPointsonFireGameMode are Enable 164 | if(vSilentRuningBackup!=0){ //Restore Silent Runing if it was running before fire 165 | vSilentRuningBackup = 0; 166 | if(DebugMode) printf("Restore Silent Runing\x0a"); 167 | initToggleSilentRuning(); //Restore Silent Runing State 168 | vSLonFire=!vSLonFire; 169 | } 170 | } 171 | //if(DebugMode)printf("vSLonFire [%d]\x0a", vSLonFire); 172 | } 173 | 174 | //FUNCTION: init PrimaryFire 175 | int initPrimaryFire(){ 176 | if((Joystick[TG1] | (Joystick[TG2] & sCombinedFire)) & !vPrimaryFire){ 177 | ActKey(KEYON+DOWN+PrimaryFire); 178 | vPrimaryFire=!vPrimaryFire; 179 | //if(DebugMode) printf("PrimaryFire Down\x0a"); 180 | } 181 | else if(!Joystick[TG1] & vPrimaryFire){ 182 | if((!vScanPrimaryFire & (ExploreModeFire == 0 | ExploreModeFire == 2)) | vScanPrimaryFire) DeferCall(PrimaryFireKeyScanDelay, &ActKey, KEYON+UP+PrimaryFire); 183 | else ActKey(KEYON+UP+PrimaryFire); //if(DebugMode) printf("TG1 Up\x0a"); 184 | if(vScanPrimaryFire) vScanPrimaryFire=!vScanPrimaryFire; 185 | vPrimaryFire=!vPrimaryFire; 186 | } 187 | } 188 | 189 | //FUNCTION: init SecondaryFire 190 | int initSecondaryFire(){ 191 | if((Joystick[P_S2] | (Joystick[TG2] & sCombinedFire)) & !vSecondaryFire){ 192 | ActKey(KEYON+DOWN+SecondaryFire); 193 | vSecondaryFire=!vSecondaryFire; 194 | //if(DebugMode) printf("P_S2 Down\x0a"); 195 | } 196 | else if(!Joystick[P_S2] & vSecondaryFire){ 197 | if((!vScanSecondaryFire & (ExploreModeFire == 1 | ExploreModeFire == 2)) | vScanSecondaryFire) DeferCall(SecondaryFireKeyScanDelay, &ActKey, KEYON+UP+SecondaryFire); 198 | else ActKey(KEYON+UP+SecondaryFire); //if(DebugMode) printf("P_S2 Up\x0a"); 199 | if(vScanSecondaryFire) vScanSecondaryFire=!vScanSecondaryFire; 200 | vSecondaryFire=!vSecondaryFire; 201 | } 202 | } 203 | 204 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 205 | 206 | //FUNCTION: Jettison All Cargo 207 | int initJettisonCargo(){ 208 | if(Throttle[T2_APUON]){ 209 | if(s_CargoScoopDeployed){ 210 | ActKey(KEYON+PULSE+JettisonAllCargo); 211 | if(DebugMode | DebugMMode) printf("Jettison All Cargo\x0a"); 212 | } 213 | else{ 214 | if(DebugMode | DebugMMode) printf("Jettison Need Cargo Scoop Open\x0a"); 215 | } 216 | } 217 | } 218 | 219 | //FUNCTION: Engine Boost 220 | int initThrottleBoost(){ 221 | // if(OptimalPIPMode){ 222 | // initBackupPIPPower(OptimalPIPBoostBackup); //Backup Actual PIP Mode OptimalPIPBoostBackup (6) 223 | // initPIPPower(ENG, SYS); //4 ENG 2 SYS (1) 224 | // DeferCall(2000, &initRestorePIPPower, vOptimalPIPBoostBackup); //Restore Previous PIP Mode If vOptimalPIPBoostBackup != 4 ENG 2 SYS (1) 225 | // } 226 | initSecureRectract(); 227 | ActKey(KEYON+PULSE+EngineBoost); 228 | if(DebugMode | DebugMMode) printf("Engine Boost\x0a"); 229 | } 230 | 231 | //FUNCTION: Init Supercruise 232 | int initSuperCruise(){ 233 | // if(OptimalPIPMode){ 234 | // initBackupPIPPower(OptimalPIPBoostBackup); //Backup Actual PIP Mode OptimalPIPBoostBackup (6) 235 | // initPIPPower(ENG, SYS); //4 ENG 2 SYS (1) 236 | // DeferCall(10000, &initRestorePIPPower, vOptimalPIPBoostBackup); //Restore Previous PIP Mode If vOptimalPIPBoostBackup != 4 ENG 2 SYS (1) 237 | // } 238 | initSecureRectract(); 239 | ActKey(KEYON+PULSE+Supercruise); 240 | if(DebugMode | DebugMMode) printf("Engage SuperCruise\x0a"); 241 | } 242 | 243 | //FUNCTION: Init FrameShiftDrive 244 | int initFrameShiftDrive(){ 245 | // if(OptimalPIPMode){ 246 | // initBackupPIPPower(OptimalPIPBoostBackup); //Backup Actual PIP Mode OptimalPIPBoostBackup (6) 247 | // initPIPPower(ENG, SYS); //4 ENG 2 SYS (1) 248 | // DeferCall(10000, &initRestorePIPPower, vOptimalPIPBoostBackup); //Restore Previous PIP Mode If vOptimalPIPBoostBackup != 4 ENG 2 SYS (1) 249 | // } 250 | initSecureRectract(); 251 | ActKey(KEYON+PULSE+FrameShiftDrive); 252 | if(DebugMode | DebugMMode) printf("Engage FSD\x0a"); 253 | } 254 | 255 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 256 | // EXTRA GAMES FUNCTIONS // 257 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 258 | 259 | //FUNCTION: Init Secure Retract 260 | int initSecureRectract(){ 261 | if(SecureRetract & (s_HardpointsDeployed | s_CargoScoopDeployed | s_LandingGearDown)){ //only if SecureRetract is ON & HardPoints or C Scoop Or L Gears is Deployed 262 | vSecureEscapeFight=!vSecureEscapeFight; 263 | if(s_HardpointsDeployed){ 264 | initToggleHardpoints(); 265 | if(DebugMode | DebugMMode) printf("SecureEscapeFight : HardPoints\x0a"); 266 | } 267 | if(s_LandingGearDown){ 268 | initToggleLandingGear(); 269 | if(DebugMode | DebugMMode) printf("SecureEscapeFight : Reset On The Fly with P_S3 & Toggle the Switch Landing Gear\x0a"); 270 | } 271 | if(s_CargoScoopDeployed){ 272 | initToggleCargoScoop(); 273 | if(DebugMode | DebugMMode) printf("SecureEscapeFight : Reset On The Fly with P_S3 & Toggle the Switch Cargo Scoop\x0a"); 274 | } 275 | vSecureEscapeFight=!vSecureEscapeFight; 276 | } 277 | } 278 | 279 | //FUNCTION: SystemJump 280 | int initSystemJump(){ 281 | if(!SecureRetract & (s_HardpointsDeployed | s_CargoScoopDeployed | s_LandingGearDown))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 282 | else{ 283 | initSecureRectract(); 284 | if(OptimalPIPMode) initPIPPower(ENG, SYS); //4 ENG 2 SYS (1) 285 | ActKey(KEYON+PULSE+mSystemJump); 286 | } 287 | } 288 | 289 | //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 290 | int initEscapeFight(){ 291 | //TEST PANIC MODE 292 | initBACKLIGHT(Throttle_BL, vThrottleLightBackup, 250); //Throttle BackLigtt Flashing ON 293 | init_PANIC_LED(165); 294 | 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 295 | //END OF TEST 296 | if(!SecureRetract){ //if SecureRetract is Disable 297 | if(DebugMode) printf("Secure Retract was OFF we switch it to ON for 2 sec for Escaping Fight\x0a"); 298 | SecureRetract=!SecureRetract; //we Enable it 299 | DeferCall(2000, &ActKey, KEYON+PULSE+EXEC("SecureRetract=!SecureRetract;")); //Then we Disable it after the initSecureRectract() below is done (2s should be ok) 300 | } 301 | initSecureRectract(); //All we want is to Escape so we retract Hardpoints, C.Scoop and L.Gears if deployed 302 | if(!s_SilentRunning & !vSLonEscapeFight){ //If Silent Running is Disable, Enable it 303 | vSLonEscapeFight=!vSLonEscapeFight; 304 | initToggleSilentRuning(); 305 | } 306 | //if(OptimalPIPMode){ //If you want to check if OptimalPIPMode is Enable UnComment this line 307 | initBackupPIPPower(OptimalPIPEFBackup); //Backup Actual PIP Mode OptimalPIPEFBackup (3) 308 | initPIPPower(ENG, SYS); //4 ENG 2 SYS (1) 309 | DeferCall(1500, &ActKey, KEYON+PULSE+EXEC("initPIPPower(SYS, ENG);")); //4 SYS 2 ENG (3) 310 | DeferCall(10000, &initRestorePIPPower, vOptimalPIPEFBackup); //Restore Previous PIP Mode If vOptimalPIPEFBackup != 4 SYS 2 ENG (3) 311 | //} //If you want to check if OptimalPIPMode is Enable UnComment this line 312 | ActKey(KEYON+PULSE+mEscapeFight); 313 | if(s_SilentRunning){ //Disable Silent Runing previouly Enable 314 | DeferCall(4000, &ActKey, KEYON+PULSE+EXEC("initToggleSilentRuning();")); 315 | if(vSLonEscapeFight) DeferCall(5000, &ActKey, KEYON+PULSE+EXEC("vSLonEscapeFight=!vSLonEscapeFight;")); 316 | } 317 | if(DebugMode | DebugMMode) printf("Escape Mode Engaged : CHECK IF GEARS AND CARGO STATE IS OK (SWITCH CS and LG) \x0a"); 318 | } 319 | 320 | //FUNCTION: Request Docking 321 | int initRCDocking(){ 322 | if(DebugMode | DebugMMode) printf("Docking Initialisation\x0a"); 323 | initSecureRectract(); 324 | ActKey(KEYON+PULSE+mRequestCancelDock); 325 | if(OptimalPIPMode) DeferCall(3000, &ActKey, KEYON+PULSE+EXEC("initPIPPower(SYS, ENG);")); //4 SYS 2 ENG (3) 326 | } 327 | 328 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 329 | // EXTRA FUNCTIONS // 330 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 331 | 332 | //FUNCTION FPS & CONNECTION STATUS 333 | int initFPSCONNECTION(){ 334 | ActKey(KEYON+PULSE+ShowFramerate); 335 | ActKey(KEYON+PULSE+ShowConnectionStatus); 336 | if(DebugMode) printf("FPS & CONNECTION STATUS\x0a"); 337 | } 338 | 339 | //FUNCTION: Head Center 340 | int initHeadCenter(){ 341 | if(HMD){ 342 | ActKey(KEYON+PULSE+HMDCenter); 343 | if(DebugMode) printf("HMD Center\x0a"); 344 | } 345 | else if(TrackIR){ 346 | ActKey(KEYON+PULSE+TrackIRCenter); 347 | if(DebugMode) printf("TrackIR Center\x0a"); 348 | } 349 | else{ 350 | ActKey(KEYON+PULSE+UIFocus); 351 | if(DebugMode) printf("UI Focus\x0a"); 352 | } 353 | } 354 | 355 | //FUNCTION: Capture Video 356 | int initCaptureVideo(){ 357 | if(GFXVideo == 1){ //Nvidia Shadowplay 358 | sNVidiaCaptureVideo=!sNVidiaCaptureVideo; 359 | ActKey(KEYON+PULSE+NVidiaCaptureVideo); 360 | initLED(NVidiaCaptureVideo_LED, sNVidiaCaptureVideo); 361 | if(DebugMode | DebugMMode) printf("NVidia ShadowPlay Capture Video [%d]\x0a", sNVidiaCaptureVideo); 362 | } 363 | else if(GFXVideo == 2){ //AMD Relive 364 | sAMDCaptureVideo=!sAMDCaptureVideo; 365 | ActKey(KEYON+PULSE+AMDCaptureVideo); 366 | initLED(AMDCaptureVideo_LED, sAMDCaptureVideo); 367 | if(DebugMode | DebugMMode) printf("AMD Relive Capture Video [%d]\x0a", sAMDCaptureVideo); 368 | } 369 | else{ 370 | if(DebugMode | DebugMMode) printf("No Software selected for Capture Video\x0a"); //None 371 | } 372 | } 373 | 374 | //FUNCTION: Streaming Video 375 | int initStreamingVideo(){ 376 | if(GFXVideo == 1){ //Nvidia Shadowplay 377 | sNVidiaStreaming=!sNVidiaStreaming; 378 | ActKey(KEYON+PULSE+NVidiaStreaming); 379 | initLED(NVidiaStreaming_LED, sNVidiaStreaming); 380 | if(DebugMode | DebugMMode) printf("NVidia ShadowPlay Streaming [%d]\x0a", sNVidiaStreaming); 381 | } 382 | else if(GFXVideo == 2){ //AMD Relive 383 | sAMDStreaming=!sAMDStreaming; 384 | ActKey(KEYON+PULSE+AMDStreaming); 385 | initLED(AMDStreaming_LED, sAMDStreaming); 386 | if(DebugMode | DebugMMode) printf("AMD Relive Streaming [%d]\x0a", sAMDStreaming); 387 | } 388 | else{ 389 | if(DebugMode | DebugMMode) printf("No Software selected for Streaming Video\x0a"); //None 390 | } 391 | } 392 | 393 | //FUNCTION: Screenshot 394 | int initScreenshot(){ 395 | if(!UseSteamScreenshot){ 396 | //if(sExplorerMode){ 397 | // ActKey(KEYON+PULSE+HighResScreenshot); 398 | // if(DebugMode)printf("HD Screenshot\x0a"); 399 | //}else{ 400 | ActKey(KEYON+PULSE+Screenshot); 401 | if(DebugMode | DebugMMode) printf("Screenshot\x0a"); 402 | //} 403 | } 404 | else{ 405 | ActKey(KEYON+PULSE+TakeSteamScreenshot); 406 | if(DebugMode | DebugMMode) printf("Steam Screenshot\x0a"); 407 | } 408 | } 409 | 410 | //FUNCTION: Voice PTT 411 | int initVoicePTT(){ 412 | if (sPTTState) vPTT = InternalVoiceCommsPTT; //External Mic 413 | else if(!sPTTState)vPTT = ExternalVoiceCommsPTT; //Internal Mic 414 | if(Throttle[P_MSP]){ 415 | vVoicePTT=!vVoicePTT; 416 | if(sPTTMode){ //TOGGLE 417 | vVoice=!vVoice; 418 | ActKey(KEYON+PULSE+vPTT); 419 | if(DebugMode) printf("Mic Toggle [%d] [Actived[1] DesActived[0] / PTT [%d] [External:[0]Internal:[1]] / Mode [%d] [HOLD:[0] TOGGLE:[1]]\x0a", vVoicePTT, sPTTState, sPTTMode); 420 | } 421 | else ActKey(KEYON+DOWN+vPTT); //Talk [HOLD] 422 | } 423 | if(!Throttle[P_MSP] & !sPTTMode){ //Silence [HOLD] 424 | vVoicePTT=!vVoicePTT; 425 | ActKey(KEYON+UP+vPTT); 426 | } 427 | initLED(VoicePTT_LED, vVoicePTT); 428 | 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); 429 | } -------------------------------------------------------------------------------- /Thrustmaster Warthog Script/ED+HCS v3.3.tmc: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 Thomas Duployez (CMDR Touille) 2 | // V3.3.01b 2018/12 3 | // Distributed freely under the MIT License. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 23 | // INCLUDED FILES // 24 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 25 | 26 | include "target.tmh" 27 | include "ED+HCS v3.3_Variables.tmh" 28 | include "ED+HCS v3.3_Settings.tmh" 29 | include "ED+HCS v3.3_USBKey.ttm" 30 | include "ED+HCS v3.3_KeyBindings.ttm" 31 | include "ED+HCS v3.3_Macros.tmh" 32 | include "ED+HCS v3.3_Functions_HARDWARE.tmh" 33 | include "ED+HCS v3.3_Functions_TOGGLE.tmh" 34 | include "ED+HCS v3.3_Functions_CORE.tmh" 35 | include "ED+HCS v3.3_API_TCP.tmh" 36 | 37 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 38 | int main() 39 | { 40 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 41 | 42 | Configure(&HCougar, MODE_EXCLUDED); 43 | Configure(&T16000, MODE_EXCLUDED); 44 | Configure(&T16000L, MODE_EXCLUDED); 45 | Configure(&TWCSThrottle, MODE_EXCLUDED); 46 | Configure(&TFRPHARudder, MODE_EXCLUDED); 47 | Configure(&JoystickF18, MODE_EXCLUDED); 48 | 49 | //Rudders 50 | if(Rudders < 2) Configure(&TFRPRudder, MODE_EXCLUDED); 51 | else Configure(&TFRPRudder, MODE_FILTERED); 52 | 53 | //MFD 54 | if(USEMFD == 0){ 55 | Configure(&LMFD, MODE_EXCLUDED); 56 | Configure(&RMFD, MODE_EXCLUDED); 57 | } 58 | 59 | if(Init(&EventHandle)) return 1; // declare the event handler, return on error 60 | 61 | RegisterGameCallback(1000, &TCPCallback); // Attach TCPCallback procedure to TCP port 1000 62 | //system("spawn -w \"C:\\Users\\\\Saved Games\\Frontier Developments\\Elite Dangerous\" \"C:\\Users\\\\Saved Games\\Frontier Developments\\Elite Dangerous\\ED-Warthog-Target-Script_Addon.exe\""); 63 | 64 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 65 | // BASE SETTINGS // 66 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 67 | 68 | SetKBRate(PulseTime, DelayTime); 69 | SetKBLayout(KBLayout); 70 | 71 | if(DebugMode | DebugMMode) printf("-------------------------Hardware Initialisation--------------------------\x0a"); 72 | 73 | // Initiate Axis Mappings 74 | if(DebugMode | DebugMMode) printf("Initialising Joystick Axis\x0a"); initJoystickAxis(); 75 | if(DebugMode | DebugMMode) printf("Initialising Throttle Axis\x0a"); initThrottleAxis(); 76 | if(Rudders == 2){ 77 | if(DebugMode | DebugMMode) printf("Initialising Rudders Axis\x0a"); 78 | // initRudders(); 79 | } 80 | 81 | // Initiate Curve Mappings 82 | if(DebugMode | DebugMMode) printf("Initialising Joystick Curve\x0a"); initSetJoystickCurves(); 83 | if(DebugMode | DebugMMode) printf("Initialising Throttle Curve\x0a"); initSetThrottleCurves(); 84 | if(Rudders == 2){ 85 | if(DebugMode | DebugMMode) printf("Initialising TFRPRudders Curve\x0a"); 86 | initSetTFRPCurves(); 87 | } 88 | 89 | //Initiate MFD 90 | if(USEMFD > 0){if(DebugMode | DebugMMode) printf("Initialising Right MFD\x0a"); initRightMFD();} 91 | if(USEMFD > 1){if(DebugMode | DebugMMode) printf("Initialising Left MFD\x0a"); initLeftMFD() ;} 92 | 93 | // Initiate Led State 94 | if(DebugMode | DebugMMode) printf("Initialising LED States\x0a"); initLEDStates(); 95 | 96 | // Initiate Custom Macros Functions 97 | initCustomCommands(); 98 | 99 | if(DebugMode) initPrintState(); 100 | 101 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 102 | // ;) // 103 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 104 | 105 | printf("--------------------------V3.3.01b------2018/12/24------------------------\x0a"); 106 | printf("---------Enhanced Elite Dangerous Warthog Profile by CMDR Touille---------\x0a"); 107 | printf("------------------------------Fly Safe CMDR! o7---------------------------\x0a"); 108 | printf("-o/--o/--o/-Aussiedroid-DarKcyde0-WraithMG11235-Synkc-Solarfly-o/--o/--o/-\x0a"); 109 | printf("-o/--o/-----Farinhir : The First CMDR to report Bug & FeedBack-----o/--o/-\x0a"); 110 | printf("--------------------------------------------------------------------------\x0a"); 111 | 112 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 113 | // Shift States // Modifier don't touch this // 114 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 115 | 116 | SetShiftButton(&Joystick, P_S3, &Throttle, T3_APPAT, T3_APALT); 117 | 118 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 119 | // MAP JOYSTICK CONTROLS // 120 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 121 | 122 | //--JOYSTICK BUTTON---------------------------------------------------------------------------------------------------------------------------------------------// 123 | 124 | MapKey (&Joystick, TG1, EXEC("initFire();")); 125 | MapKeyR(&Joystick, TG1, EXEC("initFire();")); 126 | 127 | MapKey (&Joystick, TG2, 0); // Reseved for initCombinedFire() 128 | MapKeyR(&Joystick, TG2, 0); // Reseved for initCombinedFire() 129 | 130 | MapKey(&Joystick, P_S1, TEMPO(EXEC("initToggleCombinedFire();"), EXEC("initToggleHardpoints();"), LongPressDelay)); //S1 131 | 132 | MapKey (&Joystick, P_S2, EXEC("initFire();")); //S2 133 | MapKeyR(&Joystick, P_S2, EXEC("initFire();")); 134 | 135 | //MapKey(&Joystick, P_S3 , 0); // Modifier P_S3 don't touch this 136 | 137 | MapKey (&Joystick, P_S4, EXEC(" initToggleEnhancedFAOFF();")); //S4 138 | MapKeyR(&Joystick, P_S4, EXEC(" initToggleEnhancedFAOFF();")); 139 | 140 | //--JOYSTICK HAT------------------------------------------------------------------------------------------------------------------------------------------------// 141 | 142 | // -------------------------Trim Switch 143 | MapKeyIOUMD(&Joystick, H_H1U, // UP 144 | 0, FC_Increase_Speed, 145 | PULSE+PowerEng, TEMPO(EXEC("initPIPPower(ENG);"), TEMPO(EXEC("initPIPPower(ENG,SYS);"), EXEC("initPIPPower(ENG,WEP);"), PIPPressDelay), PIPPressDelay), 146 | PULSE+PowerEng, TEMPO(EXEC("initPIPPower(ENG);"), TEMPO(EXEC("initPIPPower(ENG,SYS);"), EXEC("initPIPPower(ENG,WEP);"), PIPPressDelay), PIPPressDelay) 147 | ); 148 | MapKeyIOUMD(&Joystick, H_H1D, // DOWN 149 | 0, FC_Decrease_Speed, 150 | 0, TEMPO(EXEC("initPIPPower();"), SEQ(EXEC("initPIPPower(SYS,WEP,MID);"),EXEC("initPIPPower(ENG,WEP,MID);"), EXEC("initPIPPower(ENG,SYS,MID);")), PIPPressDelay), 151 | 0, TEMPO(EXEC("initPIPPower();"), SEQ(EXEC("initPIPPower(SYS,WEP,MID);"),EXEC("initPIPPower(ENG,WEP,MID);"), EXEC("initPIPPower(ENG,SYS,MID);")), PIPPressDelay) 152 | ); 153 | MapKeyIOUMD(&Joystick, H_H1L, // LEFT 154 | 0, FC_Zoom_OUT, 155 | PULSE+PowerSys, TEMPO(EXEC("initPIPPower(SYS);"), TEMPO(EXEC("initPIPPower(SYS,ENG);"), EXEC("initPIPPower(SYS,WEP);"), PIPPressDelay), PIPPressDelay), 156 | PULSE+PowerSys, TEMPO(EXEC("initPIPPower(SYS);"), TEMPO(EXEC("initPIPPower(SYS,ENG);"), EXEC("initPIPPower(SYS,WEP);"), PIPPressDelay), PIPPressDelay) 157 | ); 158 | MapKeyIOUMD(&Joystick, H_H1R, // RIGHT 159 | 0, FC_Zoom_IN, 160 | PULSE+PowerWep, TEMPO(EXEC("initPIPPower(WEP);"), TEMPO(EXEC("initPIPPower(WEP,ENG);"), EXEC("initPIPPower(WEP,SYS);"), PIPPressDelay), PIPPressDelay), 161 | PULSE+PowerWep, TEMPO(EXEC("initPIPPower(WEP);"), TEMPO(EXEC("initPIPPower(WEP,ENG);"), EXEC("initPIPPower(WEP,SYS);"), PIPPressDelay), PIPPressDelay) 162 | ); 163 | 164 | // -------------------------Target Management Switch (TMS) 165 | MapKeyIOUMD(&Joystick, H_H2U, // UP 166 | 0, PULSE+Enter_Free_Camera, 167 | PULSE+Discovery, TEMPO(PULSE+SelectTargetAhead, PULSE+SelectHighestThreat, LongPressDelay), 168 | PULSE+Discovery, TEMPO(PULSE+SelectTargetAhead, PULSE+SelectHighestThreat, LongPressDelay) 169 | ); 170 | MapKeyIOUMD(&Joystick, H_H2D, // DOWN 171 | 0, PULSE+FC_Exit_Free_Camera, 172 | PULSE+FSSS_Mode_Toggle, PULSE+SelectNextSystemInRoute, 173 | PULSE+FSSS_Mode_Toggle, PULSE+SelectNextSystemInRoute 174 | ); 175 | MapKeyIOUMD(&Joystick, H_H2L, // LEFT 176 | 0, PULSE+FC_Lock_To_Vehicle, 177 | PULSE+SelectPrevSubsystem, TEMPO(PULSE+SelectPrevShip, PULSE+SelectPrevHostileShip, LongPressDelay), 178 | PULSE+SelectPrevSubsystem, TEMPO(PULSE+SelectPrevShip, PULSE+SelectPrevHostileShip, LongPressDelay) 179 | ); 180 | MapKeyIOUMD(&Joystick, H_H2R, // RIGHT 181 | 0, PULSE+FC_Lock_To_World, 182 | PULSE+SelectNextSubsystem, TEMPO(PULSE+SelectNextShip, PULSE+SelectNextHostileShip, LongPressDelay), 183 | PULSE+SelectNextSubsystem, TEMPO(PULSE+SelectNextShip, PULSE+SelectNextHostileShip, LongPressDelay) 184 | ); 185 | 186 | // -------------------------Data Management Switch (DMS) 187 | MapKeyIOUMD(&Joystick, H_H3U, // UP 188 | 0, FC_Increase_Blur, 189 | PULSE+CommsPanel, TEMPO(EXEC("initToggleSilentRuningOFFonFire();"), EXEC("initToggleHeatSinkonSilentRuning();"), ExtraPressDelay), 190 | PULSE+CommsPanel, TEMPO(EXEC("initToggleSilentRuningOFFonFire();"), EXEC("initToggleHeatSinkonSilentRuning();"), ExtraPressDelay) 191 | ); 192 | MapKeyIOUMD(&Joystick, H_H3D, // DOWN 193 | 0, FC_Decrease_Blur, 194 | PULSE+RolePanel, TEMPO(0,EXEC("initToggleSilentRuning();"), LongPressDelay), 195 | PULSE+RolePanel, TEMPO(0,EXEC("initToggleSilentRuning();"), LongPressDelay) 196 | ); 197 | MapKeyRIOUMD(&Joystick, H_H3D, // DOWN RELEASE 198 | 0, 0, 199 | 0,EXEC("initToggleSilentRuning();"), 200 | 0,EXEC("initToggleSilentRuning();") 201 | ); 202 | MapKeyIOUMD(&Joystick, H_H3L, // LEFT 203 | 0, FC_Decrease_Focus_Distance, 204 | PULSE+TargetPanel, PrevFireGroup, 205 | PULSE+TargetPanel, PrevFireGroup 206 | ); 207 | MapKeyIOUMD(&Joystick, H_H3R, // RIGHT 208 | 0, FC_Increase_Focus_Distance, 209 | PULSE+SystemPanel, NextFireGroup, 210 | PULSE+SystemPanel, NextFireGroup 211 | ); 212 | 213 | // -------------------------Countermeasures Management Switch (CMS) 214 | MapKeyIOUMD(&Joystick, H_H4U, // UP 215 | 0, FC_Move_Forward, 216 | PULSE+NightVision, UIUp, 217 | PULSE+NightVision, UIUp 218 | ); 219 | MapKeyIOUMD(&Joystick, H_H4D, // DOWN 220 | 0, FC_Move_Backward, 221 | 0, UIDown, 222 | 0, UIDown 223 | ); 224 | MapKeyIOUMD(&Joystick, H_H4L, // LEFT 225 | 0, Previous_Camera, 226 | UIPrevPanel, UILeft, 227 | UIPrevPanel, UILeft 228 | ); 229 | MapKeyIOUMD(&Joystick, H_H4R, // RIGHT 230 | 0, Next_Camera, 231 | UINextPanel, UIRight, 232 | UINextPanel, UIRight 233 | ); 234 | MapKeyIOUMD(&Joystick, P_H4P, // H4P PUSH 235 | 0, PULSE+FC_Zoom_Dof_Toggle, 236 | UIBack, UISelect, 237 | UIBack, UISelect 238 | ); 239 | 240 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 241 | // MAP THROTTLE ARM CONTROLS // 242 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 243 | 244 | //--THROTTLE ARM BUTTON-----------------------------------------------------------------------------------------------------------------------------------------// 245 | 246 | // -------------------------Slew Control Push SC 247 | MapKey (&Throttle, P_SC, EXEC("initToogleHeadLook();")); //ONLY IF !HMD & !TRACKIR : Head Look 248 | MapKeyR(&Throttle, P_SC, EXEC("initToogleHeadLook();")); 249 | 250 | // -------------------------Left Throttle Button (RED) LTB 251 | MapKeyIO (&Throttle, P_LTB, EXEC("initSetThrottleCurves();"), EXEC("initToggleReverseThrottle();")); 252 | MapKeyRIO(&Throttle, P_LTB, 0, EXEC("initToggleReverseThrottle();")); 253 | 254 | // -------------------------Mic Switch MSP 255 | MapKey (&Throttle, P_MSP, EXEC("initVoicePTT();")); 256 | MapKeyR(&Throttle, P_MSP, EXEC("initVoicePTT();")); 257 | 258 | //--THROTTLE ARM HAT--------------------------------------------------------------------------------------------------------------------------------------------// 259 | 260 | // -------------------------Mic Switch 261 | MapKeyIOUMD(&Throttle, H_MSU, // UP 262 | TEMPO(PULSE+FighterFocus, PULSE+FighterDock, LongPressDelay), TEMPO(PULSE+WingmanTarget, PULSE+WingmanNavlock, LongPressDelay), 263 | TEMPO(PULSE+FighterFocus, PULSE+FighterDock, LongPressDelay), TEMPO(PULSE+WingmanTarget, PULSE+WingmanNavlock, LongPressDelay), 264 | TEMPO(PULSE+FighterFocus, PULSE+FighterDock, LongPressDelay), TEMPO(PULSE+WingmanTarget, PULSE+WingmanNavlock, LongPressDelay) 265 | ); 266 | MapKeyIOUMD(&Throttle, H_MSD, // DOWN 267 | TEMPO(PULSE+FighterFollow, PULSE+FighterOrders, LongPressDelay), PULSE+SelectWingman2, 268 | TEMPO(PULSE+FighterFollow, PULSE+FighterOrders, LongPressDelay), PULSE+SelectWingman2, 269 | TEMPO(PULSE+FighterFollow, PULSE+FighterOrders, LongPressDelay), PULSE+SelectWingman2 270 | ); 271 | MapKeyIOUMD(&Throttle, H_MSL, // LEFT 272 | TEMPO(PULSE+FighterHoldPosition, PULSE+FighterDefensive, LongPressDelay), PULSE+SelectWingman1, 273 | TEMPO(PULSE+FighterHoldPosition, PULSE+FighterDefensive, LongPressDelay), PULSE+SelectWingman1, 274 | TEMPO(PULSE+FighterHoldPosition, PULSE+FighterDefensive, LongPressDelay), PULSE+SelectWingman1 275 | ); 276 | MapKeyIOUMD(&Throttle, H_MSR, // RIGHT 277 | TEMPO(PULSE+FighterHoldFire, PULSE+FighterAggressive, LongPressDelay), PULSE+SelectWingman3, 278 | TEMPO(PULSE+FighterHoldFire, PULSE+FighterAggressive, LongPressDelay), PULSE+SelectWingman3, 279 | TEMPO(PULSE+FighterHoldFire, PULSE+FighterAggressive, LongPressDelay), PULSE+SelectWingman3 280 | ); 281 | 282 | // -------------------------Coolie Hat Switch 283 | MapKeyIOUMD(&Throttle, H_CSU, // UP 284 | TEMPO(EXEC("TrimDXAxis(DX_Y_AXIS, - Trim_INC);"), EXEC("TrimDXAxis(DX_X_AXIS, CURRENT);TrimDXAxis(DX_Y_AXIS, CURRENT);"), LongPressDelay), ThrustUp, 285 | TEMPO(EXEC("TrimDXAxis(DX_Y_AXIS, - Trim_INC);"), EXEC("TrimDXAxis(DX_X_AXIS, CURRENT);TrimDXAxis(DX_Y_AXIS, CURRENT);"), LongPressDelay), ThrustUp, 286 | TEMPO(EXEC("TrimDXAxis(DX_Y_AXIS, - Trim_INC);"), EXEC("TrimDXAxis(DX_X_AXIS, CURRENT);TrimDXAxis(DX_Y_AXIS, CURRENT);"), LongPressDelay), ThrustUp 287 | ); 288 | MapKeyIOUMD(&Throttle, H_CSD, // DOWN 289 | TEMPO(EXEC("TrimDXAxis(DX_Y_AXIS, Trim_INC);"), EXEC("TrimDXAxis(DX_X_AXIS, SET(0));TrimDXAxis(DX_Y_AXIS, SET(0));"), LongPressDelay), ThrustDown, 290 | TEMPO(EXEC("TrimDXAxis(DX_Y_AXIS, Trim_INC);"), EXEC("TrimDXAxis(DX_X_AXIS, SET(0));TrimDXAxis(DX_Y_AXIS, SET(0));"), LongPressDelay), ThrustDown, 291 | TEMPO(EXEC("TrimDXAxis(DX_Y_AXIS, Trim_INC);"), EXEC("TrimDXAxis(DX_X_AXIS, SET(0));TrimDXAxis(DX_Y_AXIS, SET(0));"), LongPressDelay), ThrustDown 292 | ); 293 | MapKeyIOUMD(&Throttle, H_CSL, // LEFT 294 | EXEC("TrimDXAxis(DX_X_AXIS, -Trim_INC);"), ThrustLeft, 295 | EXEC("TrimDXAxis(DX_X_AXIS, -Trim_INC);"), ThrustLeft, 296 | EXEC("TrimDXAxis(DX_X_AXIS, -Trim_INC);"), ThrustLeft 297 | ); 298 | MapKeyIOUMD(&Throttle, H_CSR, // RIGHT 299 | EXEC("TrimDXAxis(DX_X_AXIS, Trim_INC);"), ThrustRight, 300 | EXEC("TrimDXAxis(DX_X_AXIS, Trim_INC);"), ThrustRight, 301 | EXEC("TrimDXAxis(DX_X_AXIS, Trim_INC);"), ThrustRight 302 | ); 303 | 304 | //--THROTTLE ARM SWITCH-----------------------------------------------------------------------------------------------------------------------------------------// 305 | 306 | // -------------------------Speedbrake 307 | MapKey (&Throttle, T3_SPDF, TEMPO(EXEC("initFrameShiftDrive();"), EXEC("initSystemJump();"), ExtraPressDelay)); // Switch FORWARD 308 | // MapKey (&Throttle, T3_SPDM, 0); // Switch MIDDLE 309 | MapKeyIO(&Throttle, T3_SPDB, EXEC("initToggleSuperCruiseMode();"), TEMPO(EXEC("initThrottleBoost();"), EXEC("initSuperCruise();"), LongPressDelay)); // Switch BACK HOLD 310 | 311 | // -------------------------Boat Switch 312 | MapKey(&Throttle, T3_BSF, PULSE+GalaxyMap); // Switch FORWARD 313 | MapKey(&Throttle, T3_BSM, PULSE+UIBack); // Switch MIDDLE 314 | MapKey(&Throttle, T3_BSB, PULSE+SystemMap); // Switch BACK 315 | 316 | // -------------------------China Hat 317 | MapKeyUMD(&Throttle, T3_CHF, // Switch FORWARD 318 | TEMPO(PULSE+DeployHeatSink, PULSE+ChargeECM, LongPressDelay), 319 | TEMPO(PULSE+DeployHeatSink, PULSE+ChargeECM, LongPressDelay), 320 | PULSE+MC_Primary_Utility 321 | ); 322 | // MapKey(&Throttle, T3_CHM, 0); // Switch MIDDLE 323 | MapKeyUMD(&Throttle, T3_CHB, // Switch BACK 324 | TEMPO(PULSE+FireChaffLauncher, PULSE+UseShieldCell, LongPressDelay), 325 | TEMPO(PULSE+FireChaffLauncher, PULSE+UseShieldCell, LongPressDelay), 326 | PULSE+MC_Secondary_Utility 327 | ); 328 | 329 | // -------------------------Pinky Throttle 330 | MapKeyIO(&Throttle, T3_PSF, PULSE+ChangeWeaponColor, PULSE+OrbitalLines); // Switch FORWARD 331 | // MapKey (&Throttle, T3_PSM, 0); // Switch MIDDLE 332 | MapKeyIO(&Throttle, T3_PSB, PULSE+ChangeEngineColor, PULSE+HideShipGUI); // Switch BACK 333 | 334 | 335 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 336 | // MAP THROTTLE BASE CONTROLS // 337 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 338 | 339 | //--THROTTLE BASE BUTTON----------------------------------------------------------------------------------------------------------------------------------------// 340 | 341 | // -------------------------Landing Gear/ Warning Horn Silence Button LDGH 342 | MapKeyIO(&Throttle, P_LDGH, TEMPO(PULSE+TrackIRPause, TEMPO(PULSE+EXEC("initCaptureVideo();"), PULSE+EXEC("initStreamingVideo();"), ExtraPressDelay), LongPressDelay), 343 | TEMPO(PULSE+EXEC("initHeadCenter();"), TEMPO(EXEC("initScreenshot();"), PULSE+HighResScreenshot, ExtraPressDelay), LongPressDelay)); // PUSH 344 | 345 | // -------------------------Autopilot Engage Button Same As Autopilot Disengage Button APENG 346 | MapKeyIO(&Throttle, P_APENG, EXEC("initRCDocking();"), TEMPO(0, EXEC("initEscapeFight();"), LongPressDelay)); // PUSH 347 | 348 | // -------------------------Autopilot Disengage Button Same As Autopilot Engage Button 349 | // MapKey(&Throttle, APDIS, 0); // PUSH 350 | 351 | //--THROTTLE BASE SWITCH----------------------------------------------------------------------------------------------------------------------------------------// 352 | 353 | // -------------------------FLAPS - Map Throttle to Joystick Curve Presets 354 | MapKey(&Throttle, T3_FLAPU, EXEC("initSetJoystickCurves();")); // Flaps UP 355 | MapKey(&Throttle, T3_FLAPM, EXEC("initSetJoystickCurves();")); // Flaps MIDDLE 356 | MapKey(&Throttle, T3_FLAPD, EXEC("initSetJoystickCurves();")); // Flaps DOWN 357 | 358 | // -------------------------Autopilot Select Switch // Modifier don't touch this 359 | MapKey (&Throttle, T3_APPAT, EXEC("initToggleCamera();")); // Modifier UP (PATH) 360 | MapKeyR(&Throttle, T3_APPAT, EXEC("initToggleCamera();")); // Modifier UP Release (PATH) 361 | // MapKey(&Throttle, T3_APAH, 0); // Modifier MIDDLE (ALT/HDG) 362 | MapKey (&Throttle, T3_APALT, PULSE+MC_Mode_Toggle); // Modifier DOWN (ALT) 363 | MapKeyR(&Throttle, T3_APALT, PULSE+MC_Mode_Toggle); // Modifier DOWN Release(ALT) 364 | 365 | // -------------------------Engine Fuel Flow Switches LEFT EFLNORM/EFLOVER 366 | 367 | MapKey (&Throttle, T2_EFLNORM, EXEC("initToggleHUDMode();")); // Switch UP 368 | MapKeyR(&Throttle, T2_EFLNORM, EXEC("initToggleHUDMode();")); // Switch UP RELEASE 369 | // MapKey(&Throttle, T2_EFLOVER, 0); / Switch DOWN 370 | 371 | // -------------------------Engine Fuel Flow Switches RIGHT EFRNORM/EFROVER 372 | MapKey (&Throttle, T2_EFRNORM, EXEC("initToggleLights();")); // Switch UP 373 | MapKeyR(&Throttle, T2_EFRNORM, EXEC("initToggleLights();")); // Switch UP RELEASE 374 | // MapKey(&Throttle, T2_EFROVER, 0); // Switch DOWN 375 | 376 | // -------------------------Engine Operate Ign/Norm LEFT 377 | MapKeyIO(&Throttle, T3_EOLIGN, TEMPO(EXEC("initTogglePTTPTP();"), EXEC("initTogglePTTMode();"), LongPressDelay), 378 | TEMPO(0, EXEC("initFPSCONNECTION();"), LongPressDelay)); // UP 379 | // MapKey (&Throttle, T3_EOLNORM, 0); // OFF 380 | MapKey (&Throttle, T3_EOLMOTOR, EXEC("initToggleVoiceAttackMic();")); // DOWN 381 | MapKeyR (&Throttle, T3_EOLMOTOR, EXEC("initToggleVoiceAttackMic();")); // DOWN RELEASE 382 | 383 | // -------------------------Engine Operate Ign/Norm RIGHT 384 | MapKeyIO(&Throttle, T3_EORIGN, TEMPO(EXEC("initToggleSecureRetract();"), EXEC("initToggleRotationalCorrection();"), LongPressDelay), 385 | TEMPO(EXEC("initToggleOptimalPIPMode();"), EXEC("initToggleStopFireRetractHardpoints();"), LongPressDelay)); // UP 386 | // MapKey (&Throttle, T3_EORNORM, 0); // OFF 387 | MapKey (&Throttle, T3_EORMOTOR, EXEC("initToggleGameMenu();")); // DOWN 388 | MapKeyR (&Throttle, T3_EORMOTOR, EXEC("initToggleGameMenu();")); // DOWN RELEASE 389 | 390 | // -------------------------APU Start APUON/APUOFF 391 | MapKey(&Throttle, T2_APUON, EXEC("initJettisonCargo();")); // Switch UP 392 | // MapKey(&Throttle, T2_APUOFF, 0); // Switch DOWN (OFF) 393 | 394 | // -------------------------EAC EACON/EACOFF 395 | MapKey (&Throttle, T2_EACON, EXEC("initToggleLandingGear();")); // Switch UP (ARM) 396 | MapKeyR(&Throttle, T2_EACON, EXEC("initToggleLandingGear();")); // Switch UP RELEASE 397 | // MapKey (&Throttle, T2_EACOFF, 0); // Switch DOWN (OFF) 398 | 399 | // -------------------------RDR ALTM RDRNRM/RDRDIS 400 | MapKey (&Throttle, T2_RDRNRM, EXEC("initToggleCargoScoop();")); // Switch UP (NRM) 401 | MapKeyR(&Throttle, T2_RDRNRM, EXEC("initToggleCargoScoop();")); // Switch UP RELEASE 402 | // MapKey (&Throttle, T2_RDRDIS, 0); // Switch DOWN (DIS) 403 | 404 | 405 | //--THROTTLE BASE TRHOTTLE--------------------------------------------------------------------------------------------------------------------------------------// 406 | 407 | // -------------------------Throttle Idle Detents LEFT 408 | MapKey (&Throttle, IDLELON, EXEC("initToggleIDLEonThrottle();")); // ON [Locking (Down): Stationary] 409 | MapKeyR(&Throttle, IDLELON, EXEC("initToggleIDLEonThrottle();")); // ON RELEASE 410 | // MapKey (&Throttle, IDLELOFF, 0); // OFF 411 | 412 | // -------------------------Throttle Idle Detents RIGHT 413 | // MapKey (&Throttle, IDLERON, 0); // ON 414 | // MapKeyR(&Throttle, IDLERON, 0); // ON RELEASE 415 | // MapKey (&Throttle, IDLEROFF, 0); // OFF 416 | 417 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 418 | } 419 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 420 | 421 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 422 | // MAP MFD // 423 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 424 | 425 | //Set Right MFD 426 | int initRightMFD(){ 427 | // MapKey(&RMFD, GAINU, 0); 428 | // MapKey(&RMFD, GAIND, 0); 429 | // MapKey(&RMFD, OSB01, 0); 430 | // MapKey(&RMFD, OSB02, 0); 431 | // MapKey(&RMFD, OSB03, 0); 432 | // MapKey(&RMFD, OSB04, 0); 433 | // MapKey(&RMFD, OSB05, 0); 434 | // MapKey(&RMFD, OSB06, 0); 435 | // MapKey(&RMFD, OSB07, 0); 436 | // MapKey(&RMFD, OSB08, 0); 437 | // MapKey(&RMFD, OSB09, 0); 438 | // MapKey(&RMFD, OSB10, 0); 439 | // MapKey(&RMFD, OSB11, 0); 440 | // MapKey(&RMFD, OSB12, 0); 441 | // MapKey(&RMFD, OSB13, 0); 442 | // MapKey(&RMFD, OSB14, 0); 443 | // MapKey(&RMFD, OSB15, 0); 444 | // MapKey(&RMFD, OSB16, 0); 445 | // MapKey(&RMFD, OSB17, 0); 446 | // MapKey(&RMFD, OSB18, 0); 447 | // MapKey(&RMFD, OSB19, 0); 448 | // MapKey(&RMFD, OSB20, 0); 449 | // MapKey(&RMFD, BRTU, 0); 450 | // MapKey(&RMFD, BRTD, 0); 451 | // MapKey(&RMFD, CONU, 0); 452 | // MapKey(&RMFD, COND, 0); 453 | if(DebugMode) printf("...Done\x0a"); 454 | } 455 | 456 | //Set Left MFD 457 | int initLeftMFD(){ 458 | // MapKey(&LMFD, GAINU, 0); 459 | // MapKey(&LMFD, GAIND, 0); 460 | // MapKey(&LMFD, OSB01, 0); 461 | // MapKey(&LMFD, OSB02, 0); 462 | // MapKey(&LMFD, OSB03, 0); 463 | // MapKey(&LMFD, OSB04, 0); 464 | // MapKey(&LMFD, OSB05, 0); 465 | // MapKey(&LMFD, OSB06, 0); 466 | // MapKey(&LMFD, OSB07, 0); 467 | // MapKey(&LMFD, OSB08, 0); 468 | // MapKey(&LMFD, OSB09, 0); 469 | // MapKey(&LMFD, OSB10, 0); 470 | // MapKey(&LMFD, OSB11, 0); 471 | // MapKey(&LMFD, OSB12, 0); 472 | // MapKey(&LMFD, OSB13, 0); 473 | // MapKey(&LMFD, OSB14, 0); 474 | // MapKey(&LMFD, OSB15, 0); 475 | // MapKey(&LMFD, OSB16, 0); 476 | // MapKey(&LMFD, OSB17, 0); 477 | // MapKey(&LMFD, OSB18, 0); 478 | // MapKey(&LMFD, OSB19, 0); 479 | // MapKey(&LMFD, OSB20, 0); 480 | // MapKey(&LMFD, BRTU, 0); 481 | // MapKey(&LMFD, BRTD, 0); 482 | // MapKey(&LMFD, CONU, 0); 483 | // MapKey(&LMFD, COND, 0); 484 | if(DebugMode) printf("...Done\x0a"); 485 | } 486 | 487 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 488 | // EVENT HANDLER // 489 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------// 490 | 491 | int EventHandle(int type, alias o, int x) 492 | { 493 | int TRPCOMBO; 494 | int Differential_Toe; 495 | int THR_FC_AxisLight; 496 | 497 | // Throttle & MFD : On-The-FLy Backlight Control 498 | if(&o == &Throttle & x == THR_FC & Joystick[P_S3]){ //HOLD P_S3 on Joystick & Move Throttle Friction Control Axis 499 | THR_FC_AxisLight = (AxisVal(Throttle[THR_FC], &axdata) - 32766) / 256 * -1; 500 | vThrottleLightBackup = THR_FC_AxisLight; 501 | vRMFDLightBackup = THR_FC_AxisLight; 502 | vLMFDLightBackup = THR_FC_AxisLight; 503 | initBACKLIGHT(Throttle_BL, vThrottleLightBackup); 504 | initBACKLIGHT(RMFD_BL, vRMFDLightBackup); 505 | initBACKLIGHT(LMFD_BL, vLMFDLightBackup); 506 | } 507 | 508 | //Map the MODE_FILTERED TFRP through Target; we can Trim, set deadzones, J/Scurves, etc. 509 | if(&o == &TFRPRudder){ 510 | GetAxisData(&o, x); 511 | axdata.val = AxisVal(o[x], &axdata); 512 | if(x == TRPLEFT | x == TRPRIGHT){ 513 | axdata.locked = 1; 514 | Differential_Toe = -TFRPRudder[TRPRIGHT]/2 + TFRPRudder[TRPLEFT]/2; 515 | 516 | //apply curves/deadzones and output data 517 | Differential_Toe = AxisVal(Differential_Toe, &axdata); 518 | GameOutput(&o, TRPRIGHT, Differential_Toe); //Comment out this line (//) to get the combo to map in game, then Uncomment 519 | 520 | if(TFRPRudder[TRPLEFT] < TFRPRudder[TRPRIGHT]) TRPCOMBO = TFRPRudder[TRPRIGHT]; 521 | else TRPCOMBO = TFRPRudder[TRPLEFT]; 522 | 523 | //apply curves/deadzones and output data 524 | TRPCOMBO = AxisVal(TRPCOMBO, &axdata); 525 | GameOutput (&o, TRPLEFT, -TRPCOMBO); 526 | } 527 | if(!axdata.locked & !axdata.relative) GameOutput(&o, x, axdata.val); 528 | } 529 | 530 | else DefaultMapping(&o, x); 531 | } -------------------------------------------------------------------------------- /Default Keybinds - Elite Dangerous/ED+HCS V3.3b.3.0.binds: -------------------------------------------------------------------------------- 1 | 2 | 3 | en-GB 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 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | 1117 | 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | 1128 | 1129 | 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | 1146 | 1147 | 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | 1160 | 1161 | 1162 | 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | 1176 | 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | 1195 | 1196 | 1197 | 1198 | 1199 | 1200 | 1201 | 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 | 1228 | 1229 | 1230 | 1231 | 1232 | 1233 | 1234 | 1235 | 1236 | 1237 | 1238 | 1239 | 1240 | 1241 | 1242 | 1243 | 1244 | 1245 | 1246 | 1247 | 1248 | 1249 | 1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 1256 | 1257 | 1258 | 1259 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | 1273 | 1274 | 1275 | 1276 | 1277 | 1278 | 1279 | 1280 | 1281 | 1282 | 1283 | 1284 | 1285 | 1286 | 1287 | 1288 | 1289 | 1290 | 1291 | 1292 | 1293 | 1294 | 1295 | 1296 | 1297 | 1298 | 1299 | 1300 | 1301 | 1302 | 1303 | 1304 | 1305 | 1306 | 1307 | 1308 | 1309 | 1310 | 1311 | 1312 | 1313 | 1314 | 1315 | 1316 | 1317 | 1318 | 1319 | 1320 | 1321 | 1322 | 1323 | 1324 | 1325 | 1326 | 1327 | 1328 | 1329 | 1330 | 1331 | 1332 | 1333 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1345 | 1346 | 1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | 1371 | 1372 | 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | 1382 | 1383 | 1384 | 1385 | 1386 | 1387 | 1388 | 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | 1395 | 1396 | 1397 | 1398 | 1399 | 1400 | 1401 | 1402 | 1403 | 1404 | 1405 | 1406 | 1407 | 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 1414 | 1415 | 1416 | 1417 | 1418 | 1419 | 1420 | 1421 | 1422 | 1423 | 1424 | 1425 | 1426 | 1427 | 1428 | 1429 | 1430 | 1431 | 1432 | 1433 | 1434 | 1435 | 1436 | 1437 | 1438 | 1439 | 1440 | 1441 | 1442 | 1443 | 1444 | 1445 | 1446 | 1447 | 1448 | 1449 | 1450 | 1451 | 1452 | 1453 | 1454 | 1455 | 1456 | 1457 | 1458 | 1459 | 1460 | 1461 | 1462 | 1463 | 1464 | 1465 | 1466 | 1467 | 1468 | 1469 | 1470 | 1471 | 1472 | 1473 | 1474 | 1475 | 1476 | 1477 | 1478 | 1479 | 1480 | 1481 | 1482 | 1483 | 1484 | 1485 | 1486 | 1487 | 1488 | 1489 | 1490 | 1491 | 1492 | 1493 | --------------------------------------------------------------------------------