-
Notifications
You must be signed in to change notification settings - Fork 6
/
VehicleManager.h
49 lines (39 loc) · 983 Bytes
/
VehicleManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* @file
* @brief Class VehicleManager. This class manages creation and destroy of vehicle
* @author QAH <[email protected]>
*
*/
#ifndef VEHICLEMANAGER_H
#define VEHICLEMANAGER_H
#include "Toolbox.h"
#include "Vehicle.h"
class QuadApplication;
class LinkManager;
class SerialLink;
class PX4FirmwarePlugin;
class VehicleManager : public ToolBase
{
Q_OBJECT
public:
VehicleManager(QuadApplication* app);
~VehicleManager();
virtual void setToolbox(Toolbox* toolbox);
Vehicle* activeVehicle(void) {
if(_activeVehicle) {
return _activeVehicle;
}
return NULL;
}
signals:
void activeVehicleChanged(Vehicle* vehicle);
public slots:
void _vehicleHeartbeatInfo(SerialLink* link, int vehicleId);
private slots:
void _deleteVehicle(Vehicle* vehicle);
private:
LinkManager* _linkMgr;
Vehicle* _activeVehicle;
PX4FirmwarePlugin* _firmwarePlugin;
};
#endif // VEHICLEMANAGER_H