54#if OO_FOV_INFLIGHT_CONTROL_ENABLED
98#if OO_FOV_INFLIGHT_CONTROL_ENABLED
99 BUTTON_INC_FIELD_OF_VIEW,
100 BUTTON_DEC_FIELD_OF_VIEW,
127#define MAX_REAL_BUTTONS 64
129#define MAX_BUTTONS (MAX_REAL_BUTTONS + 4 * MAX_HATS)
130#define STICK_NOFUNCTION -1
131#define STICK_AXISUNASSIGNED -10.0
133#define STICK_PRECISIONFAC 3
134#define STICK_NORMALDIV 32768
135#define STICK_PRECISIONDIV (STICK_PRECISIONFAC * STICK_NORMALDIV)
137#define STICK_DEADZONE 0.05
139#define STICK_MAX_DEADZONE (STICK_DEADZONE * 2)
148#define AXCBTHRESH 20000
151#define AXIS_SETTINGS @"JoystickAxes"
152#define BUTTON_SETTINGS @"JoystickButs"
153#define GUI_BUTTON_SETTINGS @"GuiJoystickButs"
154#define STICK_ISAXIS @"isAxis"
155#define STICK_NUMBER @"stickNum"
156#define STICK_AXBUT @"stickAxBt"
157#define STICK_FUNCTION @"stickFunc"
158#define STICK_ROLL_AXIS_PROFILE_SETTING @"RollAxisProfile"
159#define STICK_PITCH_AXIS_PROFILE_SETTING @"PitchAxisProfile"
160#define STICK_YAW_AXIS_PROFILE_SETTING @"YawAxisProfile"
163#define ENUMKEY(x) [NSString stringWithFormat:@"%d", x]
191+ (id)sharedStickHandler;
192+ (BOOL)setStickHandlerClass:(Class)aClass;
202- (NSPoint)rollPitchAxis;
208- (void)setFunction:(
int)function withDict:(NSDictionary*)stickFn;
209- (void)unsetAxisFunction:(
int)function;
210- (void)unsetButtonFunction:(
int)function;
211- (void)unsetGuiButtonFunction:(
int)function;
216- (BOOL)isButtonDown:(
int)button stick:(
int)stickNum;
217- (BOOL)getButtonState:(
int)function;
218- (double)getAxisState:(
int)function;
219- (double)getSensitivity;
224- (void)saveProfileForAxis:(
int)axis;
225- (void)loadProfileForAxis:(
int)axis;
229- (const BOOL*)getAllButtonStates;
232- (NSArray*)listSticks;
236- (NSDictionary*)axisFunctions;
237- (NSDictionary*)buttonFunctions;
238- (NSDictionary*)guiButtonFunctions;
242- (void)setCallback:(
SEL)selector
244 hardware:(
char)hwflags;
245- (void)clearCallback;
248- (void)setDefaultMapping;
249- (void)clearMappings;
250- (void)clearStickStates;
251- (void)clearStickButtonState:(
int)stickButton;
252- (void)saveStickSettings;
253- (void)loadStickSettings;
256- (NSUInteger)joystickCount;
257- (NSString*)nameOfJoystick:(NSUInteger)stickNumber;
258- (int16_t)getAxisWithStick:(NSUInteger)stickNum axis:(NSUInteger)axisNum;
@ BUTTON_DOCKINGCLEARANCE
@ BUTTON_TARGETINCOMINGMISSILE
@ BUTTON_ACTIVATEEQUIPMENT
@ BUTTON_WEAPONSONLINETOGGLE
@ BUTTON_COMPASSMODE_PREV
@ BUTTON_PRIMEEQUIPMENT_PREV
uint8_t hatstate[MAX_STICKS][MAX_HATS]
OOJoystickAxisProfile * roll_profile
int8_t axismap[MAX_STICKS][MAX_AXES]
int8_t guibuttonmap[MAX_STICKS][MAX_BUTTONS]
OOJoystickAxisProfile * pitch_profile
BOOL butstate[BUTTON_end]
int8_t buttonmap[MAX_STICKS][MAX_BUTTONS]
OOJoystickAxisProfile * yaw_profile
BOOL true_butstate[MAX_STICKS][MAX_BUTTONS]