if(m_logfile->write(b)<MAVLINK_MAX_PACKET_LEN+sizeof(quint64))qDebug()<<"WRITING TO LOG FAILED!";
//qDebug() << "WROTE LOGFILE";
}
// ORDER MATTERS HERE!
...
...
@@ -170,7 +161,7 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
if(!versionMismatchIgnore)
{
emitprotocolStatusMessage(tr("The MAVLink protocol version on the MAV and QGroundControl mismatch!"),
tr("It is unsafe to use different MAVLink versions. QGroundControl therefore refuses to connect to system %1, which sends MAVLink version %2 (QGroundControl uses version %3).").arg(message.sysid).arg(heartbeat.mavlink_version).arg(MAVLINK_VERSION));
tr("It is unsafe to use different MAVLink versions. QGroundControl therefore refuses to connect to system %1, which sends MAVLink version %2 (QGroundControl uses version %3).").arg(message.sysid).arg(heartbeat.mavlink_version).arg(MAVLINK_VERSION));
versionMismatchIgnore=true;
}
...
...
@@ -189,37 +180,37 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
break;
caseMAV_AUTOPILOT_PIXHAWK:
{
// Fixme differentiate between quadrotor and coaxial here
PxQuadMAV*mav=newPxQuadMAV(this,message.sysid);
// Connect this robot to the UAS object
// it is IMPORTANT here to use the right object type,
// else the slot of the parent object is called (and thus the special
emitprotocolStatusMessage(tr("Opening MAVLink logfile for writing failed"),tr("MAVLink cannot log to the file %1, please choose a different file.").arg(m_logfile->fileName()));