Advertisement
CheechMarin

DCS Cougar+Warthog HOTAS Profile

Oct 2nd, 2017
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 68.79 KB | None | 0 0
  1. //========================================================================
  2. //              DCS World for HOTAS Cougar/Warthog and Cougar MFDs
  3. //                  by Don "Home Fries" Heumphreus
  4. //                      last updated: 22SEP2017
  5. //    (Personalization Values and Constant Parameters last updated 1.72)
  6. //
  7. //
  8. //  Change Log:
  9. //  1.00    Initial Release
  10. //  1.01    Initial Mi-8 integration
  11. //  1.02    Integrated Proprietary CommState_Off into global
  12. //  1.03    Made UH1_Intercom_Cycle() Mi8 compatible and integrated with Mi8
  13. //  1.04    Fixed minor bug with UH-1
  14. //  1.10    Compatibility with DCS World 1.2.7.23803 (Update 1)
  15. //          Major remap of FC3 controls
  16. //  1.11    Added relative Microstick Axes to shifted state in FC3 profile
  17. //          Added separate hot-selectable A-10A engine start delay for FC3 profile
  18. //  1.12    Added UH1 Misc Control Panel to RMFD OSBs 1-4 Long
  19. //  1.13    Replaced all TEMPO() and TEMPO(500) with TEMPO(DefTempo) and DFM TEMPO(100) with TEMPO(KBPress*2)
  20. //  1.14    Added Drag Chute routine to T6 when gear is down and T10 is pressed, and LED indicator when Chute is deployed
  21. //          Added Landing Gear check to Throttle based Engine Startup/Shutdown routines
  22. //  1.15    Added S3+S2 Long for ESBR Power toggle
  23. //          Added doppler control to H3 when at Copilot station (disabled until iCommands added)
  24. //          Added Mi-8 Snapviews to H4L/R
  25. //  1.16    Added FC3 Drag Chute to T6 Long when gear is down regardless of T10 position
  26. //          Added Flaps to H3U/D long while in dogfight U/D modes (FC3)
  27. //  1.17    Added FC3MapButtons() to FC3 to account for NWS
  28. //          Added custom throttle curves for idle detent users and throttles with old pots
  29. //  1.18    Added analog airbrake option to FC3 (for F-15C) and added autopilot Baro Alt mode to T6 long (FC3)
  30. //  1.19    Added ADF Band/XM60 Power to LMFD OSB5
  31. //          Added XM60 elevation and intensity analog controls to ANT ELEV and RNG (context based)
  32. //          Removed relative axes on FC3 microstick if custom master LUAs not used
  33. //  1.20    Baselined for DCS World 1.2.8
  34. //  1.21    Added Fuel Tank Select for F-15C (FC3)
  35. //          Updated Analog Airbrake routine to prevent double flashing.
  36. //  1.22    Updated FC3 analog brake to force timing
  37. //          Added context sensitive T1/T6 mapping and H1 searchlight to UH-1
  38. //  1.23    Added Nicu's Analog Airbrake routine to FC3, DX, and A-10C.
  39. //  1.24    Reorganized most of A-10C MFD additional functions.  Added parking brake to A-10C (T10).
  40. //          Replaced UH-1 RMFD RADALT and CDI OBS functions with electrical panel and radio functions.
  41. //  1.25    Added option for profile-activated Central Position Trimmer Mode (TCPTM)
  42. //          Revised Throttle-based Engine Start (S3 now required) and added Single Engine Option
  43. //          Added flashing LED for Engine Shutdown
  44. //          Added delays to "simultaneous" LED use to minimize profile crashes
  45. //  1.26    Added TEMPO to TCPTM recenter mode to reduce inadvertent default functionality.
  46. //          Fixed ejection routine to prevent TrackIR from pausing after ejection.
  47. //          Converted TriggerZoom to polling function and slaved to GearState
  48. //          Ka-50: Enhanced PVI-800 functionality (RMFD) and misc MFD functions.
  49. //          Ka-50: Changed H4LR (Emer AP Discon) to TEMPO Long.  Mapped S4 (gear st. up) to Emer AP Discon.
  50. //          Ka-50: Added R-828/ARK-22 to HOTAS.  Added Rotor RPM Warning to LOSB5 Long.
  51. //          Ka-50: Added engine start functionality to throttle/LMFD.
  52. //          P-51D: Added Wheelbrakes to T6 (gear state down) and made WEP TEMPO Long (gear state up)
  53. //  1.27    Rebuilt CommState (variables/configuration matrix) for use with Aries Radio
  54. //          Added optional delay between TCPTM auto-centering and H4D/S3 remapping to reduce the likelihood of inadvertent commanding during an attempt to re-trim.
  55. //          Added axis offset option for analog microstick when using reverse throttle (currently applicable to Ka-50)
  56. //          Ka-50: Implemented Force Commstate Off option/routine
  57. //          Ka-50: Added Standby Attitude Indicator (SAI) controls to RMFD (ROSB5 and SYM) and remapped SAI/ADI/Aux Panel lights to RSYM Long.
  58. //          Mi-8/Ka-50: Revised UV-26 routine for Mi-8 and added RLED indicators for Mi-8 and Ka-50
  59. //          UH-1/Mi-8: Revised Hat1 searchlight slew routine and remapped microstick DX commands.
  60. //          Ka-50: Removed Overhead Panel snapview and remapped trim reset to S3+H4U (like other helos)
  61. //  1.28    Added F-86 and Fw-190D9
  62. //          Remapped profile swap MFD buttons and LED indications (LED indications are now binary corresponding with the MFD button)
  63. //          Remapped momentary Nosewheel steering from S1 to S3
  64. //  1.29    Added LMFD only option for Fw190 Gear/Flaps for realism (set Fw190_Gear_on_HOTAS = 0)
  65. //          Tied Digital Throttle sectors to ThrottleMin and IdleDetent values
  66. //          Added MiG-21
  67. //          Fixed padlock bug with non-TIR Hat1 (H/T cake_o_fruits)
  68. //          Fixed bug with Ka-50 Microstick Offset affecting XM60 control in the UH-1
  69. //          Changed Microstick_Offset to apply to all fixed wing aircraft and added Helo_Microstick_Offset for the reverse throttle
  70. //  1.30    Added Su-27 PFM specific enhancements to FC3 profile
  71. //  1.31    Changed User variable from TARS to Aries_Radio
  72. //          Changed TCPTM Rudder Trim variable from global to individual helicopters
  73. //          Mi-8:Updated Autopilot knob logic and reversed Microstick X polarity for searchlight
  74. //          Added Bf-109K-4 and Hawk (Hawk as part of Standard DX profile)
  75. //          Fixed init error when loading FC3 profile
  76. //  1.32    MiG-21: Added air start switch & Pitot Heat, moved Nosewheel Lock to RMFD, moved Master Arm and reorganized bottom RMFD.  Reversed orientation of Weapon Select (LSYM).
  77. //          MiG-21: Added MiG21_ButtonCap_Cycle() for T6 Short
  78. //          MiG-21: Added Weapons Select and AA/MM switches to H2L/R
  79. //          FC3: Fixed CommState bug with Aries Radio disabled (H/T taaaki)
  80. //          F-86: Added MFD functions, remapped HOTAS functions, converted 3 position switches to discrete macros (optional), and revised the engine start routine.
  81. //          F-86: Added NVG Compatibility and MFD commands (H/T Zaelu)
  82. //  1.33    Added option for S4 as modifier for Joy Y axis to act as an analog wheelbrake (H/T Scrim for the concept).
  83. //          NWS: Added option for analog brake (Joy Y axis) if NWS (S3) held.  Works in conjunction with optional Joy Y with S4 as modifier.
  84. //          Fixed S3_NWS() not resetting ANT rudder and microstick axes to absolute
  85. //          Updated DCS_Axis_Init() to work with single engine DX profile
  86. //          Added delay to throttle-based engine shutdown to prevent inadvertent shutdown (esp. when using S3 for NWS)
  87. //  1.34    Added MiG-15
  88. //          Revised CPTM_Trim() for Rudder Trim option in Ka-50 (DCS World 1.2.16u2)
  89. //          Added TARGET based Conventional Trim option and other customization to Standard DX Profile
  90. //  1.35    FC3: Fixed issue with DirectX PTT with CommState and Aries Radio disabled
  91. //          F-86: Added default Brake Out indication if GearState Down (for cold start)
  92. //          Added Left/Right axis only combined braking algorithm to DiffBraking() for Bf-109
  93. //          Ka-50: Added numeric keypad direct entry for PVI-800.  Updated Rotor Brake macro for 1.2.14+.
  94. //          Ka-50: Added ability to reset trim forward of default (i.e. Hover Trim)
  95. //          A-10C: Added direct entry for UFC without S3 (including numeric keypad).  Updated A-10C CDU Direct Entry mode to deconflict with TS3_DX PTT.
  96. //  1.36    FC3: Added flap array option (Flaps_Array_FC3) for Su-25 models so that cycling up/down will cycle through maneuvering flaps.  Also added LLED2 indications for flap position.
  97. //          FC3: Removed separate Su-27 Engine Start Delay (no longer a need).
  98. //          FC3: Added repeating command for weapons jettison and added fuel tank jettison to S3+LOSB18 short.
  99. //          FC3: Fixed issue with RLED1 not extinguishing after comm sw release (Aries option disabled)
  100. //          P-51/MiG-15: Deconflicted simultaneous use of analog brake and mic switch with MFD SYM Rocker functions.
  101. //          Ka-50: Remapped SAI knob and Wall Panel Cockpit Lighting on RSYM, mapped Hover mode to S4 (GSU) and Autopilot Disconnect to H4L/R Long exclusively.  Added optional CommState to PVI-800 Direct Entry.
  102. //
  103. //  1.50    Warthog initial conversion
  104. //          Added M-2000C
  105. //  1.51    Added SA342M Gazelle
  106. //          Fixed the Cougar ANT_ELEV knob not working if RudderPedals = 0.
  107. //  1.53    Changed profile selection routine
  108. //  1.54    Added L-39 Albatross
  109. //  1.56    Added audio clips for aircraft selection.
  110. //          Extended button press time for Aries/UniversRadio
  111. //          Updated M-2000C
  112. //  1.60    Removed extraneous arguments from FC3 and change FC3 custom luas to reflect only NVGs (now also applies to Su-25 and A-10A standalone modules)
  113. //  1.61    Increased audio use for aircraft selection
  114. //          SA342: Added SA342L
  115. //                 Fixed bug where momentary SnapView wouldn't clear the SnapView toggle
  116. //          A-10C: Fixed AAP Direct Entry Bug
  117. //          Su-25A/T: Fixed issue with gear/flaps not working with HOTAS Cougar
  118. //          M-2000C: Added mapping for new DCSW 1.5.4 commands
  119. //  1.62    Added Warthog Throttle LEDs and expanded Adjustable Backlighting to SA342, UH-1, M-2000C, Bf109, Fw190, and FC3.
  120. //          Streamlined and fixed digital throttle algorithms
  121. //  1.63    Added F-5E, and separate selectors for Hawk and C-101.
  122. //          Updated MiG-21 for use with toggle functions.
  123. //  1.64    Improved backlighting routine for non-backlit aircraft.
  124. //          SA342: Fully mapped MFDs and updated for Multicrew
  125. //          Added support for DCS SimpleRadio Standalone (Intercom in particular)
  126. //          Fixed bugs preventing selection of MiG-15 (Cougar/WH) and Hawk/C-101 (Cougar)
  127. //  1.65    M-2000C: Added INS PCN Direct Entry
  128. //          Fixed Cougar CommState bug
  129. //  1.66    Disabled flap state LED indications for stability
  130. //          M-2000C: Added PCA Select to throttle
  131. //                   Updated INS functionality
  132. //          A-10C: Fixed bug with mic switch remaining in keystroke mode after releasing from Direct Entry view
  133. //          Added Spitfire LF Mk.IX
  134. //          Global: changed all 2*KBPress increments in middle switch TEMPOs to DoubleTap
  135. //          FC3: Improved Autopilot for Warthog Users and added Su-25 Nav Light routine
  136. //          MiG-21: Minor Cougar improvements.
  137. //          Miscellaneous bug fixes
  138. //  1.67    Added AJS-37 Viggen
  139. //  1.68    Refined throttle curves for afterburning aircraft with afterburner detent enabled (H/T MTFDarkEagle)
  140. //          Added VR framework to Hat1
  141. //          AJS-37: Fixed gear transition bug
  142. //          F-5E:   Fixed issue with persistent alt key when EOxMOTOR switches engaged.
  143. //                  Corrected orientation of jettison switch (AP switch on WH Throttle Base)
  144. //          A-10C:  Added LED indicators for Warthog Throttle
  145. //  1.69    Added discrete Hawk T.1A profile (WIP)
  146. //          AJS-37: Added mappings for use with funkyfranky's switch mod
  147. //          F-86:   Remapped Warthog China Hat from rocket depression angle to rocket salvo select
  148. //          Mi-8:   Added Gunner AI to LMFD
  149. //          SA342:  Assigned optional discrete state buttons for the autopilot channels and master switch.  Remapped H4R/L to Autopilot mode for Cougar users.
  150. //  1.70    AJS-37: Updated mapping for DCSW 1.5.7
  151. //  1.71    AJS-37: Added Data Cartridge selection functionality
  152. //                  Updated controls to latest lua file (1.5.7)
  153. //          Mi-8:   Major profile update
  154. //          M2000C: Revision of master arm controls and Warthog throttle base.
  155. //          Ka-50:  Updated Throttle to match Mi-8 configuration (Warthog Only)
  156. //  1.72    Added separate Su-33, updated Su-27
  157. //
  158. //
  159. //========================================================================
  160.  
  161.  
  162. int MajorVersion = 1;
  163. int MinorVersion = 72;
  164.  
  165. int Script_Debug = 0;
  166.  
  167. //------------------------------------------------------------------------------------
  168. //  If you're not a programmer, skip down to the Default Initial Configuration heading
  169. //------------------------------------------------------------------------------------
  170. include "target.tmh"           
  171. include "Common/util_usb.tmh"       //header by ivanwfr that adds better aliases for USB keystrokes
  172. include "Common/MFD_Lights.tmc"     //functions that use lower level LED calls than ActKey
  173. include "Common/WH_Lights.tmc"      //functions that use lower level LED calls than ActKey
  174.  
  175. //Include DCS Specific Files
  176. include "DCS/DCS World.ttm"         //macro file
  177. include "DCS_UserSettings.ttm"      //User customizable macro file
  178. include "DCS/DCS_SelMod.tmc"
  179. include "DCS/DCS_Init.tmc"
  180. include "DCS/DCS_Global_Subs.tmc"
  181. include "DCS/CommState.tmc"
  182. include "DCS/CommState_WH.tmc"      //separate file so that the two can be compared side by side.
  183.  
  184.  
  185. //Include should show all modules available for this profile.
  186. //Don't REM these out if you don't have the module; just set the appropriate value to 0 in the Profile Personalization section of this file.
  187. include "DCS/Modules/DCS_DX.tmc"
  188. include "DCS/Modules/DCS_FC3.tmc"
  189. include "DCS/Modules/DCS_A10C.tmc"
  190. include "DCS/Modules/DCS_BS2.tmc"
  191. include "DCS/Modules/DCS_P51D.tmc"
  192. include "DCS/Modules/DCS_UH1.tmc"
  193. include "DCS/Modules/DCS_MI8.tmc"
  194. include "DCS/Modules/DCS_F86.tmc"
  195. include "DCS/Modules/DCS_Fw190.tmc"
  196. include "DCS/Modules/DCS_MiG21.tmc"
  197. include "DCS/Modules/DCS_Bf109.tmc"
  198. include "DCS/Modules/DCS_MiG15.tmc"
  199. include "DCS/Modules/DCS_L39.tmc"
  200. include "DCS/Modules/DCS_M2000C.tmc"
  201. include "DCS/Modules/DCS_SA342.tmc"
  202. include "DCS/Modules/DCS_F5E.tmc"
  203. include "DCS/Modules/DCS_Spitfire.tmc"
  204. include "DCS/Modules/DCS_AJS37.tmc"
  205. include "DCS/Modules/DCS_Hawk.tmc"
  206.  
  207. //define X40 50 //assigns "button 50" when used with EVH to activate shifted state  Removed in 0.30
  208. int Init_Run;       //set to 1 for first run of profile; 0 for hot loads.
  209.  
  210. //Identify 3rd party communications software (TS3 assumed)
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217. //=========================================
  218. //      Default Initial Configuration
  219. //=========================================
  220.  
  221. //Absolute Script Path
  222. alias ScriptPath = "C:\\Benutzer\\ironb\\Documente\\HOTAS\\";  //   Set to path you have this file extracted to.  This is important for use of audio files with aircraft selection.
  223.                                                 //  Note the two backslashes for the path.
  224. int   PathLength = 80   ;                       //  Increase this if ScriptPath is more than 80 characters.  Necessary for sizing buffer.                                              
  225.  
  226. //Selection Options
  227. int Acft_Sel_Skip_Mult  =   5   ;               //  Selects the number of aircraft skipped when using BRT or CON for cycling through module selection.  Default is 5, but can be increased when a lot more modules are released.
  228. int LED_Enable_on_Cycle =   1   ;               //  Enables LED when using the rocker switches to go between aircraft.  Set to 0 if you cycle through so quickly that the LEDs don't keep up.  Default is 1.
  229. int Speech_on_Cycle     =   1   ;               //  Plays an audio file when a new plane is selected.  Useful for fullscreen users.  Set 0 to disable.  Default 1.
  230.                                                 //  Important: ScriptPath must be filled out properly for this to work!
  231.  
  232. //  Modules Installed (set 1 if you have these modules installed in DCS World, 0 if not installed)
  233. int     FC3_Installed   =   1   ;               //  Flaming Cliffs 3 (full module)
  234. int     A10A_Installed  =   0   ;               //  A-10A Warthog standalone module
  235. int     F15C_Installed  =   0   ;               //  F-15C Eagle standalone module
  236. int     Su27_Installed  =   0   ;               //  Su-27 Flanker standalone module
  237. int     Su33_Installed  =   0   ;               //  Su-33 Flanker standalone module
  238. //      Su-25 enabled by default
  239.  
  240. //Red Helicopters
  241. int Mi8_Installed       =   1   ;               //  Mi-8MTV2 Hip
  242. int Ka50_Installed      =   1   ;               //  Ka-50 Black Shark
  243.  
  244. //Blue Helicpoters
  245. int UH1_Installed       =   1   ;               //  UH-1H Huey
  246. int SA342_Installed     =   0   ;               //  SA342M Gazelle
  247.  
  248. //Red Jets
  249. int MiG15_Installed     =   0   ;               //  MiG-15bis Fagot
  250. int MiG21_Installed     =   0   ;               //  MiG-21bis Fishbed N
  251. int L39_Installed       =   0   ;               //  L-39 Albatross
  252.  
  253. //Blue Jets
  254. int F5E_Installed       =   0   ;               //  F-5E Tiger II
  255. int A10C_Installed      =   1   ;               //  A-10C Warthog
  256. int F86_Installed       =   0   ;               //  F-86F Sabre
  257. int C101_Installed      =   0   ;               //  C-101 Aviojet.  Leave at 0 and select DX profile.
  258. int Hawk_Installed      =   0   ;               //  Hawk T.1A.     
  259. int M2000C_Installed    =   0   ;               //  Mirage 2000C
  260. int AJS37_Installed     =   0   ;               //  AJS-37 Viggen
  261.  
  262. //Red Warbirds/Props
  263. int Bf109_Installed     =   0   ;               //  Bf-109K-4 Kurfürst
  264. int Fw190_Installed     =   0   ;               //  Fw-190D9 Dora
  265.  
  266. //Blue Warbirds/Props
  267. //  P-51D enabled by default
  268. int SpitLFIX_Installed  =   0   ;               //  Spitfire LF Mk.IXc
  269.  
  270.  
  271. //  This routine chooses your default initial configuration.  Enable your chosen module and communications software as default.
  272. //  Defaults to DCS_DX_Init for a "generic" DirectX profile..  If you wish to change this, you need to disable the active routines and then apply the routine of your choice.
  273.  
  274. int HOTAS_Cougar_Button_Init() 
  275. {
  276. //-----------------------
  277. //Default Menu Selections
  278. //-----------------------
  279.  
  280. //  Choose one module from each category and remove the two leading forward slashes.  This will be where the selection routine begins.
  281. //  Leaving a category unselected will default to the DCS_DX profile for that category.
  282.  
  283. //Red Helicopters (Select One)
  284.  
  285. //  SetMenu_Mi8()       ;   //  Enable to apply Mi-8MTV2 profile as default.
  286.     SetMenu_Ka50()      ;   //  Enable to apply the Ka-50 Black Shark profile as default.
  287.  
  288. //Blue Helicopters (Select One)
  289.  
  290.     SetMenu_UH1()       ;       //  Enable to apply UH-1 Huey profile as default.
  291. //  SetMenu_SA342L()        ;   //  Enable to apply SA342M Gazelle as default.
  292. //  SetMenu_SA342M()        ;   //  Enable to apply SA342M Gazelle as default.
  293.  
  294. //Red Jets (Select One)
  295.  
  296. //  SetMenu_MiG15()     ;   //  Enable to apply MiG-15bis Fagot as default.
  297. //  SetMenu_MiG21()     ;   //  Enable to apply MiG-21bis Fishbed N profile as default.
  298. //  SetMenu_Su25()      ;   //  Enable to apply the Su-25A/T Frogfoot (FC3) profile as default.
  299. //  SetMenu_Su27()      ;   //  Enable to apply the Su-27 Flanker (FC3) profile as default.
  300.     SetMenu_Su33()      ;   //  Enable to apply the Su-33 Flanker (FC3) profile as default.
  301. //  SetMenu_MiG29()     ;   //  Enable to apply the MiG-29A/C/G Fulcrum (FC3) profile as default.
  302. //  SetMenu_L39C()      ;   //  Enable to apply L-39C Albatross as default.
  303. //  SetMenu_L39ZA()     ;   //  Enable to apply L-39ZA Albatross as default.
  304.  
  305. //Blue Jets (Select One)
  306.  
  307. //  SetMenu_F5E()       ;   //  Enable to apply F-5E Tiger II profile as default.
  308. //  SetMenu_A10A()      ;   //  Enable to apply A-10A Warthog (FC3) profile as default.
  309.     SetMenu_A10C()      ;   //  Enable to apply A-10C Warthog profile as default.
  310. //  SetMenu_F15C()      ;   //  Enable to apply F-15C Eagle (FC3) profile as default.
  311. //  SetMenu_F86()       ;   //  Enable to apply F-86F Sabre profile as default.
  312. //  SetMenu_C101()      ;   //  Enable to apply C-101 Aviojet (DX) profile as default.
  313. //  SetMenu_Hawk()      ;   //  Enable to apply Hawk T.1A profile as default.
  314. //  SetMenu_M2000C()    ;   //  Enable to apply Mirage 2000C as default.
  315. //  SetMenu_AJS37()     ;   //  Enable to apply AJS-37 Viggen as default.
  316.  
  317. //Red Warbirds/Props (Select One)
  318.  
  319. //  SetMenu_Bf109()     ;   //  Enable to apply Bf-109K-4 Kurfurst profile as default.
  320. //  SetMenu_Fw190()     ;   //  Enable to apply Fw-190D9 Dora profile as default.
  321.  
  322. //Blue Warbirds/Props (Select One)
  323.  
  324. //  SetMenu_P51D()      ;   //  Enable to apply P-51D Musting profile as default.
  325. //  SetMenu_SpitLFIX()  ;   //  Enable to apply Spitfire LF Mk.IX profile as default.
  326.  
  327.  
  328.  
  329. //---------------------
  330. //Select Default Module
  331. //---------------------
  332.  
  333. //  Choose your desired start aircraft, and disable other routines by preceeding the line with "//",
  334. //  Your choice should be the platform you fly most.  
  335. //  Note: This selection does not need to match one of the above menu selections, but will overwrite the applicable default menu selection if different.
  336.  
  337. //  DCS_DX_Init()       ;   //  Enable this for regular DirectX profile as default.  This profile has minor improvements to a standard DX mapping.
  338.  
  339. //  DCS_MI8_Init()      ;   //  Enable to apply Mi-8MTV2 profile as default.
  340. //  DCS_Ka50_Init()     ;   //  Enable to apply the Ka-50 Black Shark profile as default.
  341.  
  342. //  DCS_UH1_Init()      ;   //  Enable to apply UH-1 Huey profile as default.
  343. //  DCS_SA342L_Init()   ;   //  Enable to apply SA342L/Mistral Gazelle as default.
  344. //  DCS_SA342M_Init()   ;   //  Enable to apply SA342M Gazelle as default.
  345.  
  346. //  DCS_MiG15_Init()    ;   //  Enable to apply MiG-15bis Fagot as default.
  347. //  DCS_MiG21_Init()    ;   //  Enable to apply MiG-21bis Fishbed N profile as default.
  348. //  DCS_Su25_Init()     ;   //  Enable to apply the Su-25A/T Frogfoot (FC3) profile as default.
  349. //  DCS_Su27_Init()     ;   //  Enable to apply the Su-27 Flanker (FC3) profile as default.
  350. //  DCS_Su33_Init()     ;   //  Enable to apply the Su-33 Flanker (FC3) profile as default.
  351. //  DCS_MiG29_Init()    ;   //  Enable to apply the MiG-29A/C/G Fulcrum (FC3) profile as default.
  352. //  DCS_L39C_Init()     ;   //  Enable to apply L-39C Albatross as default.
  353. //  DCS_L39ZA_Init()    ;   //  Enable to apply L-39ZA Albatross as default.
  354.  
  355. //  DCS_F5E_Init()      ;   //  Enable to apply F-5E Tiger II profile as default
  356. //  DCS_A10A_Init()     ;   //  Enable to apply A-10A Warthog (FC3) profile as default.
  357.     DCS_A10C_Init()     ;   //  Enable to apply A-10C Warthog profile as default.
  358. //  DCS_F15C_Init()     ;   //  Enable to apply F-15C Eagle (FC3) profile as default.
  359. //  DCS_F86_Init()      ;   //  Enable to apply F-86F Sabre profile as default.
  360. //  DCS_C101_Init()     ;   //  Enable to apply C-101 Aviojet (DX) profile as default.
  361. //  DCS_Hawk_Init()     ;   //  Enable to apply Hawk T.1A profile as default.
  362. //  DCS_M2000C_Init()   ;   //  Enable to apply Mirage 2000C as default.
  363. //  DCS_AJS37_Init()    ;   //  Enable to apply AJS-37 Viggen as default
  364.  
  365. //  DCS_Bf109_Init()    ;   //  Enable to apply Bf-109K-4 Kurfurst profile as default.
  366. //  DCS_Fw190_Init()    ;   //  Enable to apply Fw-190D9 Dora profile as default.
  367.  
  368. //  DCS_P51D_Init()     ;   //  Enable to apply P-51D Musting profile as default.
  369. //  DCS_SpitLFIX_Init() ;   //  Enable to apply Spitfire LF Mk.IX profile as default.
  370.  
  371.  
  372. //---------------------
  373. //  End Default Modules
  374. //---------------------
  375. }
  376.  
  377.  
  378. //----------------------------------
  379. //      Script Personalization
  380. //----------------------------------
  381.  
  382. //  This is where you will personalize this profile to your needs and configuration.  Be sure to read each option carefully.
  383. //  Consult the included Installation Guide for more information on each option.
  384.  
  385. //  NOTE: REMEMBER TO SAVE/BACK-UP THESE SETTINGS BEFORE UPGRADING TO A NEW VERSION OF THIS SCRIPT
  386.  
  387.  
  388. //  Hardware Configuration
  389. int WarthogStick            =   1       ;       //  Set to 1 if you use the Warthog Stick, 0 for HOTAS Cougar.
  390. int WarthogThrottle         =   1       ;       //  Set to 1 if you use the Warthog Throttle, 0 for HOTAS Cougar.  For module dependent throttle selection, set value to 2 (not yet implemented).
  391. int RudderPedals            =   1       ;       //  Set to 1 if you have gameport rudder pedals attached to your Cougar, 0 if you use USB rudder pedals (including the Thrustmaster TFRP).
  392.                                                 //  Set to 2 if you don't have rudder pedals and you wish to use the ANT knob for rudder while the gear is down.
  393. int     RevANTRudder        =   0       ;       //  Set to 1 to reverse the ANT Axis in TARGET when used as rudder, or 0 for straight mapping.  Default = 1.
  394.                                                 //  Only applies if RudderPedals = 2
  395. //Braking Options                                              
  396. int DiffBraking_Enabled     =   3       ;       //  Set to 0 for full brakes when pressing S4
  397.                                                 //  Set to 1 to use rudder or ANT with S4 for differential braking.
  398.                                                 //  Set to 2 to use JoyXY with S4 held to do analog braking (X for differential, Y for full braking if RudderPedals=0, otherwise JoyY for analog differential braking).
  399.                                                 //  Set to 3 if using Cougar Rudders with Toe brakes assigned to Cougar stick XY axes.  Enables toe brakes on some aircraft.  Use only with WarthogStick = 1.
  400.  
  401. //      These settings (except for AnalogPaddleBrake and AnalogBrake_Helo) are overridden if DiffBraking_Enabled = 3.
  402. int     JoyYParkingBrake    =   0       ;       //  If enabled, holding Joy Y all the way back and releasing S4 will set the parking brake (or lock the axis in place if no parking brake command).  S4+JoyY to release.
  403. int     NWSwithBrake        =   0       ;       //  Enable if you like to use S4+JoyY for Nosewheel steering as an analog brake with Rudders for Differential Braking.  DiffBraking_Enabled must be 2.  Default is 0.
  404. int     AnalogPaddleBrake   =   0       ;       //  Enable if you wish to use S4+JoyY as an analog brake with paddle-based braking systems on fixed wing aircraft like the MiG-21. Does not apply to helicopters.  Overrides DiffBraking_Enabled.  Default is 0.
  405. int     AnalogBrake_Helo    =   0       ;       //  Enable if you wish to use S4+JoyY as analog brake with helicopters like the Ka-50.  Overrides DiffBraking_Enabled.  Default is 0.
  406. int     AnalogBrake_Warbird =   0       ;       //  Enable if you wish to use S4+JoyXY as analog brake with warbirds, or any aircraft where you may choose a FFB stick in conjunction with the TARGET profile).  Set to 0 if you use FFB or another stick.  Default is 1.
  407.                                                 //  In the event a Warbird is released with a paddle brake (e.g Spitfire), this value will override AnalogPaddleBrake if set to 0.
  408.                                                 //  Note: unlike NWS, PaddleBrake, or Helo, Warbird value will not override the DiffBraking_Enabled setting if DiffBraking_Enabled < 2, so there is no harm leaving it at 1 if you don't have DiffBrakes=2.
  409. //TrackIR
  410. int TrackIR                 =   1       ;       //  Set to 1 if you are using TrackIR (or other head-tracking gear), and it will default Hat1 to Trim and provide shifted rudder trim and more padlock options.
  411.                                                 //  Set to 2 if you are using a VR solution.  This will set the hat to trim and mouse functions based on VRTrimDefault setting (below).
  412.                                                 //  Set to 0 if no head-tracking gear, and Hat1 defaults to POV with shifted trim+padlock functions.
  413. int     PadlockEnabled      =   1       ;       //  1 Enables padlock views for TrackIR users.  Non-TrackIR users always get padlock by default.  TrackIR users with 0 selected will still get missile padlock.
  414. int     PauseTIRGunner      =   300     ;       //  A value > 0 pauses TrackIR when switching to door gunner (UH-1) so you can use the mouse for tracking targets (Call of Duty style), and restores TIR when returing to a Pilot view.
  415.                                                 //  The value is the default delay to toggle TrackIR Pause, allowing for the position to change in DCS before adding the Shift and Ctrl modifiers (CTL+SHF+F9). Default is 300.            
  416.                                                 //  Set to 0 if you dont want to pause TrackIR when going to a gunner station.
  417. int     VRTrimDefault       =   0       ;       //  If TrackIR = 2, setting this to 1 will default the hat to trim and shifted hat for mouse buttons/wheel.  0 defaults hat to mouse and shifted trim.
  418.  
  419. //Both Throttle Types
  420. int Helo_Throttle_Rev       =   0       ;       //  Set to 1 to reverses Throttle axis to act as collective in helicopters (aft is raising).  0 acts as regular "throttle".  Default is 1.
  421.  
  422. //Cougar Throttle
  423. int ThrottleMax             =   100     ;       //  Maximum range of throttle in percent.  Nominally 100 but can be adjusted for inconsistent potentiometers.
  424. int ThrottleMin             =   0       ;       //  Minimum range of throttle in percent.  Nominally 0 but can be adjusted for inconsistent potentiometers.                    
  425. int IdleDetentHigh          =   15      ;       //  Percentage of Cougar throttle axis when resting at idle detent from above.  Does not apply to Warthog throttle.                                    
  426. int IdleDetentLow           =   7       ;       //  Percentage of Cougar throttle axis when pushing against idle detent from behind. Positive nonzero value will allow engine start routine at idle.  
  427.                                                 //  Set IdleDetentLow to 0 to disable engine start routines using idle and to use full range of throttle.
  428. int ThrottleShutdownDelay   =   2000    ;       //  Delay between when Cougar throttle is set aft of idle and when the shutdown process actually begins.  Prevents inadvertent shutdown, esp. when using NWS in F-15/F-86.
  429. int Microstick_Offset       =   0       ;       //  Amount of offset in degrees for the Cougar Microstick X/Y axes.  Positive for clockwise, negative for counterclockwise.  Separate from Helo_Microstick_Offset used only with Helo_Throttle_Rev.
  430. int Helo_Microstick_Offset  =   -45     ;       //  Re-orients the Cougar microstick orientation for more natural movement when the reverse throttle as collective is used.  Negative values are counterclockwise.  Default is -45.
  431.                                                 //  Note: this has no effect on digital microstick axes.
  432. //Warthog Throttle
  433. int WH_AB_Detent_Enabled        =   0   ;       //  Set 1 if Afterburner detent is in place in the Warthog Throttle.  If selected, will limit throttle range aft of detent for non-afterburning aircraft and helicopters.
  434. int     WH_AB_DetentLow_R       =   65  ;       //  Point on RIGHT throttle at which Afterburner detent physically restrains travel.  Likely between points, so use low/high to bound
  435. int     WH_AB_DetentHigh_R      =   66  ;       //  Default 65 (low) 66 (high) 
  436. int     WH_AB_DetentLow_L       =   65  ;       //  Point on LEFT throttle at which Afterburner detent physically restrains travel.   Likely between points, so use low/high to bound
  437. int     WH_AB_DetentHigh_L      =   66  ;       //  Default 65 (low) 66 (high) 
  438.  
  439. //TARGET Central Position Trimmer Mode          ********If TARGET Central Position Trimmer Mode enabled here, be sure to disable Central Position Trimmer Mode in DCS World Options Menu.********
  440. int CenterPositTrimmer      =   50      ;       //  Allows TARGET based Central Position Trimmer Mode (TCPTM) for helicopters.  Positive value is polling time in ms for neutral retrimming; set 0 to disable.
  441.                                                 //  As of 1.35 also applies to Left/Right Brake polling of Y axis as required.
  442. int     CenterPositTempo    =   500     ;       //  Default TEMPO value (TEMPO short will be standard trimmer for minor changes, long for TCPTM)
  443. int     CenterPositRelTempo =   300     ;       //  TEMPO above which H4D will enter recentering trim mode.  Short will be H4D standard function.  Set to 0 to disable unshifted H4D function altogether.
  444. int     CenterPositZone     =   2000    ;       //  "Dead Zone" for CPTM recentering.  Value between 0 and 32768 (lower is smaller dead zone).
  445. int     CenterPositMapDelay =   500     ;       //  Delay in ms between when stick is centered (trim zeroed) and H4D/S3 are remapped to standard functions (minimizes false activity)
  446.  
  447. int AirBrkFlash             =   1       ;       //  1 sets airbrake routine to flashing light when airbrake is engaged.  0 is a steady light for on, no light for off
  448.                                                 //  Set to 1 for more "dramatic" air brake, or 0 if having hardware trouble with the Left MFD.
  449.                                                 //  Also applies to landing gear transition.
  450.                                                 //  Note: this is automatically set to to 0 if RudderPedals = 2
  451.  
  452. //  Software Configuration
  453.  
  454. //      Custom_Master_LUAs                      //For each module, set to 1 if you use included custom "master LUA files", otherwise set to 0.
  455. int     Custom_Master_LUA_FC3   =   1   ;       //For NVGs in Su-25T, Su-25, A-10A (also applies to Su-25T and A-10A/Su-25 standalone modules)
  456. int     Custom_Master_LUA_UH1   =   1   ;       //For UH-1H Huey
  457. int     Custom_Master_LUA_F86   =   0   ;       //Add if NVG mod (including the custom LUA file) is enabled (H/T Zaelu)
  458. int     Custom_Master_LUA_AJS37 =   0   ;       //For FunkyFranky's AJS-37 Additional keys
  459.  
  460. //  Enables 3rd party communications package of choice.
  461. //  Set VAC and TS3_Radio to 0 for standard TS3 (DX21 PTT, DX20 Comm menu).  Allows for DX22,DX23 to act as DX21 in A-10C comm menu
  462. int VAC                         =   0   ;       //  VAC enables the middle mouse button (default VAC activation) in shifted modes.  Not compatible with TS3_Radio.
  463.                                    
  464. int TS3_Radio                   =   1   ;       //  Set to 3 for SimpleRadio Standalone, 2 for UniversRadio, or 1 for Aries Radio/TARS.  Sets CommState to T5 in A-10C and leaves other switches as DX default for radio based PTT.
  465. int     TS3_Radio_PTT_Common    =   1   ;       //  Set to 1 if you have PTT Common set in Aries Radio/SimpleRadio or if you use it that way with UniversRadio.  Required for Ka-50, TF-51, and Mi-8 with Aries Radio.  Leave at 0 for TARS.
  466. int     TS3_ExtRadio_Keys       =   1   ;       //  Set to 1 if you wish to use Aries/UniversRadio Hotkeys (mainly UR) in external radio modules (e.g. FC3) when comm/mic switch is shifted.  Default is 1.
  467. int TS3_DX                      =   1   ;       //  If 1, Commswitch Up maps to DX21, otherwise Scroll Lock to avoid possible TS3 PTT loss on profile exit
  468.                                                 //  1 recommended for active use with TARS/Aries.  If 0, must select "Radio Keyboard Command for Clickable Cockpit" in Aries Radio.
  469.  
  470. //  Communications Routine Options                             
  471. int     CommStateAllow          =   1   ;       //  Allows CommState.  CommState will assign Hats 2-4 as F1-F12 for quick comm menu inputs while the module's comm switch is pressed or toggled on.
  472.                                                 //  Note: Comm menu will display even if just using TeamSpeak for VoIP to prevent inadvertent view changes by pressing a hat switch.
  473.                                                 //  If you wish to just use the keyboard for your communications menu, set to 0.
  474. int     PositionSwitchComms     =   1   ;       //  For helicopters and multi-crew aircraft.
  475.                                                 //  If enabled, changing to copilot station will enable copilot comms options, and pilot will engage pilot comm options.  Gunner station will generate generic comms.
  476.                                                 //  If disabled, all comm stations will be pilot only.
  477.  
  478.  
  479. //Timing Values
  480. //  Keypress Values                             //  The next three values (in ms) should be as small as possible while still providing consistent response in DCS World.  Only change if you need to.
  481. int     KBPress         =   50      ;           //  length of keyboard press of a key on PULSE.  First argument in SetKBRate().
  482. int     KBDelay         =   60      ;           //  length of delay between keyboard presses.  Second argument in SetKBRate().  Should be larger than KBpress.
  483. int     ModDelay        =   10      ;           //  Default delay between modifier and active key
  484. int     LED_Delay       =   50      ;           //  Delay in ms between activating/deactivating LEDs (preventing simultaneous use and poss. profile crash).
  485. int     XYAxisTrim_Rate =   100     ;           //  REXEC polling interval in ms for TARGET based fixed wing trimming.  Smaller value means higher rate of polling.  If you adjust this, be sure to adjust JoyXTrim_DX and JoyYTrim_DX.
  486. int     VRMouseWheelRate=   100     ;           //  REXEC polling interval in ms for VR Mouse Scroll Wheel function.
  487.  
  488. //  Global Profile Values
  489. int     DefTempo        =   500     ;           //  Set time (in milliseconds) for default TEMPO delay.  Default is 500.
  490. int     ModTempo        =   300     ;           //  Set time (in milliseconds) to differentiate between "quick-tapping" S3 for DX3 (i.e. Laser Arm) and holding it for DX30 modifier.
  491.                                                 //  S3 Always uses DX30 modifier in DCS, only uses DX3 if below threshold.
  492.                                                 //  Note: this value is often used in TEMPO commands as well, superseding the default 500ms.
  493.  
  494. int     DoubleTap       =   350     ;           //  Time (in ms) within which a button can be "double clicked".  Defaults to 0.35s.
  495.                                                 //  Any second click outside this time window will be treated as a "single click".
  496.  
  497. int     LongTempo       =   800     ;           //  Set time (in ms) for long tempo where "safety" is not an issue, but where a discrete delay should exceed 500ms.
  498.  
  499. int     SwapTempo       =   2000    ;           //  Time (in ms) to hold Shift+R/LOSB1-5 to enable switching aircraft profiles.
  500.                                                 //  Defaults to 2 seconds to prevent inadvertent swapping.
  501.  
  502. int     GearUpTempo     =   500     ;           //  Time (in ms) to hold key before gear retracts.  Releasing the Gear/Flaps Up key short of this value will retract flaps instead.  
  503. int     GearDnTempo     =   1000    ;           //  Time (in ms) to hold key before gear deploys.  Releasing the Gear/Flaps Down key short of this value will extend flaps instead.
  504.        
  505. int     TG1Zoom         =   700     ;           //  When TG1 pulled, will zoom to HUD for time TG1Zoom, and maintain zoom for duration of trigger pull, then revert to previous view.  Will not zoom if shifted.
  506.                                                 //  If set to 0, will disable routine.  Inspired by PeterP and uses code by ivanwfr.
  507. int         TG1ZoomPoll =   50      ;           //  Polling Interval for TriggerZoom.  Lower values give more accurate results at cost of performance.  Default is 50ms.
  508. int         TG1ZoomOutDelay = 1500  ;           //  Delay between release of TG1 and the zoom out of the profile.  Prevents the profile getting stuck with repeated TG1 presses.
  509. int     Switch_Delay    =   200     ;           //  Delay in ms between cycling individual switches on the A-10C CMSP (S3+ROSB5), Mi-8 Circuit Breakers (ROSB1) and other macros.  Default 200; set to at least 2*KBDelay.
  510.  
  511.  
  512. //Aircraft Profile Options
  513. //  FC3 Profile Options
  514. int     Eng_Start_FC3           =   10000   ;   //  Delay in ms between starting engines in FC3 profile (exception: A-10A).  Can set to 0 to disable or 1 for simultaneous start.
  515. int     Eng_Start_A10A          =   60000   ;   //  Same as above but specific to the A-10A (required for longer start sequence).    Can set to 0 to disable or 1 for simultaneous start (not recommended).
  516. int     Eng_Stop_FC3            =   5000    ;   //  Delay in ms between shutting down engines in FC3 profile.  Can set to 0 to disable or 1 for simultaneous stop.
  517. int     Starter_Ind_FC3         =   35000   ;   //  Amount of time each RMFD LED will illuminate representing the starter for each engine.
  518. int     Gear_Transit_FC3        =   3000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  519. int     Airbrake_In_FC3         =   1500    ;   //  Amount of time in ms for airbrake to be fully retracted.  Must be multiple of 500.
  520. int     Airbrake_Out_FC3        =   500     ;   //  Amount of time in ms for airbrake to be fully extended.  Must be multiple of 500.  Set low for binary brake type.
  521. int     Airbrake_In_F15C        =   5000    ;   //  Amount of time in ms for analog (F-15C) airbrake to be fully retracted.  Must be multiple of 500.
  522. int     Airbrake_Out_F15C       =   2000    ;   //  Amount of time in ms for analog (F-15C) airbrake to be fully extended.  Must be multiple of 500.
  523. int     Airbrake_Def_FC3_Ru     =   0       ;   //  Set 1 for "binary discrete" airbrake (T9 for on, T10 for off), or 0 for "binary" airbrake (hold for on, release for off)
  524. int     Airbrake_Def_A10A       =   1       ;   //  Set 1 for "binary discrete" airbrake (T9 for on, T10 for off), or 0 for "binary" airbrake (hold for on, release for off)
  525. int     Adjust_Backlight_FC3    =   0       ;   //  Allows adjustable backlighting on MFDs and Warthog Throttle for the FC3 aircraft (Warthog Throttle Only).
  526. int     DragChuteLEDTime        =   10000   ;   //  Amount of time in ms the Drogue Chute will indicate deployed (RLED2) unless toggled again by drogue chute command.
  527.                                                 //  Set to 0 to disable LED indication.
  528.                                                
  529. //Red Helicopters                                              
  530. int     RuH_WH_Throttle_Discrete=   1       ;   //  If 1, Pinky switch discretely determines throttle position (back for up, down for idle, center for  auto) and individual throttles based on Flap swith position.  0 uses a repeating command to modify selected throttle when switch out of center.
  531. int         RuH_WH_Throttle_Delay=  1000    ;   //  Delay in ms between cycling throttle settings while Pinky switch is forward or aft.  Should be at least 500 and must be an even number.  Only works if Mi8_WH_Throttle_Discrete = 0.   Default is 1000 (1s)
  532. //  Mi-8 Profile Options
  533. //  Note: Mi-8 uses UH-1 Communications Options
  534. int     Mi8_AP_MFD_Context      =   1       ;   //  If enabled, allows RMFD BRT/CON rockers to default to heading/altitude if mode is enabled, otherwise pitch/roll.  0 defaults pitch/roll always
  535. int     Mi8_AP_MFD_LED          =   1000    ;   //  If > 0, will light RLED 1/2 for heading/alt mode for alloted time, will flash when disabling.  Should be multiple of 500ms.
  536. int     UV26_LED_Duration       =   600     ;   //  if > 0, will light RLED 1/2 for UV-26 side selection for the alloted time.  Should be a multiple of Switch_Delay (def 200ms).  Default is 600ms.
  537. int     CenterPositRudder_Mi8   =   0       ;   //  If 1, TCPTM also trims Mi-8 rudder.  Rudder Trim must also be enabled for Mi-8 in DCS Options for this to work.                                            
  538. //  Ka-50 Profile Options
  539. int     Starter_Ind_BS2         =   40000   ;   //  Amount of time in ms Dogfight Switch will be available to move Fuel Cut-off Valves after holding T6 for engine start.  Also time of RMFD LED1 illumination.  Set to 0 to disable feature.
  540. int     Gear_Deploy_BS2         =   7000    ;   //  Deployment time in ms for landing gear.  Must be multiple of 500.
  541. int     Gear_Retract_BS2        =   10000   ;   //  Retraction time in ms for landing gear.  Must be multiple of 500.
  542. int     BS2_DiscreteCommState   =   0       ;   //  If enabled, will do S3+S2 TEMPO Long for activate, Short for deactivate.  Otherwise S3+S2 Short will toggle (TEMPO long to force off if profile fail).  Default 0.
  543. int     BS2_ForceCommStateOff   =   1       ;   //  If enabled, use of TS3 PTT (S2 long) will also force cancel CommState.  0 makes CommState a strict S2 short toggle.  Default 1.
  544. int     BS2_PVI_CommState       =   1       ;   //  If enabled, will enable CommState when SnapView 4 (PVI-800 Direct Entry) is displayed.  Useful with inputting coordinates with JTAC mod; releasing snapview should release commstate.  Default 0.
  545. int     BS2_RotorBrake_Default  =   1       ;   //  Determines whether rotor brake should default to engaged (1) or disengaged (0) at mission start.  Profile state only for discrete command during engine start.  Set 1 for cold starts, 0 for warm or air starts.  Default 1.
  546. int     CenterPositRudder_BS2   =   0       ;   //  If 1, TCPTM also trims Ka-50 rudder.  Rudder Trim must also be enabled for Ka-50 in DCS Options for this to work.
  547. int     BS2_Trim_Neutral_Offset =   234     ;   //  Since Ka-50 trim reset puts the rotor aft of in-flight neutral, this allows a trim reset + forward offset for a true hover neutral value.  Value is 0 (disabled) to 2048 (full deflection). Default is 234.
  548.  
  549. //Blue Helicopters
  550. //  UH-1H Profile Options
  551. int     Starter_Ind_UH1         =   40000   ;   //  Amount of time RMFD LED1 will illuminate representing the maximum starter time for the UH-1.  Default is 40s.  Set to 0 to disable feature.
  552. int     UH1_XM60_Track          =   1       ;   //  Allows UH1 profile to track position of XM60 Pilot Sight to determine default function of LMFD SYM.
  553.                                                 //  If enabled, will assign LMFD SYM to either ADF or XM60 pilot sight intensity depending on XM60 deployment state.                                            //  if disabled, LMFD SYM will always be ADF and /I for XM60 intensity
  554. //      UH-1 Communications
  555. int     UH1_RealRadioTrigger    =   0       ;   //  If enabled, TG1 does ICS Comm menu and TG2 does the Radio Comm menu, like the real aircraft.
  556.                                                 //  Setting to 0 sets TG1 to Radio and TG2 strictly to PTT.
  557. int         TG1_AutoCommMenu    =   0       ;   //  Works only if UH1-RealRadioTrigger = 0.  If set to 1, will use CommMenu instead of UH1_Pilot/CoPilot_Radio. Intercom is available via Intercom dial.
  558. int         TG2_Radio_Only_UH1  =   0       ;   //  Works only if UH1_RealRadioTrigger = 1.  If enabled, will remove PTT from TG2 and leave it only to T4/T5 and PVT Hot Mic.
  559. int     TG2_PTT_LED             =   0       ;   //  If enabled, sets RMFD LED1 on when TG2 is pulled.  Disabled will just keep the RMFD LED2 lit for CommState
  560.                                                 //  Default is 0 (recommended for stability).  Not applicable with TG2_Radio_Only_UH1 enabled.
  561. int     Int_PVT_HotMic          =   1       ;   //  If enabled, will set TS3 PTT to ON when PVT is discretely selected with the Intercom switch (LMFD OSB 15 long or S3+S1 long).  Limited utility with Aries Radio.  Default is 0.
  562. int     Int_PVT_CommState       =   0       ;   //  If enabled, will set CommState On while PVT is enabled.  Default is 1.  Can be used with Int_PVT_HotMic = 1.
  563. int     CenterPositRudder_UH1   =   0       ;   //  If 1, TCPTM also trims UH-1 rudder.  Rudder Trim must also be enabled for UH-1 in DCS Options for this to work.                                            
  564. int     Adjust_Backlight_UH1    =   1       ;   //  Allows adjustable backlighting on MFDs and Warthog Throttle for the UH-1H (currently only the starter).  Set 0 to disable, 1 to enable variable MFD/WH Throttle backlighting.  Default is 0.
  565. //  SA342 Profile Options
  566. int     CenterPositRudder_SA342 =   0       ;   //  If 1, TCPTM also trims SA342 rudder.  Rudder Trim must also be enabled for SA342 in DCS Options for this to work.                                              
  567. int     Adjust_Backlight_SA342  =   0       ;   //  Allows adjustable backlighting on MFDs and Warthog Throttle for the SA342 Gazelle (Warthog Throttle Only).  Set 0 to disable, 1 to enable variable MFD/WH Throttle backlighting.  Default is 0.
  568. int     Discrete_AP_SA342       =   0       ;   //  If 1, assigns discrete long/short to Autopilot switches on RMFD and WH Throttle Base.  0 sets functions to toggle. Default is 0.
  569. int     Armament_EOP_SA342      =   1       ;   //  If 1, then switching Master Arm On (using EAC sw) sets the Engine Operation and Pinky switches to control the armament panel, and Master Arm Off reverts control to the lighting.
  570.                                                 //  Set to 0 to disable, and EOP/Pinky sw will always be lighting.  For Warthog Throttle only.
  571.  
  572. //Red Jets
  573. //  MiG-15bis Profile Options
  574. int     Force_GearLock_MiG15    =   1       ;   //  If enabled, forces S3+T7 or LOSB18 to unlock the landing gear in order to toggle gear state.  Default 0.
  575. int     Gear_Deploy_MiG15       =   13000   ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  576. int     Gear_Retract_MiG15      =   11000   ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  577. int     Airbrake_Type_MiG15     =   0       ;   //  Set 1 for binary discrete (T9 open, T10 closed), 0 for binary momentary based on T9/T10 pressed and held.
  578. int     Airbrake_In_MiG15       =   3500    ;   //  Amount of time in ms for airbrake to be fully retracted.  Must be multiple of 500.
  579. int     Airbrake_Out_MiG15      =   1       ;   //  Amount of time in ms for airbrake to be fully extended.  Must be multiple of 500.  Set low for binary brake type, otherwise 3000.
  580.                                                 //  MiG-15 set to 1 for instantaneous light (like real thing); actual time is 4000 if preferred.
  581. int     MiG15_Flap20_Delay      =   2000    ;   //  Cycling flaps from up to 55 down requires approx 2 seconds in 20 down for hydraulic accumulation.  This value delays flap cycling if full flaps selected from up or neutral.
  582. //  MiG-21bis Profile Options
  583. int     IdleDetent_MiG21        =   1       ;   //  If enabled (along with IdleDetentLow), S3+Throttle crossing Idle Detent will toggle Throttle engine-stop and locking lever.  Set 0 to disable.
  584. int     Force_GearLock_MiG21    =   1       ;   //  If enabled, forces S3+T7 to unlock the landing gear in order to toggle gear state.  
  585. int     Gear_Deploy_MiG21       =   7000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  586. int     Gear_Retract_MiG21      =   6000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  587. int     Airbrake_Type_MiG21     =   1       ;   //  Set 1 for binary discrete (T9 open, T10 closed), 0 for binary momentary based on T9/T10 pressed and held.
  588. int     Airbrake_In_MiG21       =   2500    ;   //  Amount of time in ms for airbrake to be fully retracted.  Must be multiple of 500.
  589. int     Airbrake_Out_MiG21      =   500     ;   //  Amount of time in ms for airbrake to be fully extended.  Must be multiple of 500.  Set low for binary brake type, otherwise 3000.  
  590. int     Discrete_ASP_MiG21      =   1       ;   //  Set to 1 for discrete TEMPO commands for ASP switches (long for up, short for down), 0 for toggle function.  Does not apply to Pipper/Fixnet button (LOSB10).
  591. // L-39 Profile Options
  592. int     Gear_Deploy_L39         =   5000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  593. int     Gear_Retract_L39        =   5000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  594. int     Airbrake_Type_L39       =   2       ;   //  Set 2 for binary discrete with timing (T9 short open, T9 long momentary, T10 closed), 1 for binary discrete (t9 open, t10 close), 0 for binary momentary based on T9/T10 pressed and held.
  595. int     Airbrake_In_L39         =   2000    ;   //  Amount of time in ms for airbrake to be fully retracted.  Must be multiple of 500.
  596. int     Airbrake_Out_L39        =   1       ;   //  Amount of time in ms for airbrake to be fully extended.  Must be multiple of 500.  Set low for binary brake type, otherwise 2000.
  597. int     WH_L39C_LCON_Dynamic    =   1       ;   //  If enabled, will map LCON to UB-16 salvo when UB-16 rockets are selected (like Cougar).  Default is 0 (AP switch used).
  598.  
  599. //Blue Jets
  600. //  F-5E Profile Options
  601. int     Starter_Ind_F5E         =   35000   ;   //  Amount of time each RMFD LED will illuminate representing the starter for the engine.  Default 1min for 23% RPM check.  Set to 0 to disable feature.
  602. int     TQS_Idle_Delay_F5E      =   800     ;   //  Delay in ms between releasing the Engine Start Button (LOSB4 or 5) and when the right or left throttle is automatically set to idle. Set to 0 to disable feature.  Cougar TQS only.
  603. int     Eng_Stop_F5E            =   5000    ;   //  Delay in ms between shutting down engines in A-10C profile.  Can set to 0 to disable or 1 for simultaneous stop.
  604. int     Gear_Deploy_F5E         =   5000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  605. int     Gear_Retract_F5E        =   7500    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  606. int     Airbrake_In_F5E         =   2000    ;   //  Amount of time in ms for airbrake to be fully retracted.  Must be multiple of 500.
  607. int     Airbrake_Out_F5E        =   2000    ;   //  Amount of time in ms for airbrake to be fully extended.  Must be multiple of 500.
  608. int     Flare_Default_F5E       =   1       ;   //  Set to 2 for Single or 1 for Program.  0 for Off (not recommended for Warthog).
  609. int     Chaff_Default_F5E       =   2       ;   //  Set to 3 for Single, 2 for Program, or 1 for Multiple.  0 for Off (not recommended for Warthog).
  610. int     Adjust_Backlight_F5E    =   0       ;   //  Allows adjustable backlighting on MFDs and Warthog Throttle for the F-5E.  Set 0 to disable, 1 to enable variable MFD/WH Throttle backlighting.  Default is 0.
  611. int     NWS_ClearComms_F5E      =   1       ;   //  Presses "\" once S3 is held on the ground (since NWS cycles mic switch).  1 enables , 0 disables.
  612. int         ClearComms_Delay_F5E= 2*KBDelay ;   //  Delay between release of S3 and push of DX20 to clear comm menu
  613. //  A-10C Profile Options
  614. int     Eng_Start_A10C          =   40000   ;   //  Delay in ms between starting engines in A-10C profile.  Recommend at least 40000 (40s).  Can set to 0 to disable or 1 for simultaneous start.
  615. int     Eng_Stop_A10C           =   5000    ;   //  Delay in ms between shutting down engines in A-10C profile.  Can set to 0 to disable or 1 for simultaneous stop.
  616. int     Starter_Ind_A10C        =   33000   ;   //  Amount of time each RMFD LED will illuminate representing the starter for each engine.  Set to 0 to disable feature.
  617.                                                 //  Default 33000 so you can see when the profile starts an engine and then visually check your throttle in cockpit, expect 60% RPM before light goes out, then spy the other throttle 7 seconds prior to start.
  618. int     Gear_Deploy_A10C        =   6500    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  619. int     Gear_Retract_A10C       =   8000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  620. int     Airbrake_In_A10C        =   2000    ;   //  Amount of time in ms for airbrake to be fully retracted.  Must be multiple of 500.
  621. int     Airbrake_Out_A10C       =   3500    ;   //  Amount of time in ms for airbrake to be fully extended.  Must be multiple of 500.      
  622. int     Adjust_Backlight_A10C   =   0       ;   //  Allows adjustable backlighting on MFDs and Warthog Throttle for the A-10C.  Set 0 to disable, 1 to enable variable MFD/WH Throttle backlighting.  Default is 0.
  623. //  AJS-37 Profile Options
  624. int     Starter_Ind_AJS37       =   0       ;   //  Amount of time RMFD LED1 will illuminate representing the starter.  Set to 0 to disable feature.
  625.                                                 //  Default 30000 to match time STARTER annunciator light goes out.  Currently disabled.
  626. int     Gear_Deploy_AJS37       =   8000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  627. int     Gear_Retract_AJS37      =   8000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  628. int     Airbrake_In_AJS37       =   2500    ;   //  Amount of time in ms for airbrake to be fully retracted.  Must be multiple of 500.
  629. int     Airbrake_Out_AJS37      =   500     ;   //  Amount of time in ms for airbrake to be fully extended (short for binary).  Must be multiple of 500.
  630. int     WH_AB2_AJS37            =   82      ;   //  Percent of throttle at which Afterburner Stage 2 is entered
  631. int     WH_AB3_AJS37            =   95      ;   //  Percent of throttle at which Afterburner Stage 3 is entered
  632. int     Nav_Warn_AJS37          =   1       ;   //  If 1, will flash LLED1 if taking off not in at least Nav mode.  Cougar will flash at moderate throttle, Warthog at Afterburner.  0 disables feature.
  633. //  F-86F Profile Options
  634. int     Starter_Ind_F86         =   60000   ;   //  Amount of time RMFD LED1 will illuminate representing the starter for the engine.  Default 1min for 23% RPM check.  Set to 0 to disable feature.
  635. int     PreStarter_Ind_F86      =   60000   ;   //  Amount of time RMFD LED1 will flash indicating that 3% RPM should be reached. Default 1 min; set to 0 to disable feature.
  636. int     Gear_Deploy_F86         =   6500    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  637. int     Gear_Retract_F86        =   8500    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  638. int     Airbrake_In_F86         =   3000    ;   //  Amount of time in ms for airbrake to be fully retracted.  Must be multiple of 500.
  639. int     Airbrake_Out_F86        =   2500    ;   //  Amount of time in ms for airbrake to be fully extended.  Must be multiple of 500.
  640. int     UseDiscrete_F86         =   1       ;   //  Determines whether Discrete states are enabled for 3 position switches with only up/down keystrokes.  Default is 1.
  641.                                                 //  If enabled, up command is switch to up posit, down command is switch sw to down posit, and up/down long is off (center posit).
  642.                                                 //  if disabled, up command increments switch up by 1 and down increments switch down by 1.
  643. //  Hawk T.1A Profile Options
  644. int     Starter_Ind_Hawk        =   30000   ;   //  Amount of time RMFD LED1 will illuminate representing the starter for the engine.  Default 1min for 23% RPM check.  Set to 0 to disable feature.
  645. int     PreStarter_Ind_Hawk     =   30000   ;   //  Amount of time RMFD LED1 will flash indicating that 3% RPM should be reached. Default 1 min; set to 0 to disable feature.
  646. int     Gear_Deploy_Hawk        =   6500    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  647. int     Gear_Retract_Hawk       =   8500    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  648. int     Airbrake_Type_Hawk      =   1       ;   //  Set 1 for binary discrete (T9 open, T10 closed), 0 for binary momentary based on T9/T10 pressed and held. Default is 1.
  649. int     Airbrake_In_Hawk        =   3000    ;   //  Amount of time in ms for airbrake to be fully retracted.  Must be multiple of 500.
  650. int     Airbrake_Out_Hawk       =   2500    ;   //  Amount of time in ms for airbrake to be fully extended.  Must be multiple of 500.
  651.  
  652. //  M-2000C Profile Options
  653. int     Gear_Deploy_M2000C      =   5000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  654. int     Gear_Retract_M2000C     =   5000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  655. int     Airbrake_Type_M2000C    =   1       ;   //  currently set for 0 Binary due to toggle only function in Beta
  656. int     Airbrake_In_M2000C      =   2000    ;   //  Amount of time in ms for airbrake to be fully retracted.  Must be multiple of 500.
  657. int     Airbrake_Out_M2000C     =   2000    ;   //  Amount of time in ms for airbrake to be fully extended.  Must be multiple of 500.
  658. int     Radar_Export_M2000C     =   0       ;   //  If set to 1, will also toggle VTB overlay/export when radar turned on with S3+H2D Long.  Enable if you use display exports or like the overlay as default.
  659. int     MasterArm_Both_M2000C   =   1       ;   //  Cougar Only.  If enabled LBRT up switches both armament and cannon arm switches on and LBRT down turns both off.  If 0, short for armament and long for cannon.
  660. int     ParkBrake_EngSt_M2000C  =   1       ;   //  If enabled, setting the parking brake (RCON Dn or WH APUON) will set the RMFD bottom row to Engine Start functions.  
  661.                                                 //  Releasing the parking brake (RCON Up or WH APUOFF) will set the functions to the INS PCN.  Disabling this feature sets functions to INS PCN.
  662. int     Adjust_Backlight_M2000C =   0       ;   //  Allows adjustable backlighting on MFDs and Warthog Throttle for the M-2000C.  Set 0 to disable, 1 to enable variable MFD/WH Throttle backlighting.
  663.                                                 //  ParkBrake_EngSt_M2000C must be enabled to work.  Default is 0.
  664.  
  665. //Red Warbirds/Props
  666. //  Bf-109 Profile Options
  667. int     Force_GearLock_Bf109    =   0       ;   //  If enabled, forces S3+LOSB6 to unlock the landing gear in order to toggle gear state.
  668. int     Gear_Deploy_Bf109       =   5500    ;   //  Deployment time in ms for landing gear.  Must be multiple of 500.
  669. int     Gear_Retract_Bf109      =   7000    ;   //  Retraction time in ms for landing gear.  Must be multiple of 500.
  670. int     Adjust_Backlight_Bf109  =   0       ;   //  Allows adjustable backlighting on MFDs and Warthog Throttle for the Bf109.  Set 0 to disable, 1 to enable variable MFD/WH Throttle backlighting.  Default is 0.
  671. int     Priming_Rate_Bf109      =   500     ;   //  Rate at which priming pump is repeated while T6/APENG is held down.  Routine uses 2x for pull stroke and 1x for drop time.  Default 500.
  672.                                                 //  Note that this value is in addition to the default Switch_Delay (so set to 1800 if you want a total of 2 seconds).  Set to 0 to disable feature.
  673. //  Fw-190 Profile Options
  674. int     Starter_Ind_Fw190       =   20000   ;   //  Amount of time each RMFD LED will illuminate representing the starter for each engine.  Set to 0 to disable feature.
  675. int     Force_GearLock_Fw190    =   0       ;   //  If enabled, forces S3+LOSB6 to unlock the landing gear in order to toggle gear state.
  676. int     Gear_Deploy_Fw190       =   6000    ;   //  Deployment time in ms for landing gear.  Must be multiple of 500.
  677. int     Gear_Retract_Fw190      =   6500    ;   //  Retraction time in ms for landing gear.  Must be multiple of 500.
  678. int     Adjust_Backlight_Fw190  =   0       ;   //  Allows adjustable backlighting on MFDs and Warthog Throttle for the Fw190.  Set 0 to disable, 1 to enable variable MFD/WH Throttle backlighting.  Default is 0.
  679. int     Fw190_Sight_Offset      =   350     ;   //  Time during which view is offset to right to line up with gunsight.  Similar in implementation to TriggerZoom.  Set 0 to disable.  Default 350ms.
  680.                                                 //  Default 350ms as of 1.50 (was 150ms, then 475ms).
  681. //Blue Warbirds/Props
  682. //  P-51D Profile Options
  683. int     Starter_Ind_P51D        =   0       ;   //  Amount of time each RMFD LED will illuminate representing the starter for each engine.  Set to 0 to disable feature.
  684. int     Gear_Deploy_P51D        =   7000    ;   //  Deployment time in ms for landing gear.  Must be multiple of 500.
  685. int     Gear_Retract_P51D       =   12000   ;   //  Retraction time in ms for landing gear.  Must be multiple of 500.
  686. int     WH_Flap_Cycle_Rate      =   500     ;   //  Repeat rate for flap cycling while FLAPU/D
  687.  
  688. //  Spitfire Options
  689. int     Gear_Deploy_Spit        =   7000    ;   //  Deployment time in ms for landing gear.  Must be multiple of 500.
  690. int     Gear_Retract_Spit       =   12000   ;   //  Retraction time in ms for landing gear.  Must be multiple of 500.
  691. int     Adjust_Backlight_Spit   =   0       ;   //  Allows adjustable backlighting on MFDs and Warthog Throttle for the Spitfire.  Set 0 to disable, 1 to enable variable MFD/WH Throttle backlighting.  Default is 0.
  692. int     Priming_Rate_Spit       =   500     ;   //  Rate at which priming pump is repeated while LOSB12/13 is held down.  Routine uses 2x for pull stroke and 1x for drop time.  Default 500.
  693.                                                 //  Note that this value is in addition to the default Switch_Delay (so set to 1800 if you want a total of 2 seconds).  Set to 0 to disable feature.
  694.  
  695. //  DX Profile Options                          //  Options that you want to enable or disable in the Standard DX profile.  For example, you probably don't want Complex Comms and the Trigger Zoom if you use it with the Huey.
  696. int     Complex_Comm_DX         =   0       ;   //  Defaults the CommState A-10C routine (mapping 3 position mic switch to CommState) in the standard DX routine.
  697.                                                 //  This emulates the A-10C radio system/MIC switch, with the Comm Switch up, down, and right representing the A-10C MIC Switch Aft, Fwd, Down respectively.
  698.                                                 //  Comm Switch Left (T5) is the "shifted U" state, and cannot be mapped to a specific key within DCS, but defaults to DX21 for TeamSpeak3 PTT.
  699.                                                 //  Set Complex_Comm_DX = 2 to set to FC3 type comms (great for Aries/Univers)
  700. int     Eng_Quantity_DX         =   1       ;   //  Set number of engines for standard DX profile.  Default is 2.
  701. int     Eng_Start_DX            =   10000   ;   //  Delay in ms between starting engines in DX profile.  Can set to 0 to disable or 1 for simultaneous start.
  702. int     Eng_Stop_DX             =   5000    ;   //  Delay in ms between shutting down engines in DX profile.  Can set to 0 to disable or 1 for simultaneous start.
  703. int     Starter_Ind_DX          =   30000   ;   //  Amount of time each RMFD LED will illuminate representing the starter for each engine.
  704. int     Gear_Transit_DX         =   3000    ;   //  Transition time in ms for landing gear.  Must be multiple of 500.
  705. int     Gear_Discrete_DX        =   0       ;   //  If 1, uses discrete gear up/down commands.  Set to 0 if gear is a toggle command.  Default temporarily 0 for Hawk and C-101.
  706. int     Airbrake_In_DX          =   2000    ;   //  Amount of time in ms for airbrake to be fully retracted.  Must be multiple of 500.
  707. int     Airbrake_Out_DX         =   500     ;   //  Amount of time in ms for airbrake to be fully extended.  Must be multiple of 500.
  708. int     Helicopter_DX           =   0       ;   //  Determines whether the DX profile is used for a helicopter (applies to throttle/collective axis orientation and ANT as rudder).  Default is 0.
  709. int     CenterPositRudder_DX    =   0       ;   //  If 1 (and Helicopter_DX = 1), TCPTM also trims rudder.  Rudder Trim must also be enabled for the helicopter in DCS Options.
  710. int     Fixed_Gear_DX           =   0       ;   //  Set to 1 if the aircraft used with the DX profile has a fixed gear.  Leave at 0 if used for multiple aircraft, some with fixed gear.
  711. int     Airbrake_Def_DX         =   3       ;   //  Set to 0 for binary airbrake, 1 for binary discrete airbrake, 2 for analog pulse airbrake (like F-15C), or 3 for analog airbrake (like A-10C)
  712. int     DiffBraking_DX          =   0       ;   //  Set to 1 if differential braking is available for the aircraft.  This will not override your DiffBraking_Enabled setting.  Default currently 0 for the Hawk and C-101.
  713. int     AnalogBrake_DX          =   0       ;   //  Set to 1 if DX profile uses standard analog braking (i.e. toe brakes).  Will not override your global preferences.
  714. int     AnalogPaddleBrake_DX    =   0       ;   //  Set to 1 if DX profile uses an analog paddle brake (fixed wing or helicopter).  Independent of AnalogBrake_DX; will not override your global preferences.
  715. int     WheelBrakeFull_DX       =   1       ;   //  Set to 0 if there are only left and right wheelbrake axes/buttons and no "full" wheelbrake axis or button.
  716. int     XYAxisTrim_DX           =   0       ;   //  Set to 1 to replace in-game trim with TARGET based axis trim.  0 uses in-game trim.  Automatically applied for C-101.  Automatically disabled if Helicopter_DX = 1.
  717. int         JoyXTrim_DX         =   6       ;   //  Determines amount of X axis trim applied for each clock cycle.  Higher number is more trim in the same time, smaller number allows for finer tuning.
  718. int         JoyYTrim_DX         =   6       ;   //  Determines amount of Y axis trim applied for each clock cycle.  Higher number is more trim in the same time, smaller number allows for finer tuning.
  719. int     DMS_SnapView_DX         =   0       ;   //  If enabled, Hat3 will default to SnapViews instead of DX.
  720. int     Afterburner_DX          =   0       ;   //  Set to 1 if aircraft is afterburner capable.  Necessary only if you use Warthog throttle with Afterburner physical detent.
  721. int     FlapType_DX             =   0       ;   //  Sets flap mapping type. 0 for up: flaps up, down: flaps dn, Mid: flap cycle (Su-25).  1 for directional (A-10).  2 for 2 position (up: up, down: down, mid null)
  722. int     NVG_Capable_DX          =   0       ;   //  Set to 1 if aircraft is NVG capable, otherwise 0.
  723. int     AB_Capable_DX           =   0       ;   //  Set to 1 if the aircraft is afterburner capable (or if emergency power is on the throttle axis), otherwise 0.
  724.  
  725.  
  726. //Default Indications
  727. int GearDn_Ind_Default          =   1       ;   //  If set to 1, the LFMD LED 2 will default to ON, indicating a Gear Down condition.  Set to 0 if you like to start in the air.
  728.                                                 //  Note: this does not directly correspond to your landing gear state, but only the controller inputs.
  729.                                                 //  For true landing gear state, check your in-game cockpit display.
  730. int Engine_Shutdown_Ind_Time    =   4500    ;   //  Amount of time RMFD LEDs flash during engine shutdown.  Must be multiple of 500 and should be smaller than shortest shutdown delay.  Set to 0 to disable.
  731.  
  732. //  MFD and Warthog Throttle backlighting - adustable backlighting for DAY/NIGHT/OFF MFD settings (primary A-10C with other cosmetic uses).  Values range from 0-255.
  733. int MFD_Lt_Off              =   2       ;   //  Backlighting value when MFD is set to "Off" (min 0, recommended at least 2 for LED indications)
  734. int MFD_Lt_Night            =   60      ;   //  Backlighting value when MFD is set to "Night".  Recommend at least 43 for Warthog backlighting.
  735. int MFD_Lt_Day              =   140     ;   //  Backlighting value when MFD is set to "Day" (Max 255)
  736. int MFD_Default_Setting     =   2       ;   //  Default MFD/WH Throttle backlighting when applicable profile (e.g. A-10C) starts.  Cosmetic only.
  737.                                             // Set 0 for OFF, 1 for NIGHT, 2 for DAY.  Recommend 2 for warm starts/air starts, 0 for cold starts.  
  738.  
  739.  
  740.  
  741. //This begins the Cougar Comm Switch mapping routine, where you logically map T2-T5 to the Mic Switch on the A-10C Warthog throttle.  Mapping is customizable, and applies to A-10C and FC3.
  742.  
  743. int SetCommSw()     //***do not edit***
  744. {                   //***do not edit***
  745.  
  746.  
  747. //Comm_Sw is the Cougar Switch, Mic_Sw is the equivalent switch on the Warthog (mounted on the right side of the throttle).
  748. //Since Mic_Sw_Up on the A-10C doesn't have a function, this suffices as the regular or common Push to Talk on TeamSpeak 3.
  749.  
  750. //Can change these for personal preference.  Just be sure that each Mic_Sw_xxx is mapped exactly once. Be sure each line ends with a semicolon as well.
  751.  
  752. //Only change this for Cougar Comm Switch
  753. if (WarthogThrottle != 1)
  754.     {
  755.     Comm_Sw_Dn  =   Mic_Sw_Dn;      //T2
  756.     Comm_Sw_Up  =   Mic_Sw_Up;      //T3
  757.     Comm_Sw_Rt  =   Mic_Sw_Aft;     //T4
  758.     Comm_Sw_Lt  =   Mic_Sw_Fwd;     //T5
  759.     }
  760.    
  761. //do not modify (WH settings)
  762. else
  763.     {
  764.     Comm_Sw_Dn  =   Mic_Sw_Dn;     
  765.     Comm_Sw_Up  =   Mic_Sw_Up;     
  766.     Comm_Sw_Rt  =   Mic_Sw_Fwd;    
  767.     Comm_Sw_Lt  =   Mic_Sw_Aft;    
  768.     }
  769.    
  770. }  
  771.  
  772. //  To create a custom aircraft selection map where aircraft you choose are assigned to MFD buttons for selection,
  773. //  see Appendix D of the Setup Guide.  Then make any changes to the DCS_UserSettings.tmm file.
  774. //
  775. //  To modify buttons for switching aircraft, Push to Talk and TrackIR key combinations, see UserSEttings.tmm.
  776. //  Do not modify TS3PTT_DX, or the Aries Radio/TARS values; rather modify Aries/TARS/TS3 to match the profile.
  777.  
  778. //---------------------------------------
  779. //          End Personalization
  780. //  ***DO NOT EDIT BEYOND THIS POINT***
  781. //---------------------------------------
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791. //------------------------------------------------------------
  792. //  If you're not a programmer, then your work here is done!
  793. //------------------------------------------------------------
  794.  
  795.  
  796. //--------------------------------------------
  797. //      Constants (should not be changed)
  798. //--------------------------------------------
  799. int     UH1_ICS_Start           =   0       ;       //  Default start position of ICS Switch when Huey Loads.  Set at PVT.
  800. int     Mi8_ICS_Start           =   0       ;       //  Default start position of ICS Switch when Mi-8 Loads.  Set at Intercom.
  801. int     Mi8_Eng_Sel_Sw_Start    =   1       ;       //  Default start position of Engine Select Switch when Mi-8 Loads.  Set to middle.
  802. int     BS2_Eng_Sel_Sw_Start    =   1       ;       //  Default switch position of Engine Start Switch; 1 is APU (0 Turbo Gear), 2 is LE, 3 is RE.  Added in 1.27
  803. int     Mi8_UV26_Side_Start     =   0       ;       //  Default start position of UV-26 side switch (Mi-8).  Set to Left.
  804. int     BS2_UV26_Side_Start     =   0       ;       //  Default start position of UV-26 side switch (Ka-50).  Set to Left.  Not currently implemented.
  805. int     Discrete_Array_MiG21    =   0       ;       //  Leave at 0 until LN restores discrete On/Off and Landing/Nav light switch positions
  806.  
  807. int     FC3_Custom_LUA          =   Custom_Master_LUA_FC3;
  808. int     BS2_Custom_LUA          =   0       ;
  809. int     A10C_Custom_LUA         =   0       ;
  810. int     P51D_Custom_LUA         =   0       ;
  811. int     UH1_Custom_LUA          =   Custom_Master_LUA_UH1;
  812. int     Mi8_Custom_LUA          =   0       ;
  813. int     F86_Custom_LUA          =   Custom_Master_LUA_F86;
  814. int     Fw190_Custom_LUA        =   0       ;
  815. int     Bf109_Custom_LUA        =   0       ;
  816. int     MiG21_Custom_LUA        =   0       ;
  817. int     SpitLFIX_Custom_LUA     =   0       ;
  818. int     AJS37_Custom_LUA        =   Custom_Master_LUA_AJS37;
  819.  
  820. int     AirBrakePoll            =   500     ;       //  analog airbrake polling time in ms (also flash frequency)
  821. int     CPTM_Flash              =   250     ;       //  flash rate of LLED1 when TCPTM trimmer active.
  822. int     BS2_StarterDelay        =   3500    ;       //  DeferCall time for the Ka-50 starter LED
  823.  
  824. int     TARS            =   TS3_Radio   ;           //  Changes user variable without changing base code.  Added in 1.31, updated in 1.55.
  825. int     TARS_PTT_Common =   TS3_Radio_PTT_Common;   //  Renamed from Aries in 1.55 just to imply it works across multiple platforms.
  826. int     UR_ER           =   TS3_ExtRadio_Keys;      //  UR_ER just makes for a better in program variable but not descriptive enough for config. Added in 1.55 for UniversRadio hotkeys for external radio.
  827. int     Swap_UR_MicSw   =   1           ;           //  Swaps MSF and MSB in A-10C until UR fixes this issue.
  828.  
  829. int     Eng_Start_Su27      =   Eng_Start_FC3;      //  Moved here in 1.36 to keep array in place, though Su-27 value is obsolete.  Possible update later for MiG-29 or Su-25.
  830. int     SPU9_BS2            =   1           ;       //  1 for SPU-9 switch, 0 for CommMenu (\).  Currently a constant because SPU-9 forced.
  831. int     WH_SC_SetRange      =   0           ;       //  Set as 1 to use the Warthog Slew Y axis on throttle for analog ranging (e.g. MiG-21 gunsight, K-14 gunsight, etc.).  Set to 0 to only use CS for digital adjustment (always option).  Currently forced disabled due to limited utility.
  832. int     WepsSel_Array_MiG21 =   0           ;       //  Set as 1 to use the original discrete weapon select array instead of the cycle command (added in 1.66)
  833.  
  834. //Misc Variables
  835. int Comm_Sw_Up;
  836. int Comm_Sw_Lt;
  837. int Comm_Sw_Dn;
  838. int Comm_Sw_Rt;
  839. int CougarToeBrakes;    //added in 1.40
  840.  
  841.  
  842. //==================================
  843. //          Program Start
  844. //==================================
  845. int main()
  846. {
  847. //Init Declarations.
  848. SetKBRate(KBPress, KBDelay);        //constants moved to personalization section in 0.70.
  849.  
  850. Configure(&T16000,MODE_EXCLUDED);
  851. Configure(&T16000L,MODE_EXCLUDED);
  852. Configure(&TWCSThrottle,MODE_EXCLUDED);
  853. Configure(&TFRPRudder,MODE_EXCLUDED);
  854. if (    (WarthogStick > 0) & (WarthogThrottle == 1) & (RudderPedals == 0)   ) Configure(&HCougar,MODE_EXCLUDED);    //added in 1.66; frees cougar rudders if WH HOTAS enabled
  855. if (!WarthogStick)      Configure(&Joystick,MODE_EXCLUDED); //added in 1.67
  856. if (!WarthogThrottle)   Configure(&Throttle,MODE_EXCLUDED); //added in 1.67
  857. //End Declarations
  858.  
  859.  
  860. if(Init(&EventHandle)) return 1; // declare the event handler, return on error
  861. if (RudderPedals > 1)   AirBrkFlash = 0;    //added in 1.31
  862.  
  863. if (    (WarthogStick > 0)  &   (RudderPedals == 1) &   (DiffBraking_Enabled > 2)   )   //added in 1.40
  864.         {
  865.         CougarToeBrakes     =   1;
  866.         JoyYParkingBrake    =   0;      //  If enabled, holding Joy Y all the way back and releasing S4 will set the parking brake (or lock the axis in place if no parking brake command).  S4+JoyY to release.
  867.         NWSwithBrake        =   0;      //  Enable if you like to use S4+JoyY for Nosewheel steering as an analog brake with Rudders for Differential Braking.  DiffBraking_Enabled must be 2.  Default is 0.
  868.         AnalogBrake_Warbird =   1;
  869.         WH_SC_SetRange      =   0;
  870.         }
  871. else CougarToeBrakes = 0;
  872.  
  873. SetMicSw(TS3_DX);
  874. SetCommSw();
  875.  
  876.  
  877. Init_Run = 1;       //set to 1 for first run of profile
  878. AcftArrayInit();
  879. DCS_Global();
  880. if ((TARS > 0) & (TARS_PTT_Common > 0)) TARS_Init();    //initializes radio cycle array for CommonPTT users
  881. DCS_Init();
  882. Gear_Ind_Init(GearDn_Ind_Default,FixedGear,Helicopter); //Initializes default Gear indication (LMFD LED 2 for gear state).
  883. }
  884.  
  885.  
  886. //===================================
  887. //          Event Handler
  888. //===================================
  889.  
  890. int EventHandle(int type, alias o, int x)
  891. {
  892.    
  893.     DefaultMapping(&o, x);
  894.  
  895.  
  896.     //add additional event handling code here
  897.    
  898. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement