QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
StandardModes.h
Go to the documentation of this file.
1#pragma once
2
3#include "FirmwarePlugin.h"
4#include "MAVLinkLib.h"
5
6#include <QtCore/QObject>
7#include <QtCore/QString>
8#include <QtCore/QMap>
9#include <QtCore/QLoggingCategory>
10
11Q_DECLARE_LOGGING_CATEGORY(StandardModesLog)
12
13class Vehicle;
14
15class StandardModes : public QObject
16{
17Q_OBJECT
18
19public:
20 struct Mode {
21 QString name;
22 uint8_t standardMode;
25 };
26
27 StandardModes(QObject* parent, Vehicle* vehicle);
28
29 void request();
30
31 void availableModesMonitorReceived(uint8_t seq);
32
33 void gotMessage(MAV_RESULT result, const mavlink_message_t &message);
34
35signals:
38
39private:
40
41 void requestMode(int modeIndex);
42 void ensureUniqueModeNames();
43
44 Vehicle*const _vehicle;
45
46 bool _requestActive{false};
47 bool _wantReset{false};
48
49 int _lastSeq{-1};
50
51 FlightModeList _modeList;
52};
Q_DECLARE_LOGGING_CATEGORY(AndroidSerialLog)
QList< FirmwareFlightMode > FlightModeList
struct __mavlink_message mavlink_message_t
void gotMessage(MAV_RESULT result, const mavlink_message_t &message)
void modesUpdated()
void requestCompleted()
void availableModesMonitorReceived(uint8_t seq)