diff --git a/Mappings.xml b/Mappings.xml new file mode 100644 index 0000000..e2f061d --- /dev/null +++ b/Mappings.xml @@ -0,0 +1,1156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StarCitizen.tmc b/StarCitizen.tmc index 4c989ef..73ded1d 100644 --- a/StarCitizen.tmc +++ b/StarCitizen.tmc @@ -2,11 +2,36 @@ include "target.tmh" include "StarCitizenMappings.tmh" - char DECOUPLED_MODE; char FAST_DECOUPLED; char LONG_DECOUPLED; + +int set_throttle_to_strafe() +{ + + int ZONES = LIST(0,40,45,50,55,60,100); + + KeyAxis(&Throttle, THR_RIGHT, 0, AXMAP2( + ZONES, + Strafe_Backward, + PULSE+Strafe_Backward, + 0, + 0, + PULSE+Strafe_Forward, + Strafe_Forward + ) + ); + return 0; +} + +int set_throttle_to_default() +{ + + KeyAxis(&Throttle, THR_RIGHT, 0, 0); + return 0; +} + //program startup int main() { @@ -59,12 +84,12 @@ int main() ////// SCX (Jostick Skew Button) - MapAxis(&Throttle, SCX, MOUSE_X_AXIS, AXIS_NORMAL, MAP_RELATIVE); - SetSCurve(&Throttle, SCX, 0, 10, 0, 0, -3); + //MapAxis(&Throttle, SCX, MOUSE_X_AXIS, AXIS_NORMAL, MAP_RELATIVE); + //SetSCurve(&Throttle, SCX, 0, 10, 0, 0, -3); ////// SCY (Jostick Skew Button) - MapAxis(&Throttle, SCY, MOUSE_Y_AXIS, AXIS_REVERSED, MAP_RELATIVE); - SetSCurve(&Throttle, SCY, 0, 10, 0, 0, -3); + //MapAxis(&Throttle, SCY, MOUSE_Y_AXIS, AXIS_REVERSED, MAP_RELATIVE); + //SetSCurve(&Throttle, SCY, 0, 10, 0, 0, -3); ////// Throttle @@ -115,7 +140,11 @@ int main() // DECOUPLED MODE /////////////////////////////////////// DECOUPLED_MODE = 0; - FAST_DECOUPLED = 0; + LONG_DECOUPLED = 0; + + + + MapKey(&Joystick, S4, TEMPO( /// On Short Press Toggle Fast Decoupled @@ -125,14 +154,16 @@ int main() "printf(\"Fast Decoupled Toggled\\xa\");" "DECOUPLED_MODE = 1;" "ActKey(KEYON+PULSE+Decoupled_Trigger);" - " ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1));" + "ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1));" + "set_throttle_to_strafe();" ), //// Stop FAST_DECOUPLED EXEC( "printf(\"Fast Decoupled Release\\xa\");" "DECOUPLED_MODE = 0;" "ActKey(KEYON+PULSE+Decoupled_Trigger);" - " ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1));" + "ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1));" + "set_throttle_to_default();" ) ), @@ -142,12 +173,14 @@ int main() EXEC( "DECOUPLED_MODE = 1;" "LONG_DECOUPLED = 1;" + "ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1));" "ActKey(KEYON+Decoupled_Trigger);" + //"set_throttle_to_strafe();" ), LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1) ), /// Tempo time - 100 + 200 ) ); @@ -159,10 +192,18 @@ int main() "if (LONG_DECOUPLED) ActKey(Decoupled_Trigger);" "if (LONG_DECOUPLED) ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1));" "if (LONG_DECOUPLED) LONG_DECOUPLED = 0;" + //"set_throttle_to_default();" ) ); + + + /////////////////////////////////////// + // END DECOUPLED MODE + /////////////////////////////////////// + + diff --git a/StarCitizenMappings.tmh b/StarCitizenMappings.tmh index 80050ba..217c6fd 100644 --- a/StarCitizenMappings.tmh +++ b/StarCitizenMappings.tmh @@ -126,6 +126,7 @@ define SpaceBrake_Newtonian_Brake SPC // define Match_Target_Velocity_Toggle_On PULSE+'m' define Match_Target_Velocity_Toggle_Off PULSE+'m' // On Button Release + define Decoupled_Trigger CAPS @@ -135,3 +136,7 @@ define Roll_Switch S3 /// Reverse Engine button define Reverse_Engine LTB + +define Strafe_Forward 'w' +define Strafe_Backward 's' +