Skip to content

Commit

Permalink
Comms: Update Serial Threading
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Nov 20, 2024
1 parent 2814c75 commit bbead09
Show file tree
Hide file tree
Showing 8 changed files with 305 additions and 392 deletions.
4 changes: 2 additions & 2 deletions android/libs/qtandroidserialport/qserialport_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool QSerialPortPrivate::open(QIODevice::OpenMode mode)
}
}

clear(QSerialPort::AllDirections);
(void) clear(QSerialPort::AllDirections);

return true;
}
Expand Down Expand Up @@ -249,7 +249,7 @@ bool QSerialPortPrivate::clear(QSerialPort::Directions directions)
const bool result = AndroidSerial::purgeBuffers(m_deviceId, input, output);
if (!result) {
qCWarning(AndroidSerialPortLog) << "Failed to purge buffers for device ID" << m_deviceId;
setError(QSerialPortErrorInfo(QSerialPort::UnknownError, QSerialPort::tr("Failed to purge buffers")));
// setError(QSerialPortErrorInfo(QSerialPort::UnknownError, QSerialPort::tr("Failed to purge buffers")));
}

return result;
Expand Down
2 changes: 1 addition & 1 deletion libs/mavlink/include/mavlink/v2.0
Submodule v2.0 updated 70 files
+22 −22 ASLUAV/ASLUAV.h
+1 −1 ASLUAV/mavlink.h
+1 −1 ASLUAV/version.h
+4 −4 AVSSUAS/AVSSUAS.h
+1 −1 AVSSUAS/mavlink.h
+1 −1 AVSSUAS/version.h
+4 −4 all/all.h
+1 −1 all/mavlink.h
+1 −1 all/version.h
+22 −22 ardupilotmega/ardupilotmega.h
+1 −1 ardupilotmega/mavlink.h
+1 −1 ardupilotmega/version.h
+29 −49 common/common.h
+1 −1 common/mavlink.h
+5 −5 common/mavlink_msg_battery_info.h
+13 −41 common/mavlink_msg_camera_capture_status.h
+13 −41 common/mavlink_msg_camera_fov_status.h
+6 −6 common/mavlink_msg_camera_information.h
+13 −41 common/mavlink_msg_camera_settings.h
+0 −484 common/mavlink_msg_camera_thermal_range.h
+13 −41 common/mavlink_msg_camera_tracking_geo_status.h
+13 −41 common/mavlink_msg_camera_tracking_image_status.h
+0 −700 common/mavlink_msg_smart_battery_info.h
+13 −41 common/mavlink_msg_video_stream_information.h
+13 −41 common/mavlink_msg_video_stream_status.h
+28 −179 common/testsuite.h
+1 −1 common/version.h
+1 −1 csAirLink/csAirLink.h
+1 −1 csAirLink/mavlink.h
+1 −1 csAirLink/version.h
+4 −4 cubepilot/cubepilot.h
+1 −1 cubepilot/mavlink.h
+1 −1 cubepilot/version.h
+23 −64 development/development.h
+1 −1 development/mavlink.h
+0 −288 development/mavlink_msg_control_status.h
+0 −61 development/testsuite.h
+1 −1 development/version.h
+1 −1 icarous/icarous.h
+1 −1 icarous/mavlink.h
+1 −1 icarous/version.h
+22 −22 matrixpilot/matrixpilot.h
+1 −1 matrixpilot/mavlink.h
+1 −1 matrixpilot/version.h
+26 −112 message_definitions/common.xml
+0 −52 message_definitions/development.xml
+1 −1 minimal/mavlink.h
+1 −1 minimal/minimal.h
+1 −1 minimal/version.h
+1 −1 paparazzi/mavlink.h
+4 −4 paparazzi/paparazzi.h
+1 −1 paparazzi/version.h
+1 −1 python_array_test/mavlink.h
+4 −4 python_array_test/python_array_test.h
+1 −1 python_array_test/version.h
+1 −1 standard/mavlink.h
+1 −1 standard/standard.h
+1 −1 standard/version.h
+1 −1 storm32/mavlink.h
+22 −22 storm32/storm32.h
+1 −1 storm32/version.h
+1 −1 test/mavlink.h
+1 −1 test/test.h
+1 −1 test/version.h
+1 −1 uAvionix/mavlink.h
+4 −4 uAvionix/uAvionix.h
+1 −1 uAvionix/version.h
+1 −1 ualberta/mavlink.h
+4 −4 ualberta/ualberta.h
+1 −1 ualberta/version.h
2 changes: 1 addition & 1 deletion src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void APMAutoPilotPlugin::_checkForBadCubeBlack(void)
// FIXME: Put back
for (const QVariant& varLink: _vehicle->links()) {
SerialLink* serialLink = varLink.value<SerialLink*>();
if (serialLink && QSerialPortInfo(*serialLink->_hackAccessToPort()).description().contains(QStringLiteral("CubeBlack"))) {
if (serialLink && QSerialPortInfo(*serialLink->port()).description().contains(QStringLiteral("CubeBlack"))) {
cubeBlackFound = true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Comms/LinkManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ void LinkManager::_updateSerialPorts()
for (const QGCSerialPortInfo &info: portList) {
const QString port = info.systemLocation().trimmed();
_commPortList += port;
_commPortDisplayList += SerialConfiguration::cleanPortDisplayname(port);
_commPortDisplayList += SerialConfiguration::cleanPortDisplayName(port);
}
}

Expand Down
3 changes: 0 additions & 3 deletions src/Comms/LinkManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ class LinkManager : public QGCTool
void loadLinkConfigurationList();
void saveLinkConfigurationList();

/// Suspend automatic confguration updates (during link maintenance for instance)
void suspendConfigurationUpdates(bool suspend) { _configUpdateSuspended = suspend; }

/// Sets the flag to suspend the all new connections
/// @param reason User visible reason to suspend connections
void setConnectionsSuspended(const QString &reason) { _connectionsSuspended = true; _connectionsSuspendedReason = reason; }
Expand Down
1 change: 0 additions & 1 deletion src/Comms/QGCSerialPortInfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ bool QGCSerialPortInfo::isBootloader() const
BoardType_t boardType;
QString name;
if (getBoardInfo(boardType, name)) {
// TODO: bool SerialLink::_isBootloader()
return ((boardType == BoardTypePixhawk) && description().contains(QStringLiteral("BL")));
}

Expand Down
Loading

0 comments on commit bbead09

Please sign in to comment.