Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOJoystickManager.h File Reference
import "OOCocoa.h"
import "OOJoystickProfile.h"
+ Include dependency graph for OOJoystickManager.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  JoyAxisEvent
 
struct  JoyButtonEvent
 
struct  JoyHatEvent
 
class  OOJoystickManager
 

Macros

#define MAX_STICKS   4
 
#define MAX_AXES   16
 
#define MAX_REAL_BUTTONS   64
 
#define MAX_HATS   4
 
#define MAX_BUTTONS   (MAX_REAL_BUTTONS + 4 * MAX_HATS)
 
#define STICK_NOFUNCTION   -1
 
#define STICK_AXISUNASSIGNED   -10.0
 
#define STICK_PRECISIONFAC   3
 
#define STICK_NORMALDIV   32768
 
#define STICK_PRECISIONDIV   (STICK_PRECISIONFAC*STICK_NORMALDIV)
 
#define STICK_DEADZONE   0.0025
 
#define STICK_MAX_DEADZONE   (STICK_DEADZONE * 2)
 
#define HW_AXIS   1
 
#define HW_BUTTON   2
 
#define AXCBTHRESH   20000
 
#define AXIS_SETTINGS   @"JoystickAxes"
 
#define BUTTON_SETTINGS   @"JoystickButs"
 
#define STICK_ISAXIS   @"isAxis"
 
#define STICK_NUMBER   @"stickNum"
 
#define STICK_AXBUT   @"stickAxBt"
 
#define STICK_FUNCTION   @"stickFunc"
 
#define STICK_ROLL_AXIS_PROFILE_SETTING   @"RollAxisProfile"
 
#define STICK_PITCH_AXIS_PROFILE_SETTING   @"PitchAxisProfile"
 
#define STICK_YAW_AXIS_PROFILE_SETTING   @"YawAxisProfile"
 
#define ENUMKEY(x)
 

Enumerations

enum  {
  AXIS_ROLL , AXIS_PITCH , AXIS_YAW , AXIS_PRECISION ,
  AXIS_THRUST , AXIS_VIEWX , AXIS_VIEWY , AXIS_end
}
 
enum  {
  BUTTON_INCTHRUST , BUTTON_DECTHRUST , BUTTON_SCANNERZOOM , BUTTON_SCANNERUNZOOM ,
  BUTTON_JETTISON , BUTTON_COMPASSMODE , BUTTON_COMMSLOG , BUTTON_DOCKCPU ,
  BUTTON_DOCKCPUFAST , BUTTON_FUELINJECT , BUTTON_HYPERSPEED , BUTTON_HYPERDRIVE ,
  BUTTON_GALACTICDRIVE , BUTTON_FIRE , BUTTON_ARMMISSILE , BUTTON_LAUNCHMISSILE ,
  BUTTON_PRIMEEQUIPMENT , BUTTON_ACTIVATEEQUIPMENT , BUTTON_UNARM , BUTTON_TARGETINCOMINGMISSILE ,
  BUTTON_CYCLEMISSILE , BUTTON_ENERGYBOMB , BUTTON_WEAPONSONLINETOGGLE , BUTTON_ID ,
  BUTTON_ECM , BUTTON_ESCAPE , BUTTON_CLOAK , BUTTON_PRECISION ,
  BUTTON_VIEWFORWARD , BUTTON_VIEWAFT , BUTTON_VIEWPORT , BUTTON_VIEWSTARBOARD ,
  BUTTON_SNAPSHOT , BUTTON_PREVTARGET , BUTTON_NEXTTARGET , BUTTON_MODEEQUIPMENT ,
  BUTTON_DOCKINGCLEARANCE , BUTTON_COMPASSMODE_PREV , BUTTON_PRIMEEQUIPMENT_PREV , BUTTON_ROTATECARGO ,
  BUTTON_MFDSELECTNEXT , BUTTON_MFDSELECTPREV , BUTTON_MFDCYCLENEXT , BUTTON_MFDCYCLEPREV ,
  BUTTON_EXTVIEWCYCLE , BUTTON_DOCKINGMUSIC , BUTTON_PAUSE , BUTTON_TOGGLEHUD ,
  BUTTON_end
}
 
enum  {
  JOYAXISMOTION , JOYBUTTONDOWN , JOYBUTTONUP , JOYBUTTON_PRESSED ,
  JOYBUTTON_RELEASED , JOYHAT_MOTION , JOYHAT_CENTERED = 0x00 , JOYHAT_UP = 0x01 ,
  JOYHAT_RIGHT = 0x02 , JOYHAT_DOWN = 0x04 , JOYHAT_LEFT = 0x08 , JOYHAT_RIGHTUP = (JOYHAT_RIGHT|JOYHAT_UP) ,
  JOYHAT_RIGHTDOWN = (JOYHAT_RIGHT|JOYHAT_DOWN) , JOYHAT_LEFTUP = (JOYHAT_LEFT|JOYHAT_UP) , JOYHAT_LEFTDOWN = (JOYHAT_LEFT|JOYHAT_DOWN)
}
 

Macro Definition Documentation

◆ AXCBTHRESH

#define AXCBTHRESH   20000

Definition at line 145 of file OOJoystickManager.h.

◆ AXIS_SETTINGS

#define AXIS_SETTINGS   @"JoystickAxes"

Definition at line 148 of file OOJoystickManager.h.

◆ BUTTON_SETTINGS

#define BUTTON_SETTINGS   @"JoystickButs"

Definition at line 149 of file OOJoystickManager.h.

◆ ENUMKEY

#define ENUMKEY ( x)
Value:
[NSString stringWithFormat: @"%d", x]
float x

Definition at line 159 of file OOJoystickManager.h.

◆ HW_AXIS

#define HW_AXIS   1

Definition at line 140 of file OOJoystickManager.h.

◆ HW_BUTTON

#define HW_BUTTON   2

Definition at line 141 of file OOJoystickManager.h.

◆ MAX_AXES

#define MAX_AXES   16

Definition at line 118 of file OOJoystickManager.h.

◆ MAX_BUTTONS

#define MAX_BUTTONS   (MAX_REAL_BUTTONS + 4 * MAX_HATS)

Definition at line 121 of file OOJoystickManager.h.

◆ MAX_HATS

#define MAX_HATS   4

Definition at line 120 of file OOJoystickManager.h.

◆ MAX_REAL_BUTTONS

#define MAX_REAL_BUTTONS   64

Definition at line 119 of file OOJoystickManager.h.

◆ MAX_STICKS

#define MAX_STICKS   4

Definition at line 117 of file OOJoystickManager.h.

◆ STICK_AXBUT

#define STICK_AXBUT   @"stickAxBt"

Definition at line 152 of file OOJoystickManager.h.

◆ STICK_AXISUNASSIGNED

#define STICK_AXISUNASSIGNED   -10.0

Definition at line 123 of file OOJoystickManager.h.

◆ STICK_DEADZONE

#define STICK_DEADZONE   0.0025

Definition at line 130 of file OOJoystickManager.h.

◆ STICK_FUNCTION

#define STICK_FUNCTION   @"stickFunc"

Definition at line 153 of file OOJoystickManager.h.

◆ STICK_ISAXIS

#define STICK_ISAXIS   @"isAxis"

Definition at line 150 of file OOJoystickManager.h.

◆ STICK_MAX_DEADZONE

#define STICK_MAX_DEADZONE   (STICK_DEADZONE * 2)

Definition at line 135 of file OOJoystickManager.h.

◆ STICK_NOFUNCTION

#define STICK_NOFUNCTION   -1

Definition at line 122 of file OOJoystickManager.h.

◆ STICK_NORMALDIV

#define STICK_NORMALDIV   32768

Definition at line 126 of file OOJoystickManager.h.

◆ STICK_NUMBER

#define STICK_NUMBER   @"stickNum"

Definition at line 151 of file OOJoystickManager.h.

◆ STICK_PITCH_AXIS_PROFILE_SETTING

#define STICK_PITCH_AXIS_PROFILE_SETTING   @"PitchAxisProfile"

Definition at line 155 of file OOJoystickManager.h.

◆ STICK_PRECISIONDIV

#define STICK_PRECISIONDIV   (STICK_PRECISIONFAC*STICK_NORMALDIV)

Definition at line 127 of file OOJoystickManager.h.

◆ STICK_PRECISIONFAC

#define STICK_PRECISIONFAC   3

Definition at line 125 of file OOJoystickManager.h.

◆ STICK_ROLL_AXIS_PROFILE_SETTING

#define STICK_ROLL_AXIS_PROFILE_SETTING   @"RollAxisProfile"

Definition at line 154 of file OOJoystickManager.h.

◆ STICK_YAW_AXIS_PROFILE_SETTING

#define STICK_YAW_AXIS_PROFILE_SETTING   @"YawAxisProfile"

Definition at line 156 of file OOJoystickManager.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
AXIS_ROLL 
AXIS_PITCH 
AXIS_YAW 
AXIS_PRECISION 
AXIS_THRUST 
AXIS_VIEWX 
AXIS_VIEWY 
AXIS_end 

Definition at line 45 of file OOJoystickManager.h.

45 {
53#if OO_FOV_INFLIGHT_CONTROL_ENABLED
54 AXIS_FIELD_OF_VIEW,
55#endif
57};
@ AXIS_VIEWX
@ AXIS_PITCH
@ AXIS_YAW
@ AXIS_end
@ AXIS_THRUST
@ AXIS_ROLL
@ AXIS_PRECISION
@ AXIS_VIEWY

◆ anonymous enum

anonymous enum
Enumerator
BUTTON_INCTHRUST 
BUTTON_DECTHRUST 
BUTTON_SCANNERZOOM 
BUTTON_SCANNERUNZOOM 
BUTTON_JETTISON 
BUTTON_COMPASSMODE 
BUTTON_COMMSLOG 
BUTTON_DOCKCPU 
BUTTON_DOCKCPUFAST 
BUTTON_FUELINJECT 
BUTTON_HYPERSPEED 
BUTTON_HYPERDRIVE 
BUTTON_GALACTICDRIVE 
BUTTON_FIRE 
BUTTON_ARMMISSILE 
BUTTON_LAUNCHMISSILE 
BUTTON_PRIMEEQUIPMENT 
BUTTON_ACTIVATEEQUIPMENT 
BUTTON_UNARM 
BUTTON_TARGETINCOMINGMISSILE 
BUTTON_CYCLEMISSILE 
BUTTON_ENERGYBOMB 
BUTTON_WEAPONSONLINETOGGLE 
BUTTON_ID 
BUTTON_ECM 
BUTTON_ESCAPE 
BUTTON_CLOAK 
BUTTON_PRECISION 
BUTTON_VIEWFORWARD 
BUTTON_VIEWAFT 
BUTTON_VIEWPORT 
BUTTON_VIEWSTARBOARD 
BUTTON_SNAPSHOT 
BUTTON_PREVTARGET 
BUTTON_NEXTTARGET 
BUTTON_MODEEQUIPMENT 
BUTTON_DOCKINGCLEARANCE 
BUTTON_COMPASSMODE_PREV 
BUTTON_PRIMEEQUIPMENT_PREV 
BUTTON_ROTATECARGO 
BUTTON_MFDSELECTNEXT 
BUTTON_MFDSELECTPREV 
BUTTON_MFDCYCLENEXT 
BUTTON_MFDCYCLEPREV 
BUTTON_EXTVIEWCYCLE 
BUTTON_DOCKINGMUSIC 
BUTTON_PAUSE 
BUTTON_TOGGLEHUD 
BUTTON_end 

Definition at line 60 of file OOJoystickManager.h.

60 {
82 BUTTON_ENERGYBOMB, // now fast activate B
87 BUTTON_CLOAK, // now fast activate A
97#if OO_FOV_INFLIGHT_CONTROL_ENABLED
98 BUTTON_INC_FIELD_OF_VIEW,
99 BUTTON_DEC_FIELD_OF_VIEW,
100#endif
114};
@ BUTTON_MFDSELECTNEXT
@ BUTTON_DOCKINGCLEARANCE
@ BUTTON_end
@ BUTTON_LAUNCHMISSILE
@ BUTTON_DOCKINGMUSIC
@ BUTTON_FUELINJECT
@ BUTTON_ENERGYBOMB
@ BUTTON_TARGETINCOMINGMISSILE
@ BUTTON_PRIMEEQUIPMENT
@ BUTTON_COMPASSMODE
@ BUTTON_ROTATECARGO
@ BUTTON_VIEWSTARBOARD
@ BUTTON_VIEWAFT
@ BUTTON_GALACTICDRIVE
@ BUTTON_MFDCYCLENEXT
@ BUTTON_MFDCYCLEPREV
@ BUTTON_ARMMISSILE
@ BUTTON_HYPERDRIVE
@ BUTTON_ACTIVATEEQUIPMENT
@ BUTTON_CLOAK
@ BUTTON_NEXTTARGET
@ BUTTON_FIRE
@ BUTTON_UNARM
@ BUTTON_CYCLEMISSILE
@ BUTTON_VIEWPORT
@ BUTTON_SNAPSHOT
@ BUTTON_DOCKCPU
@ BUTTON_HYPERSPEED
@ BUTTON_ESCAPE
@ BUTTON_JETTISON
@ BUTTON_SCANNERUNZOOM
@ BUTTON_PRECISION
@ BUTTON_MODEEQUIPMENT
@ BUTTON_VIEWFORWARD
@ BUTTON_WEAPONSONLINETOGGLE
@ BUTTON_EXTVIEWCYCLE
@ BUTTON_COMMSLOG
@ BUTTON_INCTHRUST
@ BUTTON_SCANNERZOOM
@ BUTTON_ID
@ BUTTON_ECM
@ BUTTON_COMPASSMODE_PREV
@ BUTTON_TOGGLEHUD
@ BUTTON_DOCKCPUFAST
@ BUTTON_PREVTARGET
@ BUTTON_DECTHRUST
@ BUTTON_PRIMEEQUIPMENT_PREV
@ BUTTON_PAUSE
@ BUTTON_MFDSELECTPREV

◆ anonymous enum

anonymous enum
Enumerator
JOYAXISMOTION 
JOYBUTTONDOWN 
JOYBUTTONUP 
JOYBUTTON_PRESSED 
JOYBUTTON_RELEASED 
JOYHAT_MOTION 
JOYHAT_CENTERED 
JOYHAT_UP 
JOYHAT_RIGHT 
JOYHAT_DOWN 
JOYHAT_LEFT 
JOYHAT_RIGHTUP 
JOYHAT_RIGHTDOWN 
JOYHAT_LEFTUP 
JOYHAT_LEFTDOWN 

Definition at line 195 of file OOJoystickManager.h.

196{
203
204 JOYHAT_CENTERED = 0x00,
205 JOYHAT_UP = 0x01,
206 JOYHAT_RIGHT = 0x02,
207 JOYHAT_DOWN = 0x04,
208 JOYHAT_LEFT = 0x08,
213};
@ JOYHAT_MOTION
@ JOYBUTTON_RELEASED
@ JOYHAT_DOWN
@ JOYHAT_LEFTDOWN
@ JOYHAT_RIGHTUP
@ JOYHAT_RIGHT
@ JOYHAT_LEFT
@ JOYHAT_LEFTUP
@ JOYHAT_RIGHTDOWN
@ JOYBUTTON_PRESSED
@ JOYBUTTONUP
@ JOYHAT_CENTERED
@ JOYAXISMOTION
@ JOYBUTTONDOWN
@ JOYHAT_UP