QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
RemoteControlCalibrationController Class Referenceabstract

Abstract base class for calibrating RC and Joystick controller. More...

#include <RemoteControlCalibrationController.h>

+ Inheritance diagram for RemoteControlCalibrationController:
+ Collaboration diagram for RemoteControlCalibrationController:

Classes

struct  ChannelInfo
 

Public Slots

void rawChannelValuesChanged (QVector< int > channelValues)
 

Signals

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 aux1ExtensionChannelMappedChanged (bool mapped)
 
void aux2ExtensionChannelMappedChanged (bool mapped)
 
void aux3ExtensionChannelMappedChanged (bool mapped)
 
void aux4ExtensionChannelMappedChanged (bool mapped)
 
void aux5ExtensionChannelMappedChanged (bool mapped)
 
void aux6ExtensionChannelMappedChanged (bool mapped)
 
void yawChannelMappedChanged (bool mapped)
 
void throttleChannelMappedChanged (bool mapped)
 
void pitchExtensionEnabledChanged (bool enabled)
 
void rollExtensionEnabledChanged (bool enabled)
 
void aux1ExtensionEnabledChanged (bool enabled)
 
void aux2ExtensionEnabledChanged (bool enabled)
 
void aux3ExtensionEnabledChanged (bool enabled)
 
void aux4ExtensionEnabledChanged (bool enabled)
 
void aux5ExtensionEnabledChanged (bool enabled)
 
void aux6ExtensionEnabledChanged (bool enabled)
 
void anyExtensionEnabledChanged (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 adjustedAux1ExtensionChannelValueChanged (int rcValue)
 
void adjustedAux2ExtensionChannelValueChanged (int rcValue)
 
void adjustedAux3ExtensionChannelValueChanged (int rcValue)
 
void adjustedAux4ExtensionChannelValueChanged (int rcValue)
 
void adjustedAux5ExtensionChannelValueChanged (int rcValue)
 
void adjustedAux6ExtensionChannelValueChanged (int rcValue)
 
void rollChannelReversedChanged (bool reversed)
 
void pitchChannelReversedChanged (bool reversed)
 
void rollExtensionChannelReversedChanged (bool reversed)
 
void pitchExtensionChannelReversedChanged (bool reversed)
 
void aux1ExtensionChannelReversedChanged (bool reversed)
 
void aux2ExtensionChannelReversedChanged (bool reversed)
 
void aux3ExtensionChannelReversedChanged (bool reversed)
 
void aux4ExtensionChannelReversedChanged (bool reversed)
 
void aux5ExtensionChannelReversedChanged (bool reversed)
 
void aux6ExtensionChannelReversedChanged (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 aux1ExtensionDeadbandChanged (int deadband)
 
void aux2ExtensionDeadbandChanged (int deadband)
 
void aux3ExtensionDeadbandChanged (int deadband)
 
void aux4ExtensionDeadbandChanged (int deadband)
 
void aux5ExtensionDeadbandChanged (int deadband)
 
void aux6ExtensionDeadbandChanged (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 calibrationCompleted ()
 
- Signals inherited from FactPanelController
void missingParametersAvailable ()
 

Protected Member Functions

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.
 
virtual bool _stickFunctionEnabled (StickFunction stickFunction)
 Returns true if the stick function is enabled.
 
- 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

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

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

Abstract base class for calibrating RC and Joystick controller.

Definition at line 15 of file RemoteControlCalibrationController.h.

Member Function Documentation

◆ _resetInternalCalibrationValues()

◆ _signalAllAttitudeValueChanges()

◆ _stickFunctionEnabled()

bool RemoteControlCalibrationController::_stickFunctionEnabled ( StickFunction  stickFunction)
protectedvirtual

Returns true if the stick function is enabled.

Definition at line 1415 of file RemoteControlCalibrationController.cc.

◆ _stickFunctionToString()

QString RemoteControlCalibrationController::_stickFunctionToString ( StickFunction  stickFunction)
protected

Definition at line 1322 of file RemoteControlCalibrationController.cc.

◆ _validateAndAdjustCalibrationValues()

void RemoteControlCalibrationController::_validateAndAdjustCalibrationValues ( )
protected

◆ adjustedAux1ExtensionChannelValueChanged

void RemoteControlCalibrationController::adjustedAux1ExtensionChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ adjustedAux2ExtensionChannelValueChanged

void RemoteControlCalibrationController::adjustedAux2ExtensionChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ adjustedAux3ExtensionChannelValueChanged

void RemoteControlCalibrationController::adjustedAux3ExtensionChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ adjustedAux4ExtensionChannelValueChanged

void RemoteControlCalibrationController::adjustedAux4ExtensionChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ adjustedAux5ExtensionChannelValueChanged

void RemoteControlCalibrationController::adjustedAux5ExtensionChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ adjustedAux6ExtensionChannelValueChanged

void RemoteControlCalibrationController::adjustedAux6ExtensionChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ adjustedPitchChannelValueChanged

void RemoteControlCalibrationController::adjustedPitchChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ adjustedPitchExtensionChannelValueChanged

void RemoteControlCalibrationController::adjustedPitchExtensionChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ adjustedRollChannelValueChanged

void RemoteControlCalibrationController::adjustedRollChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ adjustedRollExtensionChannelValueChanged

void RemoteControlCalibrationController::adjustedRollExtensionChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ adjustedThrottleChannelValueChanged

void RemoteControlCalibrationController::adjustedThrottleChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ adjustedYawChannelValueChanged

void RemoteControlCalibrationController::adjustedYawChannelValueChanged ( int  rcValue)
signal

Referenced by rawChannelValuesChanged().

◆ anyExtensionEnabledChanged

void RemoteControlCalibrationController::anyExtensionEnabledChanged ( bool  enabled)
signal

◆ aux1ExtensionChannelMappedChanged

void RemoteControlCalibrationController::aux1ExtensionChannelMappedChanged ( bool  mapped)
signal

◆ aux1ExtensionChannelReversedChanged

void RemoteControlCalibrationController::aux1ExtensionChannelReversedChanged ( bool  reversed)
signal

◆ aux1ExtensionDeadbandChanged

void RemoteControlCalibrationController::aux1ExtensionDeadbandChanged ( int  deadband)
signal

◆ aux1ExtensionEnabledChanged

void RemoteControlCalibrationController::aux1ExtensionEnabledChanged ( bool  enabled)
signal

◆ aux2ExtensionChannelMappedChanged

void RemoteControlCalibrationController::aux2ExtensionChannelMappedChanged ( bool  mapped)
signal

◆ aux2ExtensionChannelReversedChanged

void RemoteControlCalibrationController::aux2ExtensionChannelReversedChanged ( bool  reversed)
signal

◆ aux2ExtensionDeadbandChanged

void RemoteControlCalibrationController::aux2ExtensionDeadbandChanged ( int  deadband)
signal

◆ aux2ExtensionEnabledChanged

void RemoteControlCalibrationController::aux2ExtensionEnabledChanged ( bool  enabled)
signal

◆ aux3ExtensionChannelMappedChanged

void RemoteControlCalibrationController::aux3ExtensionChannelMappedChanged ( bool  mapped)
signal

◆ aux3ExtensionChannelReversedChanged

void RemoteControlCalibrationController::aux3ExtensionChannelReversedChanged ( bool  reversed)
signal

◆ aux3ExtensionDeadbandChanged

void RemoteControlCalibrationController::aux3ExtensionDeadbandChanged ( int  deadband)
signal

◆ aux3ExtensionEnabledChanged

void RemoteControlCalibrationController::aux3ExtensionEnabledChanged ( bool  enabled)
signal

◆ aux4ExtensionChannelMappedChanged

void RemoteControlCalibrationController::aux4ExtensionChannelMappedChanged ( bool  mapped)
signal

◆ aux4ExtensionChannelReversedChanged

void RemoteControlCalibrationController::aux4ExtensionChannelReversedChanged ( bool  reversed)
signal

◆ aux4ExtensionDeadbandChanged

void RemoteControlCalibrationController::aux4ExtensionDeadbandChanged ( int  deadband)
signal

◆ aux4ExtensionEnabledChanged

void RemoteControlCalibrationController::aux4ExtensionEnabledChanged ( bool  enabled)
signal

◆ aux5ExtensionChannelMappedChanged

void RemoteControlCalibrationController::aux5ExtensionChannelMappedChanged ( bool  mapped)
signal

◆ aux5ExtensionChannelReversedChanged

void RemoteControlCalibrationController::aux5ExtensionChannelReversedChanged ( bool  reversed)
signal

◆ aux5ExtensionDeadbandChanged

void RemoteControlCalibrationController::aux5ExtensionDeadbandChanged ( int  deadband)
signal

◆ aux5ExtensionEnabledChanged

void RemoteControlCalibrationController::aux5ExtensionEnabledChanged ( bool  enabled)
signal

◆ aux6ExtensionChannelMappedChanged

void RemoteControlCalibrationController::aux6ExtensionChannelMappedChanged ( bool  mapped)
signal

◆ aux6ExtensionChannelReversedChanged

void RemoteControlCalibrationController::aux6ExtensionChannelReversedChanged ( bool  reversed)
signal

◆ aux6ExtensionDeadbandChanged

void RemoteControlCalibrationController::aux6ExtensionDeadbandChanged ( int  deadband)
signal

◆ aux6ExtensionEnabledChanged

void RemoteControlCalibrationController::aux6ExtensionEnabledChanged ( bool  enabled)
signal

◆ calibratingChanged

void RemoteControlCalibrationController::calibratingChanged ( bool  calibrating)
signal

◆ calibrationCompleted

void RemoteControlCalibrationController::calibrationCompleted ( )
signal

◆ centeredThrottleChanged

void RemoteControlCalibrationController::centeredThrottleChanged ( bool  centeredThrottle)
signal

◆ channelCountChanged

void RemoteControlCalibrationController::channelCountChanged ( int  channelCount)
signal

Referenced by rawChannelValuesChanged().

◆ joystickModeChanged

void RemoteControlCalibrationController::joystickModeChanged ( bool  joystickMode)
signal

◆ pitchChannelMappedChanged

void RemoteControlCalibrationController::pitchChannelMappedChanged ( bool  mapped)
signal

◆ pitchChannelReversedChanged

void RemoteControlCalibrationController::pitchChannelReversedChanged ( bool  reversed)
signal

◆ pitchDeadbandChanged

void RemoteControlCalibrationController::pitchDeadbandChanged ( int  deadband)
signal

◆ pitchExtensionChannelMappedChanged

void RemoteControlCalibrationController::pitchExtensionChannelMappedChanged ( bool  mapped)
signal

◆ pitchExtensionChannelReversedChanged

void RemoteControlCalibrationController::pitchExtensionChannelReversedChanged ( bool  reversed)
signal

◆ pitchExtensionDeadbandChanged

void RemoteControlCalibrationController::pitchExtensionDeadbandChanged ( int  deadband)
signal

◆ pitchExtensionEnabledChanged

void RemoteControlCalibrationController::pitchExtensionEnabledChanged ( bool  enabled)
signal

◆ rawChannelValueChanged

void RemoteControlCalibrationController::rawChannelValueChanged ( int  channel,
int  value 
)
signal

Referenced by rawChannelValuesChanged().

◆ rawChannelValuesChanged

◆ rollChannelMappedChanged

void RemoteControlCalibrationController::rollChannelMappedChanged ( bool  mapped)
signal

◆ rollChannelReversedChanged

void RemoteControlCalibrationController::rollChannelReversedChanged ( bool  reversed)
signal

◆ rollDeadbandChanged

void RemoteControlCalibrationController::rollDeadbandChanged ( int  deadband)
signal

◆ rollExtensionChannelMappedChanged

void RemoteControlCalibrationController::rollExtensionChannelMappedChanged ( bool  mapped)
signal

◆ rollExtensionChannelReversedChanged

void RemoteControlCalibrationController::rollExtensionChannelReversedChanged ( bool  reversed)
signal

◆ rollExtensionDeadbandChanged

void RemoteControlCalibrationController::rollExtensionDeadbandChanged ( int  deadband)
signal

◆ rollExtensionEnabledChanged

void RemoteControlCalibrationController::rollExtensionEnabledChanged ( bool  enabled)
signal

◆ singleStickDisplayChanged

void RemoteControlCalibrationController::singleStickDisplayChanged ( bool  singleStickDisplay)
signal

◆ stickDisplayPositionsChanged

void RemoteControlCalibrationController::stickDisplayPositionsChanged ( )
signal

◆ throttleChannelMappedChanged

void RemoteControlCalibrationController::throttleChannelMappedChanged ( bool  mapped)
signal

◆ throttleChannelReversedChanged

void RemoteControlCalibrationController::throttleChannelReversedChanged ( bool  reversed)
signal

◆ throttleDeadbandChanged

void RemoteControlCalibrationController::throttleDeadbandChanged ( int  deadband)
signal

◆ transmitterModeChanged

void RemoteControlCalibrationController::transmitterModeChanged ( )
signal

◆ yawChannelMappedChanged

void RemoteControlCalibrationController::yawChannelMappedChanged ( bool  mapped)
signal

◆ yawChannelReversedChanged

void RemoteControlCalibrationController::yawChannelReversedChanged ( bool  reversed)
signal

◆ yawDeadbandChanged

void RemoteControlCalibrationController::yawDeadbandChanged ( int  deadband)
signal

Member Data Documentation

◆ _calCenterPoint

int RemoteControlCalibrationController::_calCenterPoint
protected

Center point for calibration.

Definition at line 281 of file RemoteControlCalibrationController.h.

Referenced by _resetInternalCalibrationValues().

◆ _calDefaultMaxValue

int RemoteControlCalibrationController::_calDefaultMaxValue
protected

Default value for Max if not set.

Definition at line 283 of file RemoteControlCalibrationController.h.

Referenced by _validateAndAdjustCalibrationValues().

◆ _calDefaultMinValue

int RemoteControlCalibrationController::_calDefaultMinValue
protected

Default value for Min if not set.

Definition at line 282 of file RemoteControlCalibrationController.h.

Referenced by _validateAndAdjustCalibrationValues().

◆ _calMoveDelta

int RemoteControlCalibrationController::_calMoveDelta
protected

Amount of delta past center which is considered stick movement.

Definition at line 285 of file RemoteControlCalibrationController.h.

◆ _calRoughCenterDelta

int RemoteControlCalibrationController::_calRoughCenterDelta
protected

Delta around center point which is considered to be roughly centered.

Definition at line 284 of file RemoteControlCalibrationController.h.

◆ _calSettleDelta

int RemoteControlCalibrationController::_calSettleDelta
protected

Amount of delta which is considered no stick movement.

Definition at line 286 of file RemoteControlCalibrationController.h.

◆ _calValidMaxValue

int RemoteControlCalibrationController::_calValidMaxValue
protected

Smallest valid maximum channel range value.

Definition at line 280 of file RemoteControlCalibrationController.h.

Referenced by _validateAndAdjustCalibrationValues().

◆ _calValidMinValue

int RemoteControlCalibrationController::_calValidMinValue
protected

Largest valid minimum channel range value.

Definition at line 279 of file RemoteControlCalibrationController.h.

Referenced by _validateAndAdjustCalibrationValues().

◆ _chanCount

int RemoteControlCalibrationController::_chanCount = 0
protected

Number of actual rc channels available.

Definition at line 289 of file RemoteControlCalibrationController.h.

Referenced by _validateAndAdjustCalibrationValues(), and rawChannelValuesChanged().

◆ _chanMax

constexpr int RemoteControlCalibrationController::_chanMax = QGCMAVLink::maxRcChannels
staticconstexprprotected

A set of information associated with a radio channel.

Maximum number of supported channels by this implementation

Definition at line 267 of file RemoteControlCalibrationController.h.

Referenced by _resetInternalCalibrationValues(), _validateAndAdjustCalibrationValues(), and rawChannelValuesChanged().

◆ _chanMinimum

constexpr int RemoteControlCalibrationController::_chanMinimum = 4
staticconstexprprotected

Minimum numner of channels required to run.

Definition at line 290 of file RemoteControlCalibrationController.h.

◆ _rgChannelInfo

ChannelInfo RemoteControlCalibrationController::_rgChannelInfo[_chanMax]
protected

Information associated with each rc channel.

Definition at line 276 of file RemoteControlCalibrationController.h.

Referenced by _resetInternalCalibrationValues(), _validateAndAdjustCalibrationValues(), and rawChannelValuesChanged().

◆ _rgFunctionChannelMapping

int RemoteControlCalibrationController::_rgFunctionChannelMapping[stickFunctionMax]
protected

Maps from StickFunction to channel index. _chanMax indicates channel not set for this function.

Definition at line 293 of file RemoteControlCalibrationController.h.

Referenced by _resetInternalCalibrationValues().

◆ _stickDetectSettleMSecs

int RemoteControlCalibrationController::_stickDetectSettleMSecs = 1000
protected

Time in ms stick must be stable before detection completes.

Definition at line 287 of file RemoteControlCalibrationController.h.


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