Calibration storage backend which can store multiple calibration items for different controllers.
More...
#include <inputdevicecalibration.h>
Calibration storage backend which can store multiple calibration items for different controllers.
◆ InputDeviceCalibration()
InputDeviceCalibration::InputDeviceCalibration |
( |
InputDevice * |
device | ) |
|
|
explicit |
◆ applyCalibrations()
void InputDeviceCalibration::applyCalibrations |
( |
| ) |
const |
Applies all applicable stored calibration values to the individual input elements of the parent controller.
◆ readConfig()
void InputDeviceCalibration::readConfig |
( |
QXmlStreamReader * |
xml | ) |
|
Reads all calibration values from the given XML stream into the internal calibration data storage.
- Parameters
-
QXmlStreamReader | instance that will be used to read calibration values. |
◆ setAccelerometerCalibration()
void InputDeviceCalibration::setAccelerometerCalibration |
( |
double |
orientationX, |
|
|
double |
orientationY, |
|
|
double |
orientationZ |
|
) |
| |
Updates the stored calibration for the given accelerometer from the parent controller.
- Parameters
-
[in] | orientationX | X coordinate of the neutral orientation vector |
[in] | orientationY | Y coordinate of the neutral orientation vector |
[in] | orientationZ | Z coordinate of the neutral orientation vector |
◆ setCalibration()
Updated the given CalibrationData structure of the controller with the given ID in the calibration storage backend.
- Parameters
-
[in] | id | ID of the device to which the calibration data belongs to |
[in] | new_calibration | The CalibrationData structure to be stored |
◆ setGyroscopeCalibration()
void InputDeviceCalibration::setGyroscopeCalibration |
( |
double |
offsetX, |
|
|
double |
offsetY, |
|
|
double |
offsetZ |
|
) |
| |
Updates the stored calibration for the given gyroscope from the parent controller.
- Parameters
-
[in] | offsetX | Offset value for X axis |
[in] | offsetY | Offset value for Y axis |
[in] | offsetZ | Offset value for Z axis |
◆ setStickCalibration()
void InputDeviceCalibration::setStickCalibration |
( |
int |
index, |
|
|
double |
offsetX, |
|
|
double |
gainX, |
|
|
double |
offsetY, |
|
|
double |
gainY |
|
) |
| |
Updates the stored calibration for the given stick from the parent controller.
- Parameters
-
[in] | index | Stick index |
[in] | offsetX | Offset value for X axis |
[in] | gainX | Gain value for X axis |
[in] | offsetY | Offset value for Y axis |
[in] | gainY | Gain value for Y axis |
◆ writeConfig()
void InputDeviceCalibration::writeConfig |
( |
QXmlStreamWriter * |
xml | ) |
const |
Writes all stored calibration values from the internal storage into the given XML stream.
- Parameters
-
QXmlStreamWriter | instance that will be used to write calibration values. |
◆ m_data
◆ m_device
The documentation for this class was generated from the following files: