#include <GimbalController.h>
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 |
Definition at line 13 of file GimbalController.h.
| GimbalController::GimbalController | ( | Vehicle * | vehicle | ) |
Definition at line 21 of file GimbalController.cc.
References GimbalController(), Vehicle::initialConnectComplete(), kRateResendIntervalMs, kTestRateResendIntervalMs, Vehicle::mavlinkMessageReceived(), and QGC::runningUnitTests().
Referenced by GimbalController(), and GimbalControllerDiscoveryTest.
| GimbalController::~GimbalController | ( | ) |
Definition at line 35 of file GimbalController.cc.
| void GimbalController::acquireGimbalControl | ( | ) |
Definition at line 856 of file GimbalController.cc.
References MAVLinkProtocol::getComponentId(), and MAVLinkProtocol::instance().
|
inline |
Definition at line 36 of file GimbalController.h.
References activeGimbal().
Referenced by activeGimbal(), GimbalControllerDiscoveryTest, gimbalPitchStart(), gimbalPitchStop(), gimbalYawStart(), and gimbalYawStop().
|
signal |
Referenced by GimbalControllerDiscoveryTest, and setActiveGimbal().
|
slot |
Definition at line 580 of file GimbalController.cc.
References SettingsManager::gimbalControllerSettings(), SettingsManager::instance(), sendPitchAbsoluteYaw(), and sendPitchBodyYaw().
| void GimbalController::gimbalOnScreenControl | ( | float | panpct, |
| float | tiltpct, | ||
| bool | clickAndPoint, | ||
| bool | clickAndDrag, | ||
| bool | rateControl, | ||
| bool | retract = false, | ||
| bool | neutral = false, | ||
| bool | yawlock = false ) |
Definition at line 616 of file GimbalController.cc.
References SettingsManager::gimbalControllerSettings(), SettingsManager::instance(), sendPitchAbsoluteYaw(), and sendPitchBodyYaw().
|
slot |
Definition at line 533 of file GimbalController.cc.
References activeGimbal(), SettingsManager::gimbalControllerSettings(), SettingsManager::instance(), sendRate(), and Gimbal::setPitchRate().
|
slot |
Definition at line 558 of file GimbalController.cc.
References activeGimbal(), sendRate(), and Gimbal::setPitchRate().
|
inline |
Definition at line 37 of file GimbalController.h.
Referenced by GimbalControllerDiscoveryTest.
|
inlineslot |
Definition at line 62 of file GimbalController.h.
References setGimbalYawLock().
|
slot |
Definition at line 546 of file GimbalController.cc.
References activeGimbal(), SettingsManager::gimbalControllerSettings(), SettingsManager::instance(), sendRate(), and Gimbal::setYawRate().
|
slot |
Definition at line 569 of file GimbalController.cc.
References activeGimbal(), sendRate(), and Gimbal::setYawRate().
| void GimbalController::releaseGimbalControl | ( | ) |
Definition at line 881 of file GimbalController.cc.
| 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
| pitch_rate_deg_s | Pitch rate in degrees per second |
| yaw_rate_deg_s | Yaw rate in degrees per second |
Definition at line 762 of file GimbalController.cc.
| void GimbalController::sendPitchAbsoluteYaw | ( | float | pitch, |
| float | yaw, | ||
| bool | showError = true ) |
Definition at line 689 of file GimbalController.cc.
Referenced by centerGimbal(), gimbalOnScreenControl(), and tilt90Gimbal().
| void GimbalController::sendPitchBodyYaw | ( | float | pitch, |
| float | yaw, | ||
| bool | showError = true ) |
Definition at line 660 of file GimbalController.cc.
Referenced by centerGimbal(), gimbalOnScreenControl(), and tilt90Gimbal().
| void GimbalController::sendPitchYawFlags | ( | uint32_t | flags | ) |
Definition at line 839 of file GimbalController.cc.
Referenced by setGimbalRetract(), and setGimbalYawLock().
| void GimbalController::sendRate | ( | ) |
Definition at line 743 of file GimbalController.cc.
Referenced by gimbalPitchStart(), gimbalPitchStop(), gimbalYawStart(), and gimbalYawStop().
| void GimbalController::setActiveGimbal | ( | Gimbal * | gimbal | ) |
Definition at line 45 of file GimbalController.cc.
References activeGimbalChanged().
Referenced by GimbalControllerDiscoveryTest.
| void GimbalController::setGimbalRetract | ( | bool | set | ) |
Definition at line 727 of file GimbalController.cc.
References sendPitchYawFlags().
| void GimbalController::setGimbalYawLock | ( | bool | set | ) |
Definition at line 824 of file GimbalController.cc.
References sendPitchYawFlags().
Referenced by gimbalYawLock().
|
signal |
|
slot |
Definition at line 598 of file GimbalController.cc.
References SettingsManager::gimbalControllerSettings(), SettingsManager::instance(), sendPitchAbsoluteYaw(), and sendPitchBodyYaw().
|
friend |
Definition at line 20 of file GimbalController.h.
References activeGimbal(), activeGimbalChanged(), GimbalController(), GimbalControllerDiscoveryTest, gimbals(), and setActiveGimbal().
Referenced by GimbalControllerDiscoveryTest.
|
staticconstexpr |
Rate command resend period while an axis is moving.
Definition at line 30 of file GimbalController.h.
Referenced by GimbalController().
|
staticconstexpr |
Minimum time between GIMBAL_MANAGER_STATUS interval requests, per gimbal.
Definition at line 33 of file GimbalController.h.
|
staticconstexpr |
Shortened rate resend period in unit tests
Definition at line 31 of file GimbalController.h.
Referenced by GimbalController().
|
staticconstexpr |
Shortened status request spacing in unit tests.
Definition at line 34 of file GimbalController.h.