Jump to content

T.A.R.G.E.T will not assign any axis to Coolie Hat but assigns DX buttons.


Recommended Posts

hi,

 

I wrote a script for Warthog and I wanted Coolie Hat Switch to handle axis.

However, this code assigns CoolieHat DX22-25 even though I never wrote to do so.

Could anyone correct my script?

 

include "target.tmh"

//program startup
int main()
{
   //RotateDXAxis(DX_X_AXIS, DX_Y_AXIS, -12);
   if(Init(&EventHandle)) return 1; // declare the event handler, return on error

//add initialization code here
MapAxis(&Joystick, JOYX, DX_X_AXIS);
MapAxis(&Joystick, JOYY, DX_Y_AXIS);
MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS);
MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS);
MapAxis(&Throttle, SCX, DX_XROT_AXIS);
MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_REVERSED);
//MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_REVERSED);
//MapAxis(&Throttle, THR_FC, DX_THROTTLE_AXIS);
//MapAxis(&Throttle, THR_FC, MOUSE_X_AXIS);
//MapAxis(&Throttle, THR_FC, MOUSE_Y_AXIS);

MapKey(&Joystick, TG1, DX1);
MapKey(&Joystick, S2, DX2);
MapKey(&Joystick, S3, DX3);
MapKey(&Joystick, S4, DX4);
MapKey(&Joystick, S1, DX5);
MapKey(&Joystick, TG2, DX6);

MapKey(&Joystick, H1U, DXHATUP);
MapKey(&Joystick, H1R, DXHATRIGHT);
MapKey(&Joystick, H1D, DXHATDOWN);
MapKey(&Joystick, H1L, DXHATLEFT);
//MapKey(&Joystick, H1L, REXEC(0, 100, "TrimDXAxis(DX_X_AXIS, -5);"));
//MapKey(&Joystick, H1R, REXEC(0, 100, "TrimDXAxis(DX_X_AXIS, 5);"));
//MapKey(&Joystick, H1U, REXEC(1, 100, "TrimDXAxis(DX_Y_AXIS, -5);"));
//MapKey(&Joystick, H1D, REXEC(1, 100, "TrimDXAxis(DX_Y_AXIS, 5);"));

MapKey(&Joystick, H2U, DX7);
MapKey(&Joystick, H2R, DX8);
MapKey(&Joystick, H2D, DX9);
MapKey(&Joystick, H2L, DX10);
MapKey(&Joystick, H3U, DX11);
MapKey(&Joystick, H3R, DX12);
MapKey(&Joystick, H3D, DX13);
MapKey(&Joystick, H3L, DX14);
MapKey(&Joystick, H4U, DX15);
MapKey(&Joystick, H4R, DX16);
MapKey(&Joystick, H4D, DX17);
MapKey(&Joystick, H4L, DX18);

MapKey(&Joystick, H4P, 0);
//MapKey(&Joystick, H4P, DX31);

MapKey(&Throttle, SC, DX19);

//MapKey(&Throttle, CSU, 0);
//MapKey(&Throttle, CSR, 0);
//MapKey(&Throttle, CSD, 0);
//MapKey(&Throttle, CSL, 0);

//MapKey(&Throttle, CSU, DX29);
//MapKey(&Throttle, CSD, DX30);
//MapKey(&Throttle, CSL, DX31);
//MapKey(&Throttle, CSR, DX32);

MapKey(&Joystick, CSD, AXIS(DX_SLIDER_AXIS, -80, 20));
MapKey(&Joystick, CSU, AXIS(DX_SLIDER_AXIS, 80, 20));
MapKey(&Joystick, CSL, AXIS(DX_THROTTLE_AXIS, -80, 20));
MapKey(&Joystick, CSR, AXIS(DX_THROTTLE_AXIS, 80, 20));

MapKey(&Throttle, MSR, DX20);
MapKey(&Throttle, MSD, DX21);
MapKey(&Throttle, MSU, DX22);
MapKey(&Throttle, MSL, DX23);

MapKey(&Throttle, MSP, 0);
//MapKey(&Throttle, MSP, DX32);

MapKey(&Throttle, LTB, DX24);
MapKey(&Throttle, BSB, DX25);
MapKey(&Throttle, BSM, 0);
MapKey(&Throttle, BSF, DX26);
MapKey(&Throttle, SPDB, DX27);
MapKey(&Throttle, SPDM, 0);
MapKey(&Throttle, SPDF, DX28);
MapKey(&Throttle, CHB, 0);
MapKey(&Throttle, CHF, 0);
MapKey(&Throttle, PSB, 0);
MapKey(&Throttle, PSF, 0);
}

//event handler
int EventHandle(int type, alias o, int x)
{
   DefaultMapping(&o, x);

//add event handling code here
}

Link to comment
Share on other sites

  • 2 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...