QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MockLinkWorker.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QObject>
4
5class MockLink;
6class QTimer;
7
10class MockLinkWorker : public QObject
11{
12 Q_OBJECT
13
14public:
15 explicit MockLinkWorker(MockLink *link, QObject *parent = nullptr);
17
19 static constexpr int kTimer1HzIntervalMs = 1000;
20 static constexpr int kTimer10HzIntervalMs = 100;
21 static constexpr int kTimer500HzIntervalMs = 2;
22 static constexpr int kStatusTextDelayMs = 10000;
23
24public slots:
25 void startWork();
26 void stopWork();
27
28private slots:
29 void run1HzTasks();
30 void run10HzTasks();
31 void run500HzTasks();
32
33 void sendStatusTextMessages();
34
35private:
36 MockLink *_mockLink = nullptr;
37 QTimer *_timer1Hz = nullptr;
38 QTimer *_timer10Hz = nullptr;
39 QTimer *_timer500Hz = nullptr;
40 QTimer *_timerStatusText = nullptr;
41};
static constexpr int kTimer1HzIntervalMs
Timer intervals in milliseconds.
static constexpr int kTimer500HzIntervalMs
500 Hz tasks (param list, log download)
static constexpr int kTimer10HzIntervalMs
10 Hz tasks (heartbeat, GPS, position)
static constexpr int kStatusTextDelayMs
Delay before sending status text messages.