initial commit
commit
77d087dc3a
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,90 @@
|
||||
include "target.tmh"
|
||||
include "StarCitizenMappings.tmh"
|
||||
|
||||
//program startup
|
||||
int main()
|
||||
{
|
||||
Configure(&HCougar, MODE_EXCLUDED);
|
||||
Configure(&T16000, MODE_EXCLUDED);
|
||||
Configure(&LMFD, MODE_EXCLUDED);
|
||||
Configure(&RMFD, MODE_EXCLUDED);
|
||||
|
||||
if(Init(&EventHandle)) return 1; // declare the event handler, return on error
|
||||
|
||||
|
||||
/////////////////////////
|
||||
// Keyboard Settings
|
||||
/////////////////////////
|
||||
|
||||
SetKBRate(32, 50);
|
||||
SetKBLayout(KB_ENG);
|
||||
|
||||
|
||||
/////////////////////////
|
||||
// IO and UMD buttons
|
||||
/////////////////////////
|
||||
|
||||
SetShiftButton(&Joystick, S4, &Throttle, BSF, BSB, 0);
|
||||
|
||||
|
||||
/////////////////////////
|
||||
/// AXIS MAPPINGS
|
||||
/////////////////////////
|
||||
|
||||
|
||||
///// X AXIS
|
||||
MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
|
||||
SetSCurve(&Joystick, JOYX, 0, 0, 0, 0, 0);
|
||||
|
||||
///// Y AXIS
|
||||
|
||||
MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
|
||||
SetSCurve(&Joystick, JOYY, 0, 0, 0, 0, 0);
|
||||
|
||||
|
||||
////// SCX (Jostick Skew Button)
|
||||
MapAxis(&Throttle, SCX, MOUSE_X_AXIS, AXIS_NORMAL, MAP_RELATIVE);
|
||||
SetSCurve(&Throttle, SCX, 0, 0, 0, 3, 0);
|
||||
|
||||
////// SCY (Jostick Skew Button)
|
||||
MapAxis(&Throttle, SCY, MOUSE_Y_AXIS, AXIS_REVERSED, MAP_RELATIVE);
|
||||
SetSCurve(&Throttle, SCY, 0, 0, 0, 3, 0);
|
||||
|
||||
|
||||
////// Throttle
|
||||
MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
|
||||
SetJCurve(&Throttle, THR_RIGHT, 38, 75);
|
||||
|
||||
MapAxis(&Throttle, THR_LEFT, 0, AXIS_NORMAL, MAP_ABSOLUTE);
|
||||
SetSCurve(&Throttle, THR_LEFT, 0, 0, 0, 0, 0);
|
||||
|
||||
MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
|
||||
SetSCurve(&Throttle, THR_FC, 0, 0, 0, 0, 0);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Key Mappings
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
////////////////////////////
|
||||
/// Main Layer Mappings (Dogfight Mode)
|
||||
////////////////////////////
|
||||
|
||||
MapKey(&Throttle, SPDB, SpaceBrake_Newtonian_Brake);
|
||||
MapKey(&Throttle, SPDF, Match_Target_Velocity_Toggle_On);
|
||||
MapKeyR(&Throttle, SPDF, Match_Target_Velocity_Toggle_Off); // On release button toggle break back
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//event handler
|
||||
int EventHandle(int type, alias o, int x)
|
||||
{
|
||||
//printf("%d", sizeof(&o));
|
||||
DefaultMapping(&o, x);
|
||||
|
||||
//add event handling code here
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
// Joystick:
|
||||
// TG1 = DX1
|
||||
// TG2 = DX6
|
||||
// S1 = DX5
|
||||
// S2 = DX2
|
||||
// S3 = DX3
|
||||
// S4 = DX4
|
||||
|
||||
// Trim Control
|
||||
// H1U = DXHATUP
|
||||
// H1D = DXHATDOWN
|
||||
// H1L = DXHATLEFT
|
||||
// H1R = DXHATRIGHT
|
||||
|
||||
// TMS
|
||||
// H2U = DX7
|
||||
// H2D = DX9
|
||||
// H2L = DX10
|
||||
// H2R = DX8
|
||||
|
||||
// DMS
|
||||
// H3U = DX11
|
||||
// H3D = DX13
|
||||
// H3L = DX14
|
||||
// H3R = DX12
|
||||
|
||||
// CMS
|
||||
// H4U = DX15
|
||||
// H4D = DX17
|
||||
// H4L = DX18
|
||||
// H4R = DX16
|
||||
// H4P (Hat4 pressed down) = DX19
|
||||
|
||||
// Throttle:
|
||||
// Slew Control
|
||||
// SC (slew control button pressed in) = DX1
|
||||
|
||||
// Mic Switch
|
||||
// MSP (mic switch button pressed in) = DX2
|
||||
// MSU = DX3
|
||||
// MSR = DX4
|
||||
// MSD = DX5
|
||||
// MSL = DX6
|
||||
|
||||
// Speedbrake Switch
|
||||
// SPDF = DX7
|
||||
// SPDB = DX8
|
||||
|
||||
// Boat Switch
|
||||
// BSF = DX9
|
||||
// BSB = DX10
|
||||
|
||||
// China Hat
|
||||
// CHF = DX11
|
||||
// CHB = DX12
|
||||
|
||||
// Pinky Switch
|
||||
// PSF = DX13
|
||||
// PSB = DX14
|
||||
|
||||
// Left Throttle Button
|
||||
// LTB = DX15
|
||||
|
||||
// Engine Fuel Flow Norm/Override Switches
|
||||
// EFLNORM = DX16
|
||||
// EFRNORM = DX17
|
||||
|
||||
// Engine Oper Motor/Norm Switches
|
||||
// EOLMOTOR = DX18
|
||||
// EORMOTOR = Dx19
|
||||
|
||||
// APU Start/Off Switch
|
||||
// APUON = DX20
|
||||
|
||||
// Landing Gear Warning Silence
|
||||
// LDGH = DX21
|
||||
|
||||
// Flaps
|
||||
// FLAPU = DX22
|
||||
// FLAPD = DX23
|
||||
|
||||
// EAC On/Off
|
||||
// EACON = DX24
|
||||
|
||||
// RDR/NORM
|
||||
// RDRNRM = DX25
|
||||
|
||||
// LAAP Autopilot Switches
|
||||
// APENG = DX26
|
||||
// APPAT = DX27
|
||||
// APALT = DX28
|
||||
|
||||
// Throttle Idle Detents
|
||||
// IDLERON = DX29
|
||||
// IDLELON = DX30
|
||||
|
||||
// Engine Oper Ign/Norm
|
||||
// EOLIGN = DX31
|
||||
// EORIGN = DX32
|
||||
|
||||
// Coolie Switch
|
||||
// CSU = DXHATUP
|
||||
// CSR = DXHATRIGHT
|
||||
// CSD = DXHATDOWN
|
||||
// CSL = DXHATLEFT
|
||||
|
||||
|
||||
// ----------------------- Flaying maneuvers ---------------- //
|
||||
|
||||
define SpaceBrake_Newtonian_Brake SPC //
|
||||
|
||||
define Match_Target_Velocity_Toggle_On PULSE+'m'
|
||||
define Match_Target_Velocity_Toggle_Off PULSE+'m' // On Button Release
|
||||
|
Loading…
Reference in New Issue