Skip to content

Commit

Permalink
undo libs mavlink
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzopb committed Nov 20, 2023
1 parent 060220d commit a018419
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion libs/mavlink/include/mavlink/v2.0
Submodule v2.0 updated 90 files
+22 −38 ASLUAV/ASLUAV.h
+1 −1 ASLUAV/mavlink.h
+1 −1 ASLUAV/version.h
+23 −42 ardupilotmega/ardupilotmega.h
+1 −1 ardupilotmega/mavlink.h
+0 −6 ardupilotmega/testsuite.h
+1 −1 ardupilotmega/version.h
+267 −88 common/common.h
+1 −1 common/mavlink.h
+43 −68 common/mavlink_msg_autopilot_state_for_gimbal_device.h
+56 −81 common/mavlink_msg_camera_information.h
+10 −10 common/mavlink_msg_camera_settings.h
+5 −5 common/mavlink_msg_cellular_status.h
+10 −10 common/mavlink_msg_command_ack.h
+11 −36 common/mavlink_msg_efi_status.h
+31 −106 common/mavlink_msg_gimbal_device_attitude_status.h
+41 −66 common/mavlink_msg_gimbal_device_information.h
+20 −20 common/mavlink_msg_gimbal_device_set_attitude.h
+5 −5 common/mavlink_msg_gimbal_manager_information.h
+5 −5 common/mavlink_msg_gimbal_manager_status.h
+20 −40 common/mavlink_msg_home_position.h
+11 −86 common/mavlink_msg_mission_current.h
+5 −5 common/mavlink_msg_mission_item.h
+5 −5 common/mavlink_msg_mission_item_int.h
+20 −20 common/mavlink_msg_open_drone_id_system.h
+0 −338 common/mavlink_msg_open_drone_id_system_update.h
+15 −15 common/mavlink_msg_set_home_position.h
+21 −71 common/mavlink_msg_sim_state.h
+21 −71 common/mavlink_msg_timesync.h
+35 −114 common/testsuite.h
+1 −1 common/version.h
+0 −77 csAirLink/csAirLink.h
+0 −34 csAirLink/mavlink.h
+0 −239 csAirLink/mavlink_msg_airlink_auth.h
+0 −213 csAirLink/mavlink_msg_airlink_auth_response.h
+0 −156 csAirLink/testsuite.h
+0 −14 csAirLink/version.h
+0 −70 cubepilot/cubepilot.h
+0 −34 cubepilot/mavlink.h
+0 −263 cubepilot/mavlink_msg_cubepilot_firmware_update_resp.h
+0 −288 cubepilot/mavlink_msg_cubepilot_firmware_update_start.h
+0 −213 cubepilot/mavlink_msg_cubepilot_raw_rc.h
+0 −363 cubepilot/mavlink_msg_herelink_telem.h
+0 −380 cubepilot/mavlink_msg_herelink_video_stream_information.h
+0 −353 cubepilot/testsuite.h
+0 −14 cubepilot/version.h
+35 −169 development/development.h
+1 −1 development/mavlink.h
+121 −71 development/mavlink_msg_airspeed.h
+70 −70 development/mavlink_msg_available_modes.h
+0 −213 development/mavlink_msg_available_modes_monitor.h
+0 −388 development/mavlink_msg_battery_status_v2.h
+65 −91 development/mavlink_msg_component_information_basic.h
+43 −43 development/mavlink_msg_current_mode.h
+313 −0 development/mavlink_msg_mission_changed.h
+0 −511 development/mavlink_msg_target_absolute.h
+0 −457 development/mavlink_msg_target_relative.h
+92 −296 development/testsuite.h
+1 −1 development/version.h
+5 −2 icarous/icarous.h
+1 −1 icarous/mavlink.h
+1 −1 icarous/version.h
+22 −38 matrixpilot/matrixpilot.h
+1 −1 matrixpilot/mavlink.h
+1 −1 matrixpilot/version.h
+10 −30 mavlink_helpers.h
+0 −11 mavlink_types.h
+0 −36 message_definitions/all.xml
+0 −12 message_definitions/ardupilotmega.xml
+211 −329 message_definitions/common.xml
+0 −29 message_definitions/csAirLink.xml
+0 −48 message_definitions/cubepilot.xml
+38 −230 message_definitions/development.xml
+8 −14 message_definitions/minimal.xml
+3 −3 message_definitions/standard.xml
+271 −135 message_definitions/storm32.xml
+15 −5 message_definitions/ualberta.xml
+1 −1 minimal/mavlink.h
+11 −10 minimal/minimal.h
+1 −1 minimal/version.h
+1 −1 standard/mavlink.h
+9 −6 standard/standard.h
+3 −3 standard/testsuite.h
+2 −2 standard/version.h
+1 −1 test/mavlink.h
+5 −2 test/test.h
+1 −1 test/version.h
+1 −1 uAvionix/mavlink.h
+8 −5 uAvionix/uAvionix.h
+1 −1 uAvionix/version.h
2 changes: 1 addition & 1 deletion src/AutoPilotPlugins/PX4/PX4FlightBehavior.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/AutoPilotPlugins/PX4/PX4TuningComponent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/FirmwarePlugin/APM/APMFirmwarePluginFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/FirmwarePlugin/APM/APMParameterMetaData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
30 changes: 15 additions & 15 deletions src/Vehicle/RemoteIDManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -427,4 +427,4 @@ void RemoteIDManager::_updateLastGCSPositionInfo(QGeoPositionInfo update)
if (update.isValid()) {
_lastGeoPositionTimeStamp = update.timestamp().toUTC();
}
}
}
2 changes: 1 addition & 1 deletion src/Vehicle/Vehicle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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")},
Expand Down
28 changes: 14 additions & 14 deletions src/comm/LinkManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion src/comm/QGCMAVLink.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a018419

Please sign in to comment.