include "target.tmh"
//program startup
int main()
{
Configure(&Joystick, MODE_EXCLUDED);
Configure(&LMFD, MODE_EXCLUDED);
Configure(&RMFD, MODE_EXCLUDED);
if(Init(&EventHandle)) return 1; // declare the event handler, return on error
//add initialization code here
MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS); SetCustomCurve(&Throttle, THR_LEFT, LIST(0,4, 65,90, 75,90, 100,100));//start at 5% & create a deadzone between 65% and 75% for AB
MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS); SetCustomCurve(&Throttle, THR_RIGHT, LIST(0,4, 65,90, 75,90, 100,100));//start at 5% & create a deadzone between 65% and 75% for AB
// Idle Cutoff Code
MapKey (&Throttle, IDLELON, EXEC("TrimDXAxis(DX_ZROT_AXIS, 90);"));
MapKeyR (&Throttle, IDLELON, EXEC("TrimDXAxis(DX_ZROT_AXIS, SET(0));"));
MapKey (&Throttle, IDLERON, EXEC("TrimDXAxis(DX_Z_AXIS, 90);"));
MapKeyR (&Throttle, IDLERON, EXEC("TrimDXAxis(DX_Z_AXIS, SET(0));"));
}
//event handler
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
//add event handling code here
}