AntiMicroX
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Slots
JoySensor Class Referenceabstract

Represents one sensor in a SetJoystick and its connections to other parts of the application. Receives hardware input events from InputDaemon, processes them and generates GUI as well as Mouse+Keyboard events. More...

#include <joysensor.h>

Inheritance diagram for JoySensor:
[legend]
Collaboration diagram for JoySensor:
[legend]

Public Slots

virtual void reset ()
 Resets internal variables back to default. More...
 
void setDeadZone (double value)
 Sets the dead zone of the sensor to the given value. More...
 
void setMaxZone (double value)
 Sets the maximum zone of the sensor to the given value. More...
 
void setDiagonalRange (double value)
 Set the diagonal range value for a sensor. More...
 
void setSensorDelay (unsigned int value)
 Sets the sensor input delaqy to the given value. More...
 
void setSensorName (QString tempName)
 Sets the name of this sensor. More...
 
void establishPropertyUpdatedConnection ()
 

Signals

void moved (float xaxis, float yaxis, float zaxis)
 
void active (float xaxis, float yaxis, float zaxis)
 
void released (float xaxis, float yaxis, float zaxis)
 
void deadZoneChanged (double value)
 
void diagonalRangeChanged (double value)
 
void maxZoneChanged (double value)
 
void sensorDelayChanged (int value)
 
void sensorNameChanged ()
 
void propertyUpdated ()
 

Public Member Functions

 JoySensor (JoySensorType type, int originset, SetJoystick *parent_set, QObject *parent)
 
virtual ~JoySensor ()
 
void joyEvent (float *values, bool ignoresets=false)
 Main sensor mapping function. When activated, it generates a "moved" QT event which updates various parts of the UI. Furthermore, it controls the sensor delay timer and calculates the current sensor direction and generates "active" and "released" QT events which enable/disable button highlights in the GUI. Finally, it calls createDeskEvent if the active/released button state has changed. More...
 
void queuePendingEvent (float *values, bool ignoresets=false)
 Queues next movement event from InputDaemon. More...
 
void activatePendingEvent ()
 Activates previously queued movement event This is called by InputDevice. More...
 
bool hasPendingEvent () const
 Checks if an event is queued. More...
 
void clearPendingEvent ()
 Clears a previously queued event. More...
 
void copyAssignments (JoySensor *dest_sensor)
 Copy slots from all sensor buttons and properties from a sensor onto another. More...
 
bool hasSlotsAssigned () const
 Check if any direction is mapped to a keyboard or mouse event. More...
 
QString getPartialName (bool forceFullFormat=false, bool displayNames=false) const
 Get the name of this sensor. More...
 
QString getSensorName () const
 Returns the sensor name. More...
 
JoySensorType getType () const
 Returns the sensor type. More...
 
JoySensorDirection getCurrentDirection () const
 Returns the current sensor direction. More...
 
double getDeadZone () const
 Get the assigned dead zone value. More...
 
double getDiagonalRange () const
 Get the assigned diagonal range value. More...
 
double getMaxZone () const
 Get the assigned max zone value. More...
 
unsigned int getSensorDelay () const
 Get the assigned input delay. More...
 
virtual float getXCoordinate () const =0
 
virtual float getYCoordinate () const =0
 
virtual float getZCoordinate () const =0
 
virtual QString sensorTypeName () const =0
 
bool inDeadZone (float *values) const
 Checks if the sensor vector is currently in the dead zone. More...
 
double getDistanceFromDeadZone () const
 Get current radial distance of the sensor past the assigned dead zone. More...
 
double getDistanceFromDeadZone (double x, double y, double z) const
 Get radial distance of the sensor past the assigned dead zone based on the passed X, Y and Z axes values associated with the sensor. More...
 
double calculateXDistanceFromDeadZone () const
 Get current X distance of the sensor past the assigned dead zone. More...
 
double calculateXDistanceFromDeadZone (double x, double y, double z) const
 Get current X distance of the sensor past the assigned dead zone based on the passed X, Y and Z axes values associated with the sensor. The algorithm checks if an axis parallel line through the current sensor position intersects with the dead zone sphere and subtracts the line segment within the sphere from the distance. The resulting value is not normalized because there is no practical maximum value for a sensor as you can always move it a bit faster. More...
 
double calculateYDistanceFromDeadZone () const
 Get current Y distance of the sensor past the assigned dead zone. More...
 
double calculateYDistanceFromDeadZone (double x, double y, double z) const
 Get current Y distance of the sensor past the assigned dead zone based on the passed X, Y and Z axes values associated with the sensor. The algorithm checks if an axis parallel line through the current sensor position intersects with the dead zone sphere and subtracts the line segment within the sphere from the distance. The resulting value is not normalized because there is no practical maximum value for a sensor as you can always move it a bit faster. More...
 
double calculateZDistanceFromDeadZone () const
 Get current Z distance of the sensor past the assigned dead zone. More...
 
double calculateZDistanceFromDeadZone (double x, double y, double z) const
 Get current Z distance of the sensor past the assigned dead zone based on the passed X, Y and Z axes values associated with the sensor. The algorithm checks if an axis parallel line through the current sensor position intersects with the dead zone sphere and subtracts the line segment within the sphere from the distance. The resulting value is not normalized because there is no practical maximum value for a sensor as you can always move it a bit faster. More...
 
double calculateDistance () const
 Get the vector length of the sensor. More...
 
double calculateDistance (double x, double y, double z) const
 Get the vector length of the sensor based on the passed X, Y and Z axes values associated with the sensor. More...
 
double calculatePitch () const
 Calculate the pitch angle (in degrees) corresponding to the current position of controller. More...
 
double calculatePitch (double x, double y, double z) const
 Calculate the pitch angle (in degrees) corresponding to the current passed X, Y and Z axes values associated with the sensor. position of controller. See https://www.nxp.com/files-static/sensors/doc/app_note/AN3461.pdf for a description of the used algorithm. More...
 
double calculateRoll () const
 Calculate the roll angle (in degrees) corresponding to the current position of controller. More...
 
double calculateRoll (double x, double y, double z) const
 Calculate the roll angle (in degrees) corresponding to the current passed X, Y and Z axes values associated with the sensor. position of controller. See https://www.nxp.com/files-static/sensors/doc/app_note/AN3461.pdf for a description of the used algorithm. More...
 
double calculateDirectionalDistance (JoySensorDirection direction) const
 Used to calculate the distance value that should be used by the JoyButton in the given direction. More...
 
bool isCalibrated () const
 Check if the sensor is calibrated. More...
 
void resetCalibration ()
 Resets the calibration of the sensor back to uncalibrated state. More...
 
virtual void getCalibration (double *offsetX, double *offsetY, double *offsetZ) const =0
 
virtual void setCalibration (double offsetX, double offsetY, double offsetZ)=0
 
QHash< JoySensorDirection, JoySensorButton * > * getButtons ()
 Returns a QHash which maps the SensorDirection to the corresponding JoySensorButton. More...
 
JoySensorButtongetDirectionButton (JoySensorDirection direction)
 Get a pointer to the sensor direction button for the desired direction. More...
 
bool isDefault () const
 Checks if all sensor settings and button mappings are the their default values. This is used during XML serialization to skip unnecessary objects. More...
 
void readConfig (QXmlStreamReader *xml)
 Take a XML stream and set the sensor and direction button properties according to the values contained within the stream. More...
 
void writeConfig (QXmlStreamWriter *xml) const
 Write the status of the properties of a sensor and direction buttons to an XML stream. More...
 
SetJoystickgetParentSet () const
 Get pointer to the set that a sensor belongs to. More...
 

Static Public Member Functions

static double radToDeg (double value)
 Utility function which converts a given value from radians to degree. More...
 
static double degToRad (double value)
 Utility function which converts a given value from degree to radians. More...
 

Protected Member Functions

void resetButtons ()
 Reset all the properties of the sensor direction buttons. More...
 
virtual void populateButtons ()=0
 
virtual JoySensorDirection calculateSensorDirection ()=0
 
virtual void applyCalibration ()=0
 
void determineSensorEvent (JoySensorButton **eventbutton) const
 Set buttons for current sensor direction zone. More...
 
void createDeskEvent (JoySensorDirection direction, bool ignoresets=false)
 Find the position of the three sensor axes, deactivate no longer used sensor direction button and then activate direction buttons for new direction. More...
 

Protected Attributes

JoySensorType m_type
 
double m_dead_zone
 
double m_diagonal_range
 
double m_max_zone
 
unsigned int m_sensor_delay
 
bool m_active
 
JoySensorButtonm_active_button [ACTIVE_BUTTON_COUNT]
 
float m_current_value [3]
 
float m_pending_value [3]
 
bool m_calibrated
 
double m_calibration_value [3]
 
bool m_pending_event
 
bool m_pending_ignore_sets
 
int m_originset
 
QString m_sensor_name
 
QTimer m_delay_timer
 
JoySensorDirection m_current_direction
 
SetJoystickm_parent_set
 
QHash< JoySensorDirection, JoySensorButton * > m_buttons
 

Static Protected Attributes

static const size_t ACTIVE_BUTTON_COUNT = 3
 

Private Slots

void delayTimerExpired ()
 Slot called when m_delay_timer has timed out. The method will call createDeskEvent. More...
 

Detailed Description

Represents one sensor in a SetJoystick and its connections to other parts of the application. Receives hardware input events from InputDaemon, processes them and generates GUI as well as Mouse+Keyboard events.

Constructor & Destructor Documentation

◆ JoySensor()

JoySensor::JoySensor ( JoySensorType  type,
int  originset,
SetJoystick parent_set,
QObject *  parent 
)
explicit
Here is the call graph for this function:

◆ ~JoySensor()

JoySensor::~JoySensor ( )
virtual

Member Function Documentation

◆ activatePendingEvent()

void JoySensor::activatePendingEvent ( )

Activates previously queued movement event This is called by InputDevice.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ active

void JoySensor::active ( float  xaxis,
float  yaxis,
float  zaxis 
)
signal
Here is the caller graph for this function:

◆ applyCalibration()

virtual void JoySensor::applyCalibration ( )
protectedpure virtual

Implemented in JoyAccelerometerSensor, and JoyGyroscopeSensor.

Here is the caller graph for this function:

◆ calculateDirectionalDistance()

double JoySensor::calculateDirectionalDistance ( JoySensorDirection  direction) const

Used to calculate the distance value that should be used by the JoyButton in the given direction.

Parameters
direction
Returns
Distance factor that should be used by JoySensorButton
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateDistance() [1/2]

double JoySensor::calculateDistance ( ) const

Get the vector length of the sensor.

Returns
Vector length
Here is the caller graph for this function:

◆ calculateDistance() [2/2]

double JoySensor::calculateDistance ( double  x,
double  y,
double  z 
) const

Get the vector length of the sensor based on the passed X, Y and Z axes values associated with the sensor.

Returns
Vector length

◆ calculatePitch() [1/2]

double JoySensor::calculatePitch ( ) const

Calculate the pitch angle (in degrees) corresponding to the current position of controller.

Returns
Pitch (in degrees)
Here is the caller graph for this function:

◆ calculatePitch() [2/2]

double JoySensor::calculatePitch ( double  x,
double  y,
double  z 
) const

Calculate the pitch angle (in degrees) corresponding to the current passed X, Y and Z axes values associated with the sensor. position of controller. See https://www.nxp.com/files-static/sensors/doc/app_note/AN3461.pdf for a description of the used algorithm.

Parameters
Xaxis value
Yaxis value
Zaxis value
Returns
Pitch (in degrees)
Here is the call graph for this function:

◆ calculateRoll() [1/2]

double JoySensor::calculateRoll ( ) const

Calculate the roll angle (in degrees) corresponding to the current position of controller.

Returns
Roll (in degrees)
Here is the caller graph for this function:

◆ calculateRoll() [2/2]

double JoySensor::calculateRoll ( double  x,
double  y,
double  z 
) const

Calculate the roll angle (in degrees) corresponding to the current passed X, Y and Z axes values associated with the sensor. position of controller. See https://www.nxp.com/files-static/sensors/doc/app_note/AN3461.pdf for a description of the used algorithm.

Parameters
Xaxis value
Yaxis value
Zaxis value
Returns
Roll (in degrees)
Here is the call graph for this function:

◆ calculateSensorDirection()

virtual JoySensorDirection JoySensor::calculateSensorDirection ( )
protectedpure virtual

Implemented in JoyAccelerometerSensor, and JoyGyroscopeSensor.

Here is the caller graph for this function:

◆ calculateXDistanceFromDeadZone() [1/2]

double JoySensor::calculateXDistanceFromDeadZone ( ) const

Get current X distance of the sensor past the assigned dead zone.

Returns
Distance between 0 and max zone in radiants.
Here is the caller graph for this function:

◆ calculateXDistanceFromDeadZone() [2/2]

double JoySensor::calculateXDistanceFromDeadZone ( double  x,
double  y,
double  z 
) const

Get current X distance of the sensor past the assigned dead zone based on the passed X, Y and Z axes values associated with the sensor. The algorithm checks if an axis parallel line through the current sensor position intersects with the dead zone sphere and subtracts the line segment within the sphere from the distance. The resulting value is not normalized because there is no practical maximum value for a sensor as you can always move it a bit faster.

Parameters
Xaxis value
Yaxis value
Zaxis value
Returns
Distance between 0 and max zone in radiants.

◆ calculateYDistanceFromDeadZone() [1/2]

double JoySensor::calculateYDistanceFromDeadZone ( ) const

Get current Y distance of the sensor past the assigned dead zone.

Returns
Distance between 0 and max zone in radiants.
Here is the caller graph for this function:

◆ calculateYDistanceFromDeadZone() [2/2]

double JoySensor::calculateYDistanceFromDeadZone ( double  x,
double  y,
double  z 
) const

Get current Y distance of the sensor past the assigned dead zone based on the passed X, Y and Z axes values associated with the sensor. The algorithm checks if an axis parallel line through the current sensor position intersects with the dead zone sphere and subtracts the line segment within the sphere from the distance. The resulting value is not normalized because there is no practical maximum value for a sensor as you can always move it a bit faster.

Parameters
Xaxis value
Yaxis value
Zaxis value
Returns
Distance between 0 and max zone in radiants.

◆ calculateZDistanceFromDeadZone() [1/2]

double JoySensor::calculateZDistanceFromDeadZone ( ) const

Get current Z distance of the sensor past the assigned dead zone.

Returns
Distance between 0 and max zone in radiants.
Here is the caller graph for this function:

◆ calculateZDistanceFromDeadZone() [2/2]

double JoySensor::calculateZDistanceFromDeadZone ( double  x,
double  y,
double  z 
) const

Get current Z distance of the sensor past the assigned dead zone based on the passed X, Y and Z axes values associated with the sensor. The algorithm checks if an axis parallel line through the current sensor position intersects with the dead zone sphere and subtracts the line segment within the sphere from the distance. The resulting value is not normalized because there is no practical maximum value for a sensor as you can always move it a bit faster.

Parameters
Xaxis value
Yaxis value
Zaxis value
Returns
Distance between 0 and max zone in radiants.

◆ clearPendingEvent()

void JoySensor::clearPendingEvent ( )

Clears a previously queued event.

Here is the caller graph for this function:

◆ copyAssignments()

void JoySensor::copyAssignments ( JoySensor dest_sensor)

Copy slots from all sensor buttons and properties from a sensor onto another.

Parameters
JoySensorobject to be modified.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createDeskEvent()

void JoySensor::createDeskEvent ( JoySensorDirection  direction,
bool  ignoresets = false 
)
protected

Find the position of the three sensor axes, deactivate no longer used sensor direction button and then activate direction buttons for new direction.

Parameters
Shouldset changing operations be ignored. Necessary in the middle of a set change.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deadZoneChanged

void JoySensor::deadZoneChanged ( double  value)
signal
Here is the caller graph for this function:

◆ degToRad()

double JoySensor::degToRad ( double  value)
static

Utility function which converts a given value from degree to radians.

Here is the caller graph for this function:

◆ delayTimerExpired

void JoySensor::delayTimerExpired ( )
privateslot

Slot called when m_delay_timer has timed out. The method will call createDeskEvent.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ determineSensorEvent()

void JoySensor::determineSensorEvent ( JoySensorButton **  eventbutton) const
protected

Set buttons for current sensor direction zone.

Parameters
Pointerto an array of three JoySensorButton pointers in which the results are stored.
Here is the caller graph for this function:

◆ diagonalRangeChanged

void JoySensor::diagonalRangeChanged ( double  value)
signal
Here is the caller graph for this function:

◆ establishPropertyUpdatedConnection

void JoySensor::establishPropertyUpdatedConnection ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getButtons()

QHash< JoySensorDirection, JoySensorButton * > * JoySensor::getButtons ( )

Returns a QHash which maps the SensorDirection to the corresponding JoySensorButton.

Here is the caller graph for this function:

◆ getCalibration()

virtual void JoySensor::getCalibration ( double *  offsetX,
double *  offsetY,
double *  offsetZ 
) const
pure virtual

Implemented in JoyAccelerometerSensor, and JoyGyroscopeSensor.

Here is the caller graph for this function:

◆ getCurrentDirection()

JoySensorDirection JoySensor::getCurrentDirection ( ) const

Returns the current sensor direction.

Here is the caller graph for this function:

◆ getDeadZone()

double JoySensor::getDeadZone ( ) const

Get the assigned dead zone value.

Returns
Assigned dead zone value in degree or degree/s
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDiagonalRange()

double JoySensor::getDiagonalRange ( ) const

Get the assigned diagonal range value.

Returns
Assigned diagonal range in degree or degree/s
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDirectionButton()

JoySensorButton * JoySensor::getDirectionButton ( JoySensorDirection  direction)

Get a pointer to the sensor direction button for the desired direction.

Parameters
Valueof the direction of the sensor.
Returns
Pointer to the sensor direction button for the sensor direction.
Here is the caller graph for this function:

◆ getDistanceFromDeadZone() [1/2]

double JoySensor::getDistanceFromDeadZone ( ) const

Get current radial distance of the sensor past the assigned dead zone.

Returns
Distance between 0 and max zone in radiants.
Here is the caller graph for this function:

◆ getDistanceFromDeadZone() [2/2]

double JoySensor::getDistanceFromDeadZone ( double  x,
double  y,
double  z 
) const

Get radial distance of the sensor past the assigned dead zone based on the passed X, Y and Z axes values associated with the sensor.

Parameters
Xaxis value
Yaxis value
Zaxis value
Returns
Distance between 0 and max zone in radiants.
Here is the call graph for this function:

◆ getMaxZone()

double JoySensor::getMaxZone ( ) const

Get the assigned max zone value.

Returns
Assigned max zone value in degree or degree/s
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParentSet()

SetJoystick * JoySensor::getParentSet ( ) const

Get pointer to the set that a sensor belongs to.

Returns
Pointer to the set that a sensor belongs to.
Here is the caller graph for this function:

◆ getPartialName()

QString JoySensor::getPartialName ( bool  forceFullFormat = false,
bool  displayNames = false 
) const

Get the name of this sensor.

Returns
Sensor name
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSensorDelay()

unsigned int JoySensor::getSensorDelay ( ) const

Get the assigned input delay.

Returns
Input delay in ms
Here is the caller graph for this function:

◆ getSensorName()

QString JoySensor::getSensorName ( ) const

Returns the sensor name.

Here is the caller graph for this function:

◆ getType()

JoySensorType JoySensor::getType ( ) const

Returns the sensor type.

Here is the caller graph for this function:

◆ getXCoordinate()

virtual float JoySensor::getXCoordinate ( ) const
pure virtual

Implemented in JoyAccelerometerSensor, and JoyGyroscopeSensor.

Here is the caller graph for this function:

◆ getYCoordinate()

virtual float JoySensor::getYCoordinate ( ) const
pure virtual

Implemented in JoyAccelerometerSensor, and JoyGyroscopeSensor.

Here is the caller graph for this function:

◆ getZCoordinate()

virtual float JoySensor::getZCoordinate ( ) const
pure virtual

Implemented in JoyAccelerometerSensor, and JoyGyroscopeSensor.

Here is the caller graph for this function:

◆ hasPendingEvent()

bool JoySensor::hasPendingEvent ( ) const

Checks if an event is queued.

Returns
True if an event is queued, false otherwise.
Here is the caller graph for this function:

◆ hasSlotsAssigned()

bool JoySensor::hasSlotsAssigned ( ) const

Check if any direction is mapped to a keyboard or mouse event.

Returns
True if a mapping exists, false otherwise
Here is the caller graph for this function:

◆ inDeadZone()

bool JoySensor::inDeadZone ( float *  values) const

Checks if the sensor vector is currently in the dead zone.

Returns
True if it is in the dead zone, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCalibrated()

bool JoySensor::isCalibrated ( ) const

Check if the sensor is calibrated.

Returns
True if it is calibrated, false otherwise.
Here is the caller graph for this function:

◆ isDefault()

bool JoySensor::isDefault ( ) const

Checks if all sensor settings and button mappings are the their default values. This is used during XML serialization to skip unnecessary objects.

Returns
True if everything is at the default, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ joyEvent()

void JoySensor::joyEvent ( float *  values,
bool  ignoresets = false 
)

Main sensor mapping function. When activated, it generates a "moved" QT event which updates various parts of the UI. Furthermore, it controls the sensor delay timer and calculates the current sensor direction and generates "active" and "released" QT events which enable/disable button highlights in the GUI. Finally, it calls createDeskEvent if the active/released button state has changed.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ maxZoneChanged

void JoySensor::maxZoneChanged ( double  value)
signal
Here is the caller graph for this function:

◆ moved

void JoySensor::moved ( float  xaxis,
float  yaxis,
float  zaxis 
)
signal
Here is the caller graph for this function:

◆ populateButtons()

virtual void JoySensor::populateButtons ( )
protectedpure virtual

◆ propertyUpdated

void JoySensor::propertyUpdated ( )
signal
Here is the caller graph for this function:

◆ queuePendingEvent()

void JoySensor::queuePendingEvent ( float *  values,
bool  ignoresets = false 
)

Queues next movement event from InputDaemon.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ radToDeg()

double JoySensor::radToDeg ( double  value)
static

Utility function which converts a given value from radians to degree.

Here is the caller graph for this function:

◆ readConfig()

void JoySensor::readConfig ( QXmlStreamReader *  xml)

Take a XML stream and set the sensor and direction button properties according to the values contained within the stream.

Parameters
QXmlStreamReaderinstance that will be used to read property values.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ released

void JoySensor::released ( float  xaxis,
float  yaxis,
float  zaxis 
)
signal
Here is the caller graph for this function:

◆ reset

void JoySensor::reset ( )
virtualslot

Resets internal variables back to default.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetButtons()

void JoySensor::resetButtons ( )
protected

Reset all the properties of the sensor direction buttons.

Here is the caller graph for this function:

◆ resetCalibration()

void JoySensor::resetCalibration ( )

Resets the calibration of the sensor back to uncalibrated state.

Here is the caller graph for this function:

◆ sensorDelayChanged

void JoySensor::sensorDelayChanged ( int  value)
signal
Here is the caller graph for this function:

◆ sensorNameChanged

void JoySensor::sensorNameChanged ( )
signal
Here is the caller graph for this function:

◆ sensorTypeName()

virtual QString JoySensor::sensorTypeName ( ) const
pure virtual

Implemented in JoyAccelerometerSensor, and JoyGyroscopeSensor.

Here is the caller graph for this function:

◆ setCalibration()

virtual void JoySensor::setCalibration ( double  offsetX,
double  offsetY,
double  offsetZ 
)
pure virtual

Implemented in JoyAccelerometerSensor, and JoyGyroscopeSensor.

Here is the caller graph for this function:

◆ setDeadZone

void JoySensor::setDeadZone ( double  value)
slot

Sets the dead zone of the sensor to the given value.

Parameters
[in]valueNew sensor dead zone
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDiagonalRange

void JoySensor::setDiagonalRange ( double  value)
slot

Set the diagonal range value for a sensor.

Parameters
Valuebetween 1 - 90.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMaxZone

void JoySensor::setMaxZone ( double  value)
slot

Sets the maximum zone of the sensor to the given value.

Parameters
[in]valueNew sensor maximum zone
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSensorDelay

void JoySensor::setSensorDelay ( unsigned int  value)
slot

Sets the sensor input delaqy to the given value.

Parameters
[in]valueNew sensor input delay in ms
Here is the caller graph for this function:

◆ setSensorName

void JoySensor::setSensorName ( QString  tempName)
slot

Sets the name of this sensor.

Parameters
[in]tempNameNew sensor name
Here is the caller graph for this function:

◆ writeConfig()

void JoySensor::writeConfig ( QXmlStreamWriter *  xml) const

Write the status of the properties of a sensor and direction buttons to an XML stream.

Parameters
QXmlStreamWriterinstance that will be used to write a profile.
Here is the call graph for this function:

Field Documentation

◆ ACTIVE_BUTTON_COUNT

const size_t JoySensor::ACTIVE_BUTTON_COUNT = 3
staticprotected

◆ m_active

bool JoySensor::m_active
protected

◆ m_active_button

JoySensorButton* JoySensor::m_active_button[ACTIVE_BUTTON_COUNT]
protected

◆ m_buttons

QHash<JoySensorDirection, JoySensorButton *> JoySensor::m_buttons
protected

◆ m_calibrated

bool JoySensor::m_calibrated
protected

◆ m_calibration_value

double JoySensor::m_calibration_value[3]
protected

◆ m_current_direction

JoySensorDirection JoySensor::m_current_direction
protected

◆ m_current_value

float JoySensor::m_current_value[3]
protected

◆ m_dead_zone

double JoySensor::m_dead_zone
protected

◆ m_delay_timer

QTimer JoySensor::m_delay_timer
protected

◆ m_diagonal_range

double JoySensor::m_diagonal_range
protected

◆ m_max_zone

double JoySensor::m_max_zone
protected

◆ m_originset

int JoySensor::m_originset
protected

◆ m_parent_set

SetJoystick* JoySensor::m_parent_set
protected

◆ m_pending_event

bool JoySensor::m_pending_event
protected

◆ m_pending_ignore_sets

bool JoySensor::m_pending_ignore_sets
protected

◆ m_pending_value

float JoySensor::m_pending_value[3]
protected

◆ m_sensor_delay

unsigned int JoySensor::m_sensor_delay
protected

◆ m_sensor_name

QString JoySensor::m_sensor_name
protected

◆ m_type

JoySensorType JoySensor::m_type
protected

The documentation for this class was generated from the following files: