diff --git a/libs/mavlink/include/mavlink/v2.0 b/libs/mavlink/include/mavlink/v2.0 index 494fd857a34..97c50e12876 160000 --- a/libs/mavlink/include/mavlink/v2.0 +++ b/libs/mavlink/include/mavlink/v2.0 @@ -1 +1 @@ -Subproject commit 494fd857a34267d01c2d3c2d601ecfa651f73489 +Subproject commit 97c50e128768c9b95c5542b8fc751198b1af96da diff --git a/src/AutoPilotPlugins/PX4/PX4FlightBehavior.cc b/src/AutoPilotPlugins/PX4/PX4FlightBehavior.cc index e9a60998df7..1a852e80466 100644 --- a/src/AutoPilotPlugins/PX4/PX4FlightBehavior.cc +++ b/src/AutoPilotPlugins/PX4/PX4FlightBehavior.cc @@ -69,7 +69,7 @@ QUrl PX4FlightBehavior::setupSource() const case MAV_TYPE_VTOL_TILTROTOR: case MAV_TYPE_VTOL_FIXEDROTOR: case MAV_TYPE_VTOL_TAILSITTER: -// case MAV_TYPE_VTOL_RESERVED4: + case MAV_TYPE_VTOL_RESERVED4: case MAV_TYPE_VTOL_RESERVED5: qmlFile = ""; break; diff --git a/src/AutoPilotPlugins/PX4/PX4TuningComponent.cc b/src/AutoPilotPlugins/PX4/PX4TuningComponent.cc index 7ff63c69e58..53c9eae178e 100644 --- a/src/AutoPilotPlugins/PX4/PX4TuningComponent.cc +++ b/src/AutoPilotPlugins/PX4/PX4TuningComponent.cc @@ -69,7 +69,7 @@ QUrl PX4TuningComponent::setupSource(void) const case MAV_TYPE_VTOL_TILTROTOR: case MAV_TYPE_VTOL_FIXEDROTOR: case MAV_TYPE_VTOL_TAILSITTER: -// case MAV_TYPE_VTOL_RESERVED4: + case MAV_TYPE_VTOL_RESERVED4: case MAV_TYPE_VTOL_RESERVED5: qmlFile = "qrc:/qml/PX4TuningComponentVTOL.qml"; break; diff --git a/src/FirmwarePlugin/APM/APMFirmwarePlugin.cc b/src/FirmwarePlugin/APM/APMFirmwarePlugin.cc index e14b4da5aa1..d404c70b7f9 100644 --- a/src/FirmwarePlugin/APM/APMFirmwarePlugin.cc +++ b/src/FirmwarePlugin/APM/APMFirmwarePlugin.cc @@ -476,7 +476,7 @@ void APMFirmwarePlugin::initializeVehicle(Vehicle* vehicle) case MAV_TYPE_VTOL_TILTROTOR: case MAV_TYPE_VTOL_FIXEDROTOR: case MAV_TYPE_VTOL_TAILSITTER: -// case MAV_TYPE_VTOL_RESERVED4: + case MAV_TYPE_VTOL_RESERVED4: case MAV_TYPE_VTOL_RESERVED5: case MAV_TYPE_FIXED_WING: vehicle->setFirmwareVersion(3, 9, 0); @@ -699,7 +699,7 @@ QString APMFirmwarePlugin::_internalParameterMetaDataFile(Vehicle* vehicle) case MAV_TYPE_VTOL_TILTROTOR: case MAV_TYPE_VTOL_FIXEDROTOR: case MAV_TYPE_VTOL_TAILSITTER: -// case MAV_TYPE_VTOL_RESERVED4: + case MAV_TYPE_VTOL_RESERVED4: case MAV_TYPE_VTOL_RESERVED5: case MAV_TYPE_FIXED_WING: if (vehicle->versionCompare(4, 2, 0) >= 0) { diff --git a/src/FirmwarePlugin/APM/APMFirmwarePluginFactory.cc b/src/FirmwarePlugin/APM/APMFirmwarePluginFactory.cc index 7c5ec838514..7f2cdef3c86 100644 --- a/src/FirmwarePlugin/APM/APMFirmwarePluginFactory.cc +++ b/src/FirmwarePlugin/APM/APMFirmwarePluginFactory.cc @@ -51,7 +51,7 @@ FirmwarePlugin* APMFirmwarePluginFactory::firmwarePluginForAutopilot(MAV_AUTOPIL case MAV_TYPE_VTOL_TILTROTOR: case MAV_TYPE_VTOL_FIXEDROTOR: case MAV_TYPE_VTOL_TAILSITTER: -// case MAV_TYPE_VTOL_RESERVED4: + case MAV_TYPE_VTOL_RESERVED4: case MAV_TYPE_VTOL_RESERVED5: case MAV_TYPE_FIXED_WING: if (!_arduPlanePluginInstance) { diff --git a/src/FirmwarePlugin/APM/APMParameterMetaData.cc b/src/FirmwarePlugin/APM/APMParameterMetaData.cc index 1c8d40b0923..78d23cc310a 100644 --- a/src/FirmwarePlugin/APM/APMParameterMetaData.cc +++ b/src/FirmwarePlugin/APM/APMParameterMetaData.cc @@ -90,7 +90,7 @@ QString APMParameterMetaData::mavTypeToString(MAV_TYPE vehicleTypeEnum) case MAV_TYPE_VTOL_TILTROTOR: case MAV_TYPE_VTOL_FIXEDROTOR: case MAV_TYPE_VTOL_TAILSITTER: -// case MAV_TYPE_VTOL_RESERVED4: + case MAV_TYPE_VTOL_RESERVED4: case MAV_TYPE_VTOL_RESERVED5: vehicleName = "ArduPlane"; break; diff --git a/src/Vehicle/RemoteIDManager.cc b/src/Vehicle/RemoteIDManager.cc index d3e0dec7fef..11ad0f30c72 100644 --- a/src/Vehicle/RemoteIDManager.cc +++ b/src/Vehicle/RemoteIDManager.cc @@ -126,7 +126,7 @@ void RemoteIDManager::_handleArmStatus(mavlink_message_t& message) mavlink_open_drone_id_arm_status_t armStatus; mavlink_msg_open_drone_id_arm_status_decode(&message, &armStatus); - if (/*armStatus.status == MAV_ODID_GOOD_TO_ARM &&*/ !_armStatusGood) { + if (armStatus.status == MAV_ODID_GOOD_TO_ARM && !_armStatusGood) { // If good to arm, even if basic ID is not set on GCS, it was set by remoteID parameters, so GCS one would be optional in this case if (!_basicIDGood) { _basicIDGood = true; @@ -137,19 +137,19 @@ void RemoteIDManager::_handleArmStatus(mavlink_message_t& message) qCDebug(RemoteIDManagerLog) << "Arm status GOOD TO ARM."; } -// if (armStatus.status == MAV_ODID_PRE_ARM_FAIL_GENERIC) { -// _armStatusGood = false; -// _armStatusError = QString::fromLocal8Bit(armStatus.error); -// // Check if the error is because of missing basic id -// if (armStatus.error == QString("missing basic_id message")) { -// _basicIDGood = false; -// qCDebug(RemoteIDManagerLog) << "Arm status error, basic_id is not set in RID device nor in GCS!"; -// emit basicIDGoodChanged(); -// } -// emit armStatusGoodChanged(); -// emit armStatusErrorChanged(); -// qCDebug(RemoteIDManagerLog) << "Arm status error:" << _armStatusError; -// } + if (armStatus.status == MAV_ODID_PRE_ARM_FAIL_GENERIC) { + _armStatusGood = false; + _armStatusError = QString::fromLocal8Bit(armStatus.error); + // Check if the error is because of missing basic id + if (armStatus.error == QString("missing basic_id message")) { + _basicIDGood = false; + qCDebug(RemoteIDManagerLog) << "Arm status error, basic_id is not set in RID device nor in GCS!"; + emit basicIDGoodChanged(); + } + emit armStatusGoodChanged(); + emit armStatusErrorChanged(); + qCDebug(RemoteIDManagerLog) << "Arm status error:" << _armStatusError; + } } // Function that sends messages periodically @@ -427,4 +427,4 @@ void RemoteIDManager::_updateLastGCSPositionInfo(QGeoPositionInfo update) if (update.isValid()) { _lastGeoPositionTimeStamp = update.timestamp().toUTC(); } -} +} \ No newline at end of file diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 9885a80e7a6..8ae6b6b9d27 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -2559,7 +2559,7 @@ QString Vehicle::vehicleTypeName() const { { MAV_TYPE_VTOL_TILTROTOR, tr("Tiltrotor VTOL")}, { MAV_TYPE_VTOL_FIXEDROTOR, tr("VTOL Fixedrotor")}, { MAV_TYPE_VTOL_TAILSITTER, tr("VTOL Tailsitter")}, -// { MAV_TYPE_VTOL_RESERVED4, tr("VTOL reserved 4")}, + { MAV_TYPE_VTOL_RESERVED4, tr("VTOL reserved 4")}, { MAV_TYPE_VTOL_RESERVED5, tr("VTOL reserved 5")}, { MAV_TYPE_GIMBAL, tr("Onboard gimbal")}, { MAV_TYPE_ADSB, tr("Onboard ADSB peripheral")}, diff --git a/src/comm/LinkManager.cc b/src/comm/LinkManager.cc index 42618867e4b..5b41952f4f4 100644 --- a/src/comm/LinkManager.cc +++ b/src/comm/LinkManager.cc @@ -1073,22 +1073,22 @@ void LinkManager::_updateAirLinkState(const QString &login, const QString &pass) void LinkManager::sendLoginMsgToAirLink(LinkInterface* link, const QString &login) { - __mavlink_airlink_auth_t auth; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - mavlink_message_t mavmsg; +// __mavlink_airlink_auth_t auth; +// uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; +// mavlink_message_t mavmsg; - const QString pass = qgcApp()->toolbox()->settingsManager()->appSettings()->passAirLink()->rawValueString(); +// const QString pass = qgcApp()->toolbox()->settingsManager()->appSettings()->passAirLink()->rawValueString(); - memset(&auth.login, 0, sizeof(auth.login)); - memset(&auth.password, 0, sizeof(auth.password)); - strcpy(auth.login, login.toUtf8().constData()); - strcpy(auth.password, pass.toUtf8().constData()); +// memset(&auth.login, 0, sizeof(auth.login)); +// memset(&auth.password, 0, sizeof(auth.password)); +// strcpy(auth.login, login.toUtf8().constData()); +// strcpy(auth.password, pass.toUtf8().constData()); - mavlink_msg_airlink_auth_pack(0, 0, &mavmsg, auth.login, auth.password); - uint16_t len = mavlink_msg_to_send_buffer(buffer, &mavmsg); - link->writeBytesThreadSafe((const char *)buffer, len); +// mavlink_msg_airlink_auth_pack(0, 0, &mavmsg, auth.login, auth.password); +// uint16_t len = mavlink_msg_to_send_buffer(buffer, &mavmsg); +// link->writeBytesThreadSafe((const char *)buffer, len); - qDebug() << (link->isConnected() ? "Connected" : "Not connected"); - qDebug() << login.toUtf8().constData(); - qDebug() << pass.toUtf8().constData(); +// qDebug() << (link->isConnected() ? "Connected" : "Not connected"); +// qDebug() << login.toUtf8().constData(); +// qDebug() << pass.toUtf8().constData(); } diff --git a/src/comm/QGCMAVLink.cc b/src/comm/QGCMAVLink.cc index e02fd48a456..59f9240bf87 100644 --- a/src/comm/QGCMAVLink.cc +++ b/src/comm/QGCMAVLink.cc @@ -130,7 +130,7 @@ QGCMAVLink::VehicleClass_t QGCMAVLink::vehicleClass(MAV_TYPE mavType) case MAV_TYPE_VTOL_TILTROTOR: case MAV_TYPE_VTOL_FIXEDROTOR: case MAV_TYPE_VTOL_TAILSITTER: -// case MAV_TYPE_VTOL_RESERVED4: + case MAV_TYPE_VTOL_RESERVED4: case MAV_TYPE_VTOL_RESERVED5: return VehicleClassVTOL; case MAV_TYPE_FIXED_WING: