|
|
|
@ -47,6 +47,9 @@ public:
@@ -47,6 +47,9 @@ public:
|
|
|
|
|
/// A disconnected vehicle used for offline editing. It will match the vehicle type specified in Settings.
|
|
|
|
|
Q_PROPERTY(Vehicle* offlineEditingVehicle READ offlineEditingVehicle CONSTANT) |
|
|
|
|
|
|
|
|
|
//-- The current vehicle's last known location
|
|
|
|
|
Q_PROPERTY(QGeoCoordinate lastKnownLocation READ lastKnownLocation NOTIFY lastKnownLocationChanged) |
|
|
|
|
|
|
|
|
|
// Methods
|
|
|
|
|
|
|
|
|
|
Q_INVOKABLE Vehicle* getVehicleById(int vehicleId); |
|
|
|
@ -78,24 +81,27 @@ public:
@@ -78,24 +81,27 @@ public:
|
|
|
|
|
// Override from QGCTool
|
|
|
|
|
virtual void setToolbox(QGCToolbox *toolbox); |
|
|
|
|
|
|
|
|
|
QGeoCoordinate lastKnownLocation () { return _lastKnownLocation; } |
|
|
|
|
|
|
|
|
|
signals: |
|
|
|
|
void vehicleAdded(Vehicle* vehicle); |
|
|
|
|
void vehicleRemoved(Vehicle* vehicle); |
|
|
|
|
void activeVehicleAvailableChanged(bool activeVehicleAvailable); |
|
|
|
|
void vehicleAdded (Vehicle* vehicle); |
|
|
|
|
void vehicleRemoved (Vehicle* vehicle); |
|
|
|
|
void activeVehicleAvailableChanged (bool activeVehicleAvailable); |
|
|
|
|
void parameterReadyVehicleAvailableChanged(bool parameterReadyVehicleAvailable); |
|
|
|
|
void activeVehicleChanged(Vehicle* activeVehicle); |
|
|
|
|
void gcsHeartBeatEnabledChanged(bool gcsHeartBeatEnabled); |
|
|
|
|
|
|
|
|
|
void _deleteVehiclePhase2Signal(void); |
|
|
|
|
void activeVehicleChanged (Vehicle* activeVehicle); |
|
|
|
|
void gcsHeartBeatEnabledChanged (bool gcsHeartBeatEnabled); |
|
|
|
|
void lastKnownLocationChanged (); |
|
|
|
|
void _deleteVehiclePhase2Signal (void); |
|
|
|
|
|
|
|
|
|
private slots: |
|
|
|
|
void _deleteVehiclePhase1(Vehicle* vehicle); |
|
|
|
|
void _deleteVehiclePhase2(void); |
|
|
|
|
void _setActiveVehiclePhase2(void); |
|
|
|
|
void _vehicleParametersReadyChanged(bool parametersReady); |
|
|
|
|
void _sendGCSHeartbeat(void); |
|
|
|
|
void _vehicleHeartbeatInfo(LinkInterface* link, int vehicleId, int componentId, int vehicleFirmwareType, int vehicleType); |
|
|
|
|
void _requestProtocolVersion(unsigned version); |
|
|
|
|
void _deleteVehiclePhase1 (Vehicle* vehicle); |
|
|
|
|
void _deleteVehiclePhase2 (void); |
|
|
|
|
void _setActiveVehiclePhase2 (void); |
|
|
|
|
void _vehicleParametersReadyChanged (bool parametersReady); |
|
|
|
|
void _sendGCSHeartbeat (void); |
|
|
|
|
void _vehicleHeartbeatInfo (LinkInterface* link, int vehicleId, int componentId, int vehicleFirmwareType, int vehicleType); |
|
|
|
|
void _requestProtocolVersion (unsigned version); |
|
|
|
|
void _coordinateChanged (QGeoCoordinate coordinate); |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
bool _vehicleExists(int vehicleId); |
|
|
|
@ -115,6 +121,7 @@ private:
@@ -115,6 +121,7 @@ private:
|
|
|
|
|
FirmwarePluginManager* _firmwarePluginManager; |
|
|
|
|
JoystickManager* _joystickManager; |
|
|
|
|
MAVLinkProtocol* _mavlinkProtocol; |
|
|
|
|
QGeoCoordinate _lastKnownLocation; |
|
|
|
|
|
|
|
|
|
QTimer _gcsHeartbeatTimer; ///< Timer to emit heartbeats
|
|
|
|
|
bool _gcsHeartbeatEnabled; ///< Enabled/disable heartbeat emission
|
|
|
|
|