9#define GYRO_SENSITIVITY_DEFAULT 100
Maps a physical gyroscope to virtual gyro input values.
Definition ControllerGyroMapping.h:18
float GetSensitivity()
Returns the current sensitivity multiplier.
virtual void SaveToConfig()=0
Persists this mapping to the application configuration.
virtual std::string GetGyroMappingId()=0
Returns a unique string identifier for this gyro mapping.
void ResetSensitivityToDefault()
Resets the sensitivity to GYRO_SENSITIVITY_DEFAULT.
void SetPortIndex(uint8_t portIndex)
Sets the controller port index for this mapping.
void SetSensitivity(uint8_t sensitivityPercent)
Sets the gyro sensitivity from a percentage value.
virtual void EraseFromConfig()=0
Removes this mapping from the application configuration.
virtual void Recalibrate()=0
Recalibrates the gyroscope to establish a new neutral baseline.
uint8_t mPortIndex
Definition ControllerGyroMapping.h:85
virtual void UpdatePad(float &x, float &y)=0
Reads the physical gyroscope and updates the X and Y gyro values.
bool SensitivityIsDefault()
Checks whether the current sensitivity matches the default value.
virtual ~ControllerGyroMapping()
float mSensitivity
Definition ControllerGyroMapping.h:87
ControllerGyroMapping(PhysicalDeviceType physicalDeviceType, uint8_t portIndex, float sensitivity)
Constructs a ControllerGyroMapping.
uint8_t GetSensitivityPercent()
Returns the current sensitivity as a percentage of the default.
uint8_t mSensitivityPercent
Definition ControllerGyroMapping.h:86
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
PhysicalDeviceType
Identifies the category of a physical input device.
Definition PhysicalDeviceType.h:11