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

#include <GimbalController.h>

Inheritance diagram for GimbalController:
Collaboration diagram for GimbalController:

Public Slots

void gimbalYawLock (bool yawLock)
Q_INVOKABLE void centerGimbal ()
Q_INVOKABLE void tilt90Gimbal ()
void gimbalPitchStart (int direction)
void gimbalYawStart (int direction)
void gimbalPitchStop ()
void gimbalYawStop ()

Signals

void activeGimbalChanged ()
void showAcquireGimbalControlPopup ()

Public Member Functions

 GimbalController (Vehicle *vehicle)
 ~GimbalController ()
Gimbal * activeGimbal () const
QmlObjectListModel * gimbals () const
void setActiveGimbal (Gimbal *gimbal)
void sendPitchYawFlags (uint32_t flags)
Q_INVOKABLE void gimbalOnScreenControl (float panpct, float tiltpct, bool clickAndPoint, bool clickAndDrag, bool rateControl, bool retract=false, bool neutral=false, bool yawlock=false)
Q_INVOKABLE void sendPitchBodyYaw (float pitch, float yaw, bool showError=true)
Q_INVOKABLE void sendPitchAbsoluteYaw (float pitch, float yaw, bool showError=true)
Q_INVOKABLE void setGimbalRetract (bool set)
Q_INVOKABLE void setGimbalYawLock (bool set)
Q_INVOKABLE void acquireGimbalControl ()
Q_INVOKABLE void releaseGimbalControl ()
Q_INVOKABLE void sendRate ()
Q_INVOKABLE void sendGimbalRate (float pitch_rate_deg_s, float yaw_rate_deg_s)

Static Public Attributes

static constexpr int kRateResendIntervalMs = 500
 Rate command resend period while an axis is moving.
static constexpr int kTestRateResendIntervalMs = 50
static constexpr int kStatusRequestSpacingMs = 1000
 Minimum time between GIMBAL_MANAGER_STATUS interval requests, per gimbal.
static constexpr int kTestStatusRequestSpacingMs = 50
 Shortened status request spacing in unit tests.

Friends

class GimbalControllerDiscoveryTest

Detailed Description

Definition at line 13 of file GimbalController.h.

Constructor & Destructor Documentation

◆ GimbalController()

◆ ~GimbalController()

GimbalController::~GimbalController ( )

Definition at line 35 of file GimbalController.cc.

Member Function Documentation

◆ acquireGimbalControl()

void GimbalController::acquireGimbalControl ( )

◆ activeGimbal()

Gimbal * GimbalController::activeGimbal ( ) const
inline

◆ activeGimbalChanged

void GimbalController::activeGimbalChanged ( )
signal

◆ centerGimbal

void GimbalController::centerGimbal ( )
slot

◆ gimbalOnScreenControl()

void GimbalController::gimbalOnScreenControl ( float panpct,
float tiltpct,
bool clickAndPoint,
bool clickAndDrag,
bool rateControl,
bool retract = false,
bool neutral = false,
bool yawlock = false )

◆ gimbalPitchStart

void GimbalController::gimbalPitchStart ( int direction)
slot

◆ gimbalPitchStop

void GimbalController::gimbalPitchStop ( )
slot

Definition at line 558 of file GimbalController.cc.

References activeGimbal(), sendRate(), and Gimbal::setPitchRate().

◆ gimbals()

QmlObjectListModel * GimbalController::gimbals ( ) const
inline

Definition at line 37 of file GimbalController.h.

Referenced by GimbalControllerDiscoveryTest.

◆ gimbalYawLock

void GimbalController::gimbalYawLock ( bool yawLock)
inlineslot

Definition at line 62 of file GimbalController.h.

References setGimbalYawLock().

◆ gimbalYawStart

void GimbalController::gimbalYawStart ( int direction)
slot

◆ gimbalYawStop

void GimbalController::gimbalYawStop ( )
slot

Definition at line 569 of file GimbalController.cc.

References activeGimbal(), sendRate(), and Gimbal::setYawRate().

◆ releaseGimbalControl()

void GimbalController::releaseGimbalControl ( )

Definition at line 881 of file GimbalController.cc.

◆ sendGimbalRate()

void GimbalController::sendGimbalRate ( float pitch_rate_deg_s,
float yaw_rate_deg_s )

Send gimbal attitude rates directly without using active gimbal's rate properties

Parameters
pitch_rate_deg_sPitch rate in degrees per second
yaw_rate_deg_sYaw rate in degrees per second

Definition at line 762 of file GimbalController.cc.

◆ sendPitchAbsoluteYaw()

void GimbalController::sendPitchAbsoluteYaw ( float pitch,
float yaw,
bool showError = true )

Definition at line 689 of file GimbalController.cc.

Referenced by centerGimbal(), gimbalOnScreenControl(), and tilt90Gimbal().

◆ sendPitchBodyYaw()

void GimbalController::sendPitchBodyYaw ( float pitch,
float yaw,
bool showError = true )

Definition at line 660 of file GimbalController.cc.

Referenced by centerGimbal(), gimbalOnScreenControl(), and tilt90Gimbal().

◆ sendPitchYawFlags()

void GimbalController::sendPitchYawFlags ( uint32_t flags)

Definition at line 839 of file GimbalController.cc.

Referenced by setGimbalRetract(), and setGimbalYawLock().

◆ sendRate()

void GimbalController::sendRate ( )

◆ setActiveGimbal()

void GimbalController::setActiveGimbal ( Gimbal * gimbal)

Definition at line 45 of file GimbalController.cc.

References activeGimbalChanged().

Referenced by GimbalControllerDiscoveryTest.

◆ setGimbalRetract()

void GimbalController::setGimbalRetract ( bool set)

Definition at line 727 of file GimbalController.cc.

References sendPitchYawFlags().

◆ setGimbalYawLock()

void GimbalController::setGimbalYawLock ( bool set)

Definition at line 824 of file GimbalController.cc.

References sendPitchYawFlags().

Referenced by gimbalYawLock().

◆ showAcquireGimbalControlPopup

void GimbalController::showAcquireGimbalControlPopup ( )
signal

◆ tilt90Gimbal

void GimbalController::tilt90Gimbal ( )
slot

◆ GimbalControllerDiscoveryTest

friend class GimbalControllerDiscoveryTest
friend

Member Data Documentation

◆ kRateResendIntervalMs

int GimbalController::kRateResendIntervalMs = 500
staticconstexpr

Rate command resend period while an axis is moving.

Definition at line 30 of file GimbalController.h.

Referenced by GimbalController().

◆ kStatusRequestSpacingMs

int GimbalController::kStatusRequestSpacingMs = 1000
staticconstexpr

Minimum time between GIMBAL_MANAGER_STATUS interval requests, per gimbal.

Definition at line 33 of file GimbalController.h.

◆ kTestRateResendIntervalMs

int GimbalController::kTestRateResendIntervalMs = 50
staticconstexpr

Shortened rate resend period in unit tests

Definition at line 31 of file GimbalController.h.

Referenced by GimbalController().

◆ kTestStatusRequestSpacingMs

int GimbalController::kTestStatusRequestSpacingMs = 50
staticconstexpr

Shortened status request spacing in unit tests.

Definition at line 34 of file GimbalController.h.


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