QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
JoystickConfigController Class Reference

#include <JoystickConfigController.h>

+ Inheritance diagram for JoystickConfigController:
+ Collaboration diagram for JoystickConfigController:

Signals

void joystickChanged (Joystick *joystick)
 
- Signals inherited from RemoteControlCalibrationController
void channelCountChanged (int channelCount)
 
void rawChannelValueChanged (int channel, int value)
 
void rollChannelMappedChanged (bool mapped)
 
void pitchChannelMappedChanged (bool mapped)
 
void rollExtensionChannelMappedChanged (bool mapped)
 
void pitchExtensionChannelMappedChanged (bool mapped)
 
void additionalAxis1ChannelMappedChanged (bool mapped)
 
void additionalAxis2ChannelMappedChanged (bool mapped)
 
void additionalAxis3ChannelMappedChanged (bool mapped)
 
void additionalAxis4ChannelMappedChanged (bool mapped)
 
void additionalAxis5ChannelMappedChanged (bool mapped)
 
void additionalAxis6ChannelMappedChanged (bool mapped)
 
void yawChannelMappedChanged (bool mapped)
 
void throttleChannelMappedChanged (bool mapped)
 
void pitchExtensionEnabledChanged (bool enabled)
 
void rollExtensionEnabledChanged (bool enabled)
 
void additionalAxis1EnabledChanged (bool enabled)
 
void additionalAxis2EnabledChanged (bool enabled)
 
void additionalAxis3EnabledChanged (bool enabled)
 
void additionalAxis4EnabledChanged (bool enabled)
 
void additionalAxis5EnabledChanged (bool enabled)
 
void additionalAxis6EnabledChanged (bool enabled)
 
void adjustedRollChannelValueChanged (int rcValue)
 
void adjustedPitchChannelValueChanged (int rcValue)
 
void adjustedYawChannelValueChanged (int rcValue)
 
void adjustedThrottleChannelValueChanged (int rcValue)
 
void adjustedRollExtensionChannelValueChanged (int rcValue)
 
void adjustedPitchExtensionChannelValueChanged (int rcValue)
 
void adjustedAdditionalAxis1ChannelValueChanged (int rcValue)
 
void adjustedAdditionalAxis2ChannelValueChanged (int rcValue)
 
void adjustedAdditionalAxis3ChannelValueChanged (int rcValue)
 
void adjustedAdditionalAxis4ChannelValueChanged (int rcValue)
 
void adjustedAdditionalAxis5ChannelValueChanged (int rcValue)
 
void adjustedAdditionalAxis6ChannelValueChanged (int rcValue)
 
void rollChannelReversedChanged (bool reversed)
 
void pitchChannelReversedChanged (bool reversed)
 
void rollExtensionChannelReversedChanged (bool reversed)
 
void pitchExtensionChannelReversedChanged (bool reversed)
 
void additionalAxis1ChannelReversedChanged (bool reversed)
 
void additionalAxis2ChannelReversedChanged (bool reversed)
 
void additionalAxis3ChannelReversedChanged (bool reversed)
 
void additionalAxis4ChannelReversedChanged (bool reversed)
 
void additionalAxis5ChannelReversedChanged (bool reversed)
 
void additionalAxis6ChannelReversedChanged (bool reversed)
 
void yawChannelReversedChanged (bool reversed)
 
void throttleChannelReversedChanged (bool reversed)
 
void rollDeadbandChanged (int deadband)
 
void pitchDeadbandChanged (int deadband)
 
void rollExtensionDeadbandChanged (int deadband)
 
void pitchExtensionDeadbandChanged (int deadband)
 
void additionalAxis1DeadbandChanged (int deadband)
 
void additionalAxis2DeadbandChanged (int deadband)
 
void additionalAxis3DeadbandChanged (int deadband)
 
void additionalAxis4DeadbandChanged (int deadband)
 
void additionalAxis5DeadbandChanged (int deadband)
 
void additionalAxis6DeadbandChanged (int deadband)
 
void yawDeadbandChanged (int deadband)
 
void throttleDeadbandChanged (int deadband)
 
void transmitterModeChanged ()
 
void stickDisplayPositionsChanged ()
 
void centeredThrottleChanged (bool centeredThrottle)
 
void joystickModeChanged (bool joystickMode)
 
void calibratingChanged (bool calibrating)
 
void singleStickDisplayChanged (bool singleStickDisplay)
 
void oneSidedButtonVisibleChanged (bool visible)
 
void calibrationCompleted ()
 
- Signals inherited from FactPanelController
void missingParametersAvailable ()
 

Public Member Functions

 JoystickConfigController (QObject *parent=nullptr)
 
 ~JoystickConfigController ()
 
Joystickjoystick () const
 
void start () final override
 
- Public Member Functions inherited from RemoteControlCalibrationController
 RemoteControlCalibrationController (QObject *parent=nullptr)
 
 ~RemoteControlCalibrationController ()
 
Q_INVOKABLE void cancelButtonClicked ()
 
Q_INVOKABLE void nextButtonClicked ()
 
Q_INVOKABLE void oneSidedButtonClicked ()
 
Q_INVOKABLE void copyTrims ()
 
int adjustedRollChannelValue ()
 
int adjustedPitchChannelValue ()
 
int adjustedYawChannelValue ()
 
int adjustedThrottleChannelValue ()
 
int adjustedRollExtensionChannelValue ()
 
int adjustedPitchExtensionChannelValue ()
 
int adjustedAdditionalAxis1ChannelValue ()
 
int adjustedAdditionalAxis2ChannelValue ()
 
int adjustedAdditionalAxis3ChannelValue ()
 
int adjustedAdditionalAxis4ChannelValue ()
 
int adjustedAdditionalAxis5ChannelValue ()
 
int adjustedAdditionalAxis6ChannelValue ()
 
bool rollChannelMapped ()
 
bool pitchChannelMapped ()
 
bool rollExtensionChannelMapped ()
 
bool pitchExtensionChannelMapped ()
 
bool additionalAxis1ChannelMapped ()
 
bool additionalAxis2ChannelMapped ()
 
bool additionalAxis3ChannelMapped ()
 
bool additionalAxis4ChannelMapped ()
 
bool additionalAxis5ChannelMapped ()
 
bool additionalAxis6ChannelMapped ()
 
bool yawChannelMapped ()
 
bool throttleChannelMapped ()
 
bool pitchExtensionEnabled ()
 
bool rollExtensionEnabled ()
 
bool additionalAxis1Enabled ()
 
bool additionalAxis2Enabled ()
 
bool additionalAxis3Enabled ()
 
bool additionalAxis4Enabled ()
 
bool additionalAxis5Enabled ()
 
bool additionalAxis6Enabled ()
 
bool rollChannelReversed ()
 
bool pitchChannelReversed ()
 
bool rollExtensionChannelReversed ()
 
bool pitchExtensionChannelReversed ()
 
bool additionalAxis1ChannelReversed ()
 
bool additionalAxis2ChannelReversed ()
 
bool additionalAxis3ChannelReversed ()
 
bool additionalAxis4ChannelReversed ()
 
bool additionalAxis5ChannelReversed ()
 
bool additionalAxis6ChannelReversed ()
 
bool yawChannelReversed ()
 
bool throttleChannelReversed ()
 
int rollDeadband ()
 
int pitchDeadband ()
 
int rollExtensionDeadband ()
 
int pitchExtensionDeadband ()
 
int additionalAxis1Deadband ()
 
int additionalAxis2Deadband ()
 
int additionalAxis3Deadband ()
 
int additionalAxis4Deadband ()
 
int additionalAxis5Deadband ()
 
int additionalAxis6Deadband ()
 
int yawDeadband ()
 
int throttleDeadband ()
 
int channelCount () const
 
int transmitterMode () const
 
QList< int > stickDisplayPositions () const
 
bool centeredThrottle () const
 
bool joystickMode () const
 
bool calibrating () const
 
bool singleStickDisplay () const
 
bool oneSidedButtonVisible () const
 
void setTransmitterMode (int mode)
 
void setCenteredThrottle (bool centered)
 
void setJoystickMode (bool joystickMode)
 
- Public Member Functions inherited from FactPanelController
 FactPanelController (QObject *parent=nullptr)
 
virtual ~FactPanelController ()
 
Q_INVOKABLE FactgetParameterFact (int componentId, const QString &name, bool reportMissing=true) const
 
Q_INVOKABLE bool parameterExists (int componentId, const QString &name) const
 
Q_INVOKABLE void getMissingParameters (const QStringList &rgNames)
 

Additional Inherited Members

- Public Types inherited from RemoteControlCalibrationController
enum  StickFunction {
  stickFunctionRoll , stickFunctionPitch , stickFunctionYaw , stickFunctionThrottle ,
  stickFunctionMaxRadio , stickFunctionPitchExtension = stickFunctionMaxRadio , stickFunctionRollExtension , stickFunctionAdditionalAxis1 ,
  stickFunctionAdditionalAxis2 , stickFunctionAdditionalAxis3 , stickFunctionAdditionalAxis4 , stickFunctionAdditionalAxis5 ,
  stickFunctionAdditionalAxis6 , stickFunctionMax
}
 These identify the various controls functions. They are also used as indices into the _rgFunctioInfo array. More...
 
- Public Slots inherited from RemoteControlCalibrationController
void _rawChannelValuesChanged (QVector< int > channelValues)
 
void _clampedChannelValuesChanged (QVector< int > channelValues)
 
- Protected Member Functions inherited from RemoteControlCalibrationController
void _validateAndAdjustCalibrationValues ()
 
QString _stickFunctionToString (StickFunction stickFunction)
 
void _signalAllAttitudeValueChanges ()
 
void _resetInternalCalibrationValues ()
 Resets internal calibration values to their initial state in preparation for a new calibration sequence.
 
- Protected Member Functions inherited from FactPanelController
bool _allParametersExists (int componentId, const QStringList &names) const
 
void _reportMissingParameter (int componentId, const QString &name) const
 Report a missing parameter.
 
- Protected Attributes inherited from RemoteControlCalibrationController
ChannelInfo _rgChannelInfo [_chanMax]
 Information associated with each rc channel.
 
int _calValidMinValue
 Largest valid minimum channel range value.
 
int _calValidMaxValue
 Smallest valid maximum channel range value.
 
int _calCenterPoint
 Center point for calibration.
 
int _calDefaultMinValue
 Default value for Min if not set.
 
int _calDefaultMaxValue
 Default value for Max if not set.
 
int _calRoughCenterDelta
 Delta around center point which is considered to be roughly centered.
 
int _calMoveDelta
 Amount of delta past center which is considered stick movement.
 
int _calSettleDelta
 Amount of delta which is considered no stick movement.
 
int _stickDetectSettleMSecs = 1000
 Time in ms stick must be stable before detection completes.
 
int _chanCount = 0
 Number of actual rc channels available.
 
int _rgFunctionChannelMapping [stickFunctionMax]
 Maps from StickFunction to channel index. _chanMax indicates channel not set for this function.
 
- Protected Attributes inherited from FactPanelController
Vehicle_vehicle = nullptr
 
- Static Protected Attributes inherited from RemoteControlCalibrationController
static constexpr int _chanMax = QGCMAVLink::maxRcChannels
 A set of information associated with a radio channel.
 
static constexpr int _chanMinimum = 4
 Minimum numner of channels required to run.
 

Detailed Description

Definition at line 7 of file JoystickConfigController.h.

Constructor & Destructor Documentation

◆ JoystickConfigController()

JoystickConfigController::JoystickConfigController ( QObject *  parent = nullptr)

< Default value for Min if not set

< Default value for Max if not set

< Delta around center point which is considered to be roughly centered (Note: PS5 controller has very noisy center, hence 700)

< Amount of delta past center which is considered stick movement

< Amount of delta which is considered no stick movement (increased for noisy joysticks at extreme positions)

< Reduced settle time for joysticks (faster response than RC transmitters)

Definition at line 14 of file JoystickConfigController.cc.

◆ ~JoystickConfigController()

JoystickConfigController::~JoystickConfigController ( )

Definition at line 32 of file JoystickConfigController.cc.

Member Function Documentation

◆ joystick()

Joystick * JoystickConfigController::joystick ( ) const
inline

Definition at line 19 of file JoystickConfigController.h.

◆ joystickChanged

void JoystickConfigController::joystickChanged ( Joystick joystick)
signal

◆ start()

void JoystickConfigController::start ( void  )
finaloverridevirtual

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