QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
RallyPointManager.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QList>
4#include <QtCore/QObject>
5#include <QtCore/QString>
6#include <QtPositioning/QGeoCoordinate>
7
8#include "MAVLinkEnums.h"
9#include "PlanManager.h"
10
11class Vehicle;
12
15{
16 QGeoCoordinate coordinate;
17 MAV_FRAME frame = MAV_FRAME_GLOBAL_RELATIVE_ALT;
18};
19
22
24{
25 Q_OBJECT
26
27public:
28 RallyPointManager(Vehicle* vehicle);
30
31 bool supported(void) const;
32 void sendToVehicle(const QList<RallyPointData>& rgPoints);
33 void removeAll(void);
34
35 QString editorQml(void) const { return QStringLiteral("qrc:/FirmwarePlugin/RallyPointEditor.qml"); }
36
37 QList<RallyPointData> points(void) const { return _rgPoints; }
38
46
47signals:
48 void loadComplete (void);
50 void error (int errorCode, const QString& errorMsg);
52 void sendComplete (bool error);
53
54private slots:
55 void _sendComplete (bool error);
56 void _planManagerLoadComplete (bool removeAllRequested);
57
58protected:
59 void _sendError(ErrorCode_t errorCode, const QString& errorMsg);
60
61 QList<RallyPointData> _rgPoints;
62 QList<RallyPointData> _rgSendPoints;
63};
PlanManager(Vehicle *vehicle, MAV_MISSION_TYPE planType)
bool inProgress(void) const
void inProgressChanged(bool inProgress)
void sendToVehicle(const QList< RallyPointData > &rgPoints)
QList< RallyPointData > _rgPoints
bool supported(void) const
ErrorCode_t
Error codes returned in error signal.
@ TooFewPoints
Too few points for valid geofence.
@ TooManyPoints
Too many points for valid geofence.
void loadComplete(void)
void sendComplete(bool error)
QList< RallyPointData > _rgSendPoints
QList< RallyPointData > points(void) const
RallyPointManager(Vehicle *vehicle)
void _sendError(ErrorCode_t errorCode, const QString &errorMsg)
void removeAllComplete(bool error)
void error(int errorCode, const QString &errorMsg)
QString editorQml(void) const
A rally point as exchanged with the vehicle.
QGeoCoordinate coordinate
MAV_FRAME frame
Frame of coordinate.altitude().