//======================================================================== // DCS World for HOTAS Cougar/Warthog and Cougar MFDs // by Don "Home Fries" Heumphreus // last updated: 14JUN2018 // (Personalization Parameters last updated 2.20) // // Autogenerated by Configurator TARGET Script (CTS) GUI // See index.html in the CTS GUI for the latest change log // //======================================================================== int MajorVersion = 2; int MinorVersion = 20; int Script_Debug = 0; //Set to 1 to allow verbose debugging. //----------------------------------- // Included Headers and Code files //----------------------------------- include "target.tmh" include "Common/util_usb.tmh" //header by ivanwfr that adds better aliases for USB keystrokes include "Common/MFD_Lights.tmc" //functions that use lower level LED calls than ActKey include "Common/WH_Lights.tmc" //functions that use lower level LED calls than ActKey //Include DCS Specific Files include "DCS/DCS World.ttm" //macro file include "DCS_UserSettings.ttm" //User customizable macro file include "DCS/DCS_SelMod.tmc" include "DCS/DCS_Init.tmc" include "DCS/DCS_Global_Subs.tmc" include "DCS/CommState.tmc" include "DCS/CommState_WH.tmc" //separate file so that the two can be compared side by side. //Include should show all modules available for this profile. include "DCS/Modules/DCS_DX.tmc" include "DCS/Modules/DCS_FC3.tmc" include "DCS/Modules/DCS_A10C.tmc" include "DCS/Modules/DCS_BS2.tmc" include "DCS/Modules/DCS_P51D.tmc" include "DCS/Modules/DCS_UH1.tmc" include "DCS/Modules/DCS_MI8.tmc" include "DCS/Modules/DCS_F86.tmc" include "DCS/Modules/DCS_Fw190.tmc" include "DCS/Modules/DCS_MiG21.tmc" include "DCS/Modules/DCS_Bf109.tmc" include "DCS/Modules/DCS_MiG15.tmc" include "DCS/Modules/DCS_L39.tmc" include "DCS/Modules/DCS_M2000C.tmc" include "DCS/Modules/DCS_SA342.tmc" include "DCS/Modules/DCS_F5E.tmc" include "DCS/Modules/DCS_Spitfire.tmc" include "DCS/Modules/DCS_AJS37.tmc" include "DCS/Modules/DCS_Hawk.tmc" include "DCS/Modules/DCS_AV8B.tmc" include "DCS/Modules/DCS_C101.tmc" include "DCS/Modules/DCS_FA18C.tmc" //Early Variable Declarations int Init_Run; //set to 1 for first run of profile; 0 for hot loads. int Comm_Sw_Up; int Comm_Sw_Lt; int Comm_Sw_Dn; int Comm_Sw_Rt; int CougarToeBrakes; //added in 1.40 //End Header //========================================= // Script Baseline //========================================= //========================================= // Hardware Configuration //========================================= //========================================= // Default Initial Configuration //========================================= //============================================ // Script Personalization //============================================ //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. int SetCommSw() //***do not edit*** { //***do not edit*** //Comm_Sw is the Cougar Switch, Mic_Sw is the equivalent switch on the Warthog (mounted on the right side of the throttle). //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. //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. if (WarthogThrottle > 0) //do not modify (WH settings) { Comm_Sw_Dn = Mic_Sw_Dn; Comm_Sw_Up = Mic_Sw_Up; Comm_Sw_Rt = Mic_Sw_Fwd; Comm_Sw_Lt = Mic_Sw_Aft; } else { //============================================ // Only change this for Cougar Comm Switch //============================================ Comm_Sw_Dn=Mic_Sw_Dn; Comm_Sw_Up=Mic_Sw_Up; Comm_Sw_Rt=Mic_Sw_Aft; Comm_Sw_Lt=Mic_Sw_Fwd; } } //============================================ // Constants (should not be changed) //============================================ int WepsSel_Array_MiG21=0; int WH_SC_SetRange=0; int SPU9_BS2=1; int Eng_Start_Su27=Eng_Start_FC3; int Swap_UR_MicSw=1; int UR_ER=TS3_ExtRadio_Keys; int TARS_PTT_Common=TS3_Radio_PTT_Common; int TARS=TS3_Radio; int BS2_StarterDelay=3500; int CPTM_Flash=250; int AirBrakePoll=500; int AJS37_Custom_LUA=Custom_Master_LUA_AJS37; int SpitLFIX_Custom_LUA=0; int MiG21_Custom_LUA=0; int Bf109_Custom_LUA=0; int Fw190_Custom_LUA=0; int F86_Custom_LUA=Custom_Master_LUA_F86; int Mi8_Custom_LUA=0; int UH1_Custom_LUA=Custom_Master_LUA_UH1; int P51D_Custom_LUA=0; int A10C_Custom_LUA=0; int BS2_Custom_LUA=0; int FC3_Custom_LUA=Custom_Master_LUA_FC3; int Discrete_Array_MiG21=0; int BS2_UV26_Side_Start=0; int Mi8_UV26_Side_Start=0; int BS2_Eng_Sel_Sw_Start=1; int Mi8_Eng_Sel_Sw_Start=1; int Mi8_ICS_Start=0; int UH1_ICS_Start=0; int AV8B_Custom_LUA=Custom_Master_LUA_AV8B; int WAV_PlayBatch=0; alias DCSFPPath=&ScriptPath; alias DCSFPFilePath=&ScriptPath; int DCSFPPathLength=PathLength; int DCSFPFilePathLength=PathLength; int DCSFP_Enabled=0; alias DCSFP__Default="DCSTest.bindings"; alias DCSFP_MiG15=&DCSFP__Default; alias DCSFP_MiG21=&DCSFP__Default; alias DCSFP_Su25=&DCSFP__Default; alias DCSFP_Su27=&DCSFP__Default; alias DCSFP_Su33=&DCSFP__Default; alias DCSFP_MiG29=&DCSFP__Default; alias DCSFP_L39C=&DCSFP__Default; alias DCSFP_L39ZA=&DCSFP_L39C; alias DCSFP_F5E=&DCSFP__Default; alias DCSFP_A10A=&DCSFP__Default; alias DCSFP_A10C=&DCSFP__Default; alias DCSFP_F15C=&DCSFP__Default; alias DCSFP_F86=&DCSFP__Default; alias DCSFP_Hawk=&DCSFP__Default; alias DCSFP_M2000C=&DCSFP__Default; alias DCSFP_AJS37=&DCSFP__Default; alias DCSFP_AV8B=&DCSFP__Default; alias DCSFP_Mi8=&DCSFP__Default; alias DCSFP_Ka50=&DCSFP__Default; alias DCSFP_UH1=&DCSFP__Default; alias DCSFP_SA342M=&DCSFP__Default; alias DCSFP_SA342L=&DCSFP_SA342M; alias DCSFP_Bf109=&DCSFP__Default; alias DCSFP_Fw190=&DCSFP__Default; alias DCSFP_P51D=&DCSFP__Default; alias DCSFP_SpitLFIX=&DCSFP__Default; alias DCSFP_DCSDX=&DCSFP__Default; alias DCSFP_C101EB=&DCSFP__Default; //alias DCSFP_C101CC=&DCSFP_C101EB; alias DCSFP_FA18C=&DCSFP__Default; int HOTAS_Cougar_Button_Init() { //============================================ // Default Menu and Profile Init //============================================ SetMenu_UH1(); SetMenu_Mi8(); SetMenu_A10C(); SetMenu_MiG21(); SetMenu_P51D(); DCS_A10C_Init(); } //Begin Footer (static code) int main() { SetCSVAC(); //determines whether CommState runs with VAICOM Pro. //Init Declarations. SetKBRate(KBPress, KBDelay); //constants moved to personalization section in 0.70. Configure(&T16000,MODE_EXCLUDED); Configure(&T16000L,MODE_EXCLUDED); Configure(&TWCSThrottle,MODE_EXCLUDED); Configure(&TFRPRudder,MODE_EXCLUDED); if ( (WarthogStick > 0) & (WarthogThrottle == 1) & (RudderPedals == 0) ) Configure(&HCougar,MODE_EXCLUDED); //added in 1.66; frees cougar rudders if WH HOTAS enabled if (!WarthogStick) Configure(&Joystick,MODE_EXCLUDED); //added in 1.67 if (!WarthogThrottle) Configure(&Throttle,MODE_EXCLUDED); //added in 1.67 if (MFD_Count < 0) //added in 2.20 for troubleshooting { Configure(&LMFD,MODE_EXCLUDED); Configure(&RMFD,MODE_EXCLUDED); } //End Declarations if(Init(&EventHandle)) return 1; // declare the event handler, return on error if ((RudderPedals > 1) & (AirBrkFlash > 0)) AirBrkFlash = 0; //added in 1.31, modified in 2.05 if ( (WarthogStick > 0) & (RudderPedals == 1) & (DiffBraking_Enabled > 2) ) //added in 1.40 { CougarToeBrakes = 1; 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. 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. AnalogBrake_Warbird = 1; WH_SC_SetRange = 0; } else CougarToeBrakes = 0; SetMicSw(TS3_DX); SetCommSw(); Init_Run = 1; //set to 1 for first run of profile AcftArrayInit(); DCS_Global(); if ((TARS > 0) & (TARS_PTT_Common > 0)) TARS_Init(); //initializes radio cycle array for CommonPTT users DCS_Init(); Gear_Ind_Init(GearDn_Ind_Default,FixedGear,Helicopter,AirBrkFlash); //Initializes default Gear indication (LMFD LED 2 for gear state). } // Event Handler int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x); //add additional event handling code here } int FA18C_Installed=1; int AV8B_Installed=0; int C101_Installed=0; int SpitLFIX_Installed=0; int M2000C_Installed=1; int Hawk_Installed=0; int F86_Installed=1; int AJS37_Installed=0; int F15C_Installed=1; int A10C_Installed=1; int A10A_Installed=0; int F5E_Installed=0; int SA342_Installed=1; int UH1_Installed=1; int Fw190_Installed=0; int Bf109_Installed=0; int L39_Installed=0; int FC3_Installed=1; int Su33_Installed=1; int Su27_Installed=1; int MiG21_Installed=1; int MiG15_Installed=0; int Ka50_Installed=1; int Mi8_Installed=1; int AirbrakeType_F15C=2; int AirbrakeSwap_F15C=0; int VAC_DisableCommSuppAir_F5E=0; int SuppressWavInit=0; int VACChatter=0; int Airbrake_Out_C101=1500; int Airbrake_In_C101=1500; int Gear_Retract_C101=4000; int Gear_Deploy_C101=4000; int TG1ZoomReset=0; int MFD_Count=2; int S4Brake_F18=1; int Starter_Ind_FA18C=20000; int Adjust_Backlight_FA18C=0; int Airbrake_Out_FA18C=3500; int Airbrake_In_FA18C=3500; int Gear_Retract_FA18C=9000; int Gear_Deploy_FA18C=9000; int Airbrake_Out_AV8B=1500; int Airbrake_In_AV8B=1500; int Gear_Retract_AV8B=4000; int Gear_Deploy_AV8B=4000; int STO_Stop_Increment_AV8B=3; int Custom_Master_LUA_AV8B=0; int WH_104_AV8B=94; int WH_103_AV8B=93; int WH_102_AV8B=92; int WH_101_AV8B=91; int WH_100_AV8B=90; int WH_LED_AV8B=0; int WH_IdleStop_AV8B=0; int STO_Stop_Rate_AV8B=200; int Adjust_Backlight_AV8B=0; int PathLength=54; alias ScriptPath="E:\\TARGET Profiles\\CTS"; int Speech_on_Cycle=1; int LED_Enable_on_Cycle=1; int Acft_Sel_Skip_Mult=5; int RudderPedals=0; int WarthogThrottle=1; int WarthogStick=1; int Helo_Throttle_Rev=1; int RevANTRudder=1; int TrackIR=1; int VRTrimDefault=0; int PauseTIRGunner=300; int PadlockEnabled=1; int AnalogBrake_Warbird=1; int AnalogBrake_Helo=0; int AnalogPaddleBrake=0; int NWSwithBrake=0; int JoyYParkingBrake=0; int DiffBraking_Enabled=0; int IdleDetentHigh=14; int IdleDetentLow=7; int ThrottleMin=0; int ThrottleMax=100; int Helo_Microstick_Offset=-45; int Microstick_Offset=0; int ThrottleShutdownDelay=2000; int WH_AB_DetentHigh_L=66; int WH_AB_DetentLow_L=65; int WH_AB_DetentHigh_R=66; int WH_AB_DetentLow_R=65; int WH_AB_Detent_Enabled=0; int PositionSwitchComms=1; int CommStateAllow=1; int TS3_DX=1; int TS3_ExtRadio_Keys=0; int TS3_Radio_PTT_Common=0; int TS3_Radio=0; int VAC=0; int CenterPositMapDelay=500; int CenterPositZone=2000; int CenterPositRelTempo=300; int CenterPositTempo=500; int CenterPositTrimmer=50; int Engine_Shutdown_Ind_Time=4500; int GearDn_Ind_Default=1; int MFD_Default_Setting=2; int MFD_Lt_Day=140; int MFD_Lt_Night=60; int MFD_Lt_Off=2; int AirBrkFlash=1; int RuH_WH_Throttle_Delay=1000; int RuH_WH_Throttle_Discrete=1; int Switch_Delay=200; int LED_Delay=50; int ModDelay=10; int KBDelay=60; int KBPress=50; int VRMouseWheelRate=100; int XYAxisTrim_Rate=100; int TG1ZoomOutDelay=1500; int TG1Zoom=700; int GearDnTempo=1000; int GearUpTempo=500; int SwapTempo=2000; int LongTempo=800; int DoubleTap=350; int ModTempo=300; int DefTempo=500; int AB_Capable_DX=0; int NVG_Capable_DX=0; int FlapType_DX=0; int Afterburner_DX=0; int DMS_SnapView_DX=0; int JoyYTrim_DX=6; int JoyXTrim_DX=6; int XYAxisTrim_DX=1; int WheelBrakeFull_DX=1; int AnalogPaddleBrake_DX=0; int AnalogBrake_DX=0; int DiffBraking_DX=0; int Airbrake_Def_DX=3; int Fixed_Gear_DX=0; int CenterPositRudder_DX=1; int Helicopter_DX=0; int Airbrake_Out_DX=500; int Airbrake_In_DX=2000; int Gear_Discrete_DX=0; int Gear_Transit_DX=3000; int Starter_Ind_DX=30000; int Eng_Stop_DX=5000; int Eng_Start_DX=10000; int Eng_Quantity_DX=2; int Complex_Comm_DX=0; int Priming_Rate_Spit=500; int Adjust_Backlight_Spit=0; int Gear_Retract_Spit=12000; int Gear_Deploy_Spit=7000; int WH_Flap_Cycle_Rate=500; int Gear_Retract_P51D=12000; int Gear_Deploy_P51D=7000; int Starter_Ind_P51D=0; int Fw190_Sight_Offset=350; int Adjust_Backlight_Fw190=0; int Gear_Retract_Fw190=6500; int Gear_Deploy_Fw190=6000; int Force_GearLock_Fw190=0; int Starter_Ind_Fw190=20000; int Priming_Rate_Bf109=500; int Adjust_Backlight_Bf109=0; int Gear_Retract_Bf109=7000; int Gear_Deploy_Bf109=5500; int Force_GearLock_Bf109=0; int Adjust_Backlight_M2000C=0; int ParkBrake_EngSt_M2000C=1; int MasterArm_Both_M2000C=1; int Radar_Export_M2000C=0; int Airbrake_Out_M2000C=2000; int Airbrake_In_M2000C=2000; int Airbrake_Type_M2000C=1; int Gear_Retract_M2000C=5000; int Gear_Deploy_M2000C=5000; int Airbrake_Out_Hawk=2500; int Airbrake_In_Hawk=3000; int Airbrake_Type_Hawk=1; int Gear_Retract_Hawk=8500; int Gear_Deploy_Hawk=6500; int PreStarter_Ind_Hawk=30000; int Starter_Ind_Hawk=30000; int UseDiscrete_F86=1; int Airbrake_Out_F86=2500; int Airbrake_In_F86=3000; int Gear_Retract_F86=8500; int Gear_Deploy_F86=6500; int PreStarter_Ind_F86=60000; int Starter_Ind_F86=60000; int Nav_Warn_AJS37=1; int WH_AB3_AJS37=95; int WH_AB2_AJS37=82; int Airbrake_Out_AJS37=500; int Airbrake_In_AJS37=2500; int Gear_Retract_AJS37=8000; int Gear_Deploy_AJS37=8000; int Starter_Ind_AJS37=0; int Adjust_Backlight_A10C=0; int Airbrake_Out_A10C=3500; int Airbrake_In_A10C=2000; int Gear_Retract_A10C=8000; int Gear_Deploy_A10C=6500; int Starter_Ind_A10C=33000; int Eng_Stop_A10C=5000; int Eng_Start_A10C=40000; int ClearComms_Delay_F5E=2*KBDelay; int NWS_ClearComms_F5E=0; int Adjust_Backlight_F5E=0; int Chaff_Default_F5E=2; int Flare_Default_F5E=1; int Airbrake_Out_F5E=2000; int Airbrake_In_F5E=2000; int Gear_Retract_F5E=7500; int Gear_Deploy_F5E=5000; int Eng_Stop_F5E=5000; int TQS_Idle_Delay_F5E=800; int Starter_Ind_F5E=35000; int WH_L39C_LCON_Dynamic=0; int Airbrake_Out_L39=2000; int Airbrake_In_L39=2000; int Airbrake_Type_L39=2; int Gear_Retract_L39=5000; int Gear_Deploy_L39=5000; int Discrete_ASP_MiG21=1; int Airbrake_Out_MiG21=500; int Airbrake_In_MiG21=2500; int Airbrake_Type_MiG21=1; int Gear_Retract_MiG21=6000; int Gear_Deploy_MiG21=7000; int Force_GearLock_MiG21=0; int IdleDetent_MiG21=1; int MiG15_Flap20_Delay=2000; int Airbrake_Out_MiG15=1; int Airbrake_In_MiG15=3500; int Airbrake_Type_MiG15=0; int Gear_Retract_MiG15=11000; int Gear_Deploy_MiG15=13000; int Force_GearLock_MiG15=0; int Armament_EOP_SA342=1; int Discrete_AP_SA342=0; int Adjust_Backlight_SA342=0; int CenterPositRudder_SA342=1; int Adjust_Backlight_UH1=0; int CenterPositRudder_UH1=1; int Int_PVT_CommState=1; int Int_PVT_HotMic=0; int TG2_PTT_LED=0; int TG2_Radio_Only_UH1=0; int TG1_AutoCommMenu=0; int UH1_RealRadioTrigger=0; int UH1_XM60_Track=1; int Starter_Ind_UH1=40000; int BS2_Trim_Neutral_Offset=234; int CenterPositRudder_BS2=1; int BS2_RotorBrake_Default=1; int BS2_PVI_CommState=0; int BS2_ForceCommStateOff=1; int BS2_DiscreteCommState=0; int Gear_Retract_BS2=10000; int Gear_Deploy_BS2=7000; int Starter_Ind_BS2=40000; int CenterPositRudder_Mi8=1; int UV26_LED_Duration=600; int Mi8_AP_MFD_LED=1000; int Mi8_AP_MFD_Context=1; int Custom_Master_LUA_AJS37=0; int Custom_Master_LUA_F86=0; int Custom_Master_LUA_UH1=0; int Custom_Master_LUA_FC3=0; int DragChuteLEDTime=10000; int Adjust_Backlight_FC3=0; int Airbrake_Def_A10A=1; int Airbrake_Def_FC3_Ru=1; int Airbrake_Out_F15C=2000; int Airbrake_In_F15C=5000; int Airbrake_Out_FC3=500; int Airbrake_In_FC3=1500; int Gear_Transit_FC3=3000; int Starter_Ind_FC3=35000; int Eng_Stop_FC3=5000; int Eng_Start_A10A=60000; int Eng_Start_FC3=10000; int TG1ZoomPoll=50;