AirMapVehicleManager.h 1.73 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
/****************************************************************************
 *
 *   (c) 2017 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

#pragma once

Gus Grubba's avatar
Gus Grubba committed
12
#include "AirspaceManager.h"
13
#include "AirspaceVehicleManager.h"
Gus Grubba's avatar
Gus Grubba committed
14 15 16 17
#include "AirMapSharedState.h"
#include "AirMapFlightManager.h"
#include "AirMapTelemetry.h"
#include "AirMapTrafficMonitor.h"
18

Gus Grubba's avatar
Gus Grubba committed
19 20
#include "QGCToolbox.h"

21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
/// AirMap per vehicle management class.

class AirMapVehicleManager : public AirspaceVehicleManager
{
    Q_OBJECT
public:
    AirMapVehicleManager        (AirMapSharedState& shared, const Vehicle& vehicle, QGCToolbox& toolbox);
    ~AirMapVehicleManager       () = default;


    void createFlight           (const QList<MissionItem*>& missionItems) override;
    void startTelemetryStream   () override;
    void stopTelemetryStream    () override;
    bool isTelemetryStreaming   () const override;

Gus Grubba's avatar
Gus Grubba committed
36
    AirspaceFlightPlanProvider::PermitStatus flightPermitStatus() const override;
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

signals:
    void error                  (const QString& what, const QString& airmapdMessage, const QString& airmapdDetails);

public slots:
    void endFlight              () override;

protected slots:
    virtual void vehicleMavlinkMessageReceived(const mavlink_message_t& message) override;

private slots:
    void _flightPermitStatusChanged();

private:
    AirMapSharedState&           _shared;
    AirMapFlightManager          _flightManager;
    AirMapTelemetry              _telemetry;
    AirMapTrafficMonitor         _trafficMonitor;
    QGCToolbox&                  _toolbox;
};