3#include <QtCore/QByteArray>
4#include <QtCore/QLoggingCategory>
5#include <QtCore/QObject>
6#include <QtCore/QString>
37 static QString
getName() {
return QStringLiteral(
"MAVLink protocol"); }
40 int getSystemId()
const;
54 void checkForLostLogFiles();
63 void mavlinkMessageStatus(
int sysid, uint64_t totalSent, uint64_t totalReceived, uint64_t totalLoss,
float lossPercent);
68 void receiveBytes(
LinkInterface *link,
const QByteArray &data);
73 void logSentBytes(
const LinkInterface *link,
const QByteArray &data);
76 static void deleteTempLogFiles();
79 void _vehicleCountChanged();
93 void _saveTelemetryLog(
const QString &tempLogfile);
94 bool _checkTelemetrySavePath();
96 QFile *_tempLogFile =
nullptr;
98 bool _logSuspendError =
false;
99 bool _logSuspendReplay =
false;
100 bool _vehicleWasArmed =
false;
102 uint8_t _lastIndex[256][256]{};
103 QSet<QPair<uint8_t,uint8_t>> _firstMessageSeen;
108 bool _initialized =
false;
110 static constexpr const char *_tempLogFileTemplate =
"FlightDataXXXXXX";
111 static constexpr const char *_logFileExtension =
"mavlink";
113 static constexpr uint8_t kMaxCompId = MAV_COMPONENT_ENUM_END - 1;
Q_DECLARE_LOGGING_CATEGORY(AndroidSerialLog)
std::shared_ptr< LinkInterface > SharedLinkInterfacePtr
#define MAVLINK_COMM_NUM_BUFFERS
struct __mavlink_message mavlink_message_t
The link interface defines the interface for all links used to communicate with the ground station ap...
static int getComponentId()
Get the component id of this application.
void mavlinkMessageStatus(int sysid, uint64_t totalSent, uint64_t totalReceived, uint64_t totalLoss, float lossPercent)
void messageReceived(LinkInterface *link, const mavlink_message_t &message)
Message received and directly copied via signal.
void vehicleHeartbeatInfo(LinkInterface *link, int vehicleId, int componentId, int vehicleFirmwareType, int vehicleType)
Heartbeat received on link.
void suspendLogForReplay(bool suspend)
Suspend/Restart logging during replay.
static QString getName()
Get the human-friendly name of this protocol.