|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <RallyPointManager.h>
Inheritance diagram for RallyPointManager:
Collaboration diagram for RallyPointManager:Public Types | |
| enum | ErrorCode_t { InternalError , TooFewPoints , TooManyPoints , InvalidCircleRadius } |
| Error codes returned in error signal. More... | |
Public Types inherited from PlanManager | |
| enum | ErrorCode_t { InternalError , AckTimeoutError , ProtocolError , RequestRangeError , ItemMismatchError , VehicleAckError , MissingRequestsError , MaxRetryExceeded , MissionTypeMismatch } |
| Error codes returned in error signal. More... | |
Signals | |
| void | loadComplete (void) |
| void | inProgressChanged (bool inProgress) |
| void | error (int errorCode, const QString &errorMsg) |
| void | removeAllComplete (bool error) |
| void | sendComplete (bool error) |
Signals inherited from PlanManager | |
| void | newMissionItemsAvailable (bool removeAllRequested) |
| void | inProgressChanged (bool inProgress) |
| void | error (int errorCode, const QString &errorMsg) |
| void | currentIndexChanged (int currentIndex) |
| void | lastCurrentIndexChanged (int lastCurrentIndex) |
| void | progressPctChanged (double progressPercentPct) |
| void | removeAllComplete (bool error) |
| void | sendComplete (bool error) |
| void | resumeMissionReady (void) |
| void | resumeMissionUploadFail (void) |
Public Member Functions | |
| RallyPointManager (Vehicle *vehicle) | |
| ~RallyPointManager () | |
| bool | supported (void) const |
| void | sendToVehicle (const QList< QGeoCoordinate > &rgPoints) |
| void | removeAll (void) |
| QString | editorQml (void) const |
| QList< QGeoCoordinate > | points (void) const |
Public Member Functions inherited from PlanManager | |
| PlanManager (Vehicle *vehicle, MAV_MISSION_TYPE planType) | |
| ~PlanManager () | |
| bool | inProgress (void) const |
| const QList< MissionItem * > & | missionItems (void) |
| int | currentIndex (void) const |
| Current mission item as reported by MISSION_CURRENT. | |
| int | lastCurrentIndex (void) const |
| Last current mission item reported while in Mission flight mode. | |
| void | loadFromVehicle (void) |
| void | writeMissionItems (const QList< MissionItem * > &missionItems) |
| void | removeAll (void) |
Protected Member Functions | |
| void | _sendError (ErrorCode_t errorCode, const QString &errorMsg) |
Protected Member Functions inherited from PlanManager | |
| void | _startAckTimeout (AckType_t ack) |
| bool | _checkForExpectedAck (AckType_t receivedAck) |
| void | _readTransactionComplete (void) |
| void | _handleMissionCount (const mavlink_message_t &message) |
| void | _handleMissionItem (const mavlink_message_t &message) |
| void | _handleMissionRequest (const mavlink_message_t &message) |
| void | _handleMissionAck (const mavlink_message_t &message) |
| void | _requestNextMissionItem (void) |
| void | _clearMissionItems (void) |
| void | _sendError (ErrorCode_t errorCode, const QString &errorMsg) |
| QString | _ackTypeToString (AckType_t ackType) |
| QString | _missionResultToString (MAV_MISSION_RESULT result) |
| void | _finishTransaction (bool success, bool apmGuidedItemWrite=false) |
| void | _requestList (void) |
| Internal call to request list of mission items. May be called during a retry sequence. | |
| void | _writeMissionCount (void) |
| This begins the write sequence with the vehicle. This may be called during a retry. | |
| void | _writeMissionItemsWorker (void) |
| void | _clearAndDeleteMissionItems (void) |
| void | _clearAndDeleteWriteMissionItems (void) |
| QString | _lastMissionReqestString (MAV_MISSION_RESULT result) |
| void | _removeAllWorker (void) |
| void | _connectToMavlink (void) |
| void | _disconnectFromMavlink (void) |
| QString | _planTypeString (void) |
Protected Attributes | |
| QList< QGeoCoordinate > | _rgPoints |
| QList< QGeoCoordinate > | _rgSendPoints |
Protected Attributes inherited from PlanManager | |
| Vehicle * | _vehicle = nullptr |
| MAV_MISSION_TYPE | _planType |
| QTimer * | _ackTimeoutTimer = nullptr |
| AckType_t | _expectedAck |
| int | _retryCount |
| TransactionType_t | _transactionInProgress |
| bool | _resumeMission |
| QList< int > | _itemIndicesToWrite |
| List of mission items which still need to be written to vehicle. | |
| QList< int > | _itemIndicesToRead |
| List of mission items which still need to be requested from vehicle. | |
| int | _lastMissionRequest |
| Index of item last requested by MISSION_REQUEST. | |
| int | _missionItemCountToRead |
| Count of all mission items to read. | |
| QList< MissionItem * > | _missionItems |
| Set of mission items on vehicle. | |
| QList< MissionItem * > | _writeMissionItems |
| Set of mission items currently being written to vehicle. | |
| int | _currentMissionIndex |
| int | _lastCurrentIndex |
Additional Inherited Members | |
Static Public Attributes inherited from PlanManager | |
| static constexpr int | _ackTimeoutMilliseconds = 1500 |
| static constexpr int | _retryTimeoutMilliseconds = 250 |
| static constexpr int | _maxRetryCount = 5 |
| static constexpr int | kTestAckTimeoutMs = 50 |
| Ack timeout used in unit tests (much shorter for faster tests) | |
Protected Types inherited from PlanManager | |
| enum | AckType_t { AckNone , AckMissionCount , AckMissionItem , AckMissionRequest , AckMissionClearAll , AckGuidedItem } |
| enum | TransactionType_t { TransactionNone , TransactionRead , TransactionWrite , TransactionRemoveAll } |
This is the base class for firmware specific rally point managers. A rally point manager is responsible for communicating with the vehicle to set/get rally points.
Definition at line 15 of file RallyPointManager.h.
Error codes returned in error signal.
| Enumerator | |
|---|---|
| InternalError | |
| TooFewPoints | Too few points for valid geofence. |
| TooManyPoints | Too many points for valid geofence. |
| InvalidCircleRadius | |
Definition at line 30 of file RallyPointManager.h.
| RallyPointManager::RallyPointManager | ( | Vehicle * | vehicle | ) |
Definition at line 7 of file RallyPointManager.cc.
References PlanManager::error(), error(), PlanManager::inProgressChanged(), inProgressChanged(), PlanManager::newMissionItemsAvailable(), PlanManager::removeAllComplete(), removeAllComplete(), and PlanManager::sendComplete().
| RallyPointManager::~RallyPointManager | ( | ) |
Definition at line 18 of file RallyPointManager.cc.
|
protected |
Definition at line 23 of file RallyPointManager.cc.
References error.
|
inline |
Definition at line 26 of file RallyPointManager.h.
Referenced by RallyPointController::editorQml().
|
signal |
Referenced by RallyPointManager().
|
signal |
Referenced by RallyPointManager().
|
signal |
|
inline |
Definition at line 27 of file RallyPointManager.h.
| void RallyPointManager::removeAll | ( | void | ) |
Definition at line 57 of file RallyPointManager.cc.
References _rgPoints, and PlanManager::removeAll().
Referenced by RallyPointController::removeAllFromVehicle().
|
signal |
Referenced by RallyPointManager().
|
signal |
| void RallyPointManager::sendToVehicle | ( | const QList< QGeoCoordinate > & | rgPoints | ) |
Definition at line 30 of file RallyPointManager.cc.
References _rgSendPoints, and PlanManager::writeMissionItems().
Referenced by RallyPointController::sendToVehicle().
| bool RallyPointManager::supported | ( | void | ) | const |
Definition at line 63 of file RallyPointManager.cc.
References PlanManager::_vehicle, and Vehicle::capabilityBits().
|
protected |
Definition at line 51 of file RallyPointManager.h.
Referenced by removeAll().
|
protected |
Definition at line 52 of file RallyPointManager.h.
Referenced by sendToVehicle().