diff --git a/src/AutoPilotPlugins/PX4/SensorsComponent.qml b/src/AutoPilotPlugins/PX4/SensorsComponent.qml index 15bff89009a781a68621be4c50d5ad064d626553..4fb7605d6845c64de0addf2c86b48e8692a7ad4d 100644 --- a/src/AutoPilotPlugins/PX4/SensorsComponent.qml +++ b/src/AutoPilotPlugins/PX4/SensorsComponent.qml @@ -138,6 +138,15 @@ QGCView { hideDialog() } } + + } + + Component.onCompleted: { + var usingUDP = controller.usingUDPLink() + if (usingUDP) { + console.log("onUsingUDPLink") + showMessage("Sensor Calibration", "Performing sensor calibration over a WiFi connection is known to be unreliable. You should disconnect and perform calibration using a direct USB connection instead.", StandardButton.Ok) + } } QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled } diff --git a/src/AutoPilotPlugins/PX4/SensorsComponentController.cc b/src/AutoPilotPlugins/PX4/SensorsComponentController.cc index 6404700115be1fa73b9df823cf38d41dbec6e6e2..c28be78849f316078bcf4e96acf7308bdf1129dd 100644 --- a/src/AutoPilotPlugins/PX4/SensorsComponentController.cc +++ b/src/AutoPilotPlugins/PX4/SensorsComponentController.cc @@ -74,7 +74,11 @@ SensorsComponentController::SensorsComponentController(void) : _unknownFirmwareVersion(false), _waitingForCancel(false) { +} +bool SensorsComponentController::usingUDPLink(void) +{ + return _vehicle->priorityLink()->getLinkConfiguration()->type() == LinkConfiguration::TypeUdp; } /// Appends the specified text to the status log area in the ui diff --git a/src/AutoPilotPlugins/PX4/SensorsComponentController.h b/src/AutoPilotPlugins/PX4/SensorsComponentController.h index b8498d482f5eb403bf15c4146d5a77e1a6d87142..fe9744efa1a7eb76e646d8b2b792f31c743d361f 100644 --- a/src/AutoPilotPlugins/PX4/SensorsComponentController.h +++ b/src/AutoPilotPlugins/PX4/SensorsComponentController.h @@ -95,6 +95,7 @@ public: Q_INVOKABLE void calibrateLevel(void); Q_INVOKABLE void calibrateAirspeed(void); Q_INVOKABLE void cancelCalibration(void); + Q_INVOKABLE bool usingUDPLink(void); bool fixedWing(void);