|
|
@ -7,10 +7,6 @@ |
|
|
|
* |
|
|
|
* |
|
|
|
****************************************************************************/ |
|
|
|
****************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// @file
|
|
|
|
|
|
|
|
/// @author Don Gagne <don@thegagnes.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "SensorsComponentController.h" |
|
|
|
#include "SensorsComponentController.h" |
|
|
|
#include "QGCMAVLink.h" |
|
|
|
#include "QGCMAVLink.h" |
|
|
|
#include "UAS.h" |
|
|
|
#include "UAS.h" |
|
|
@ -22,46 +18,48 @@ |
|
|
|
|
|
|
|
|
|
|
|
QGC_LOGGING_CATEGORY(SensorsComponentControllerLog, "SensorsComponentControllerLog") |
|
|
|
QGC_LOGGING_CATEGORY(SensorsComponentControllerLog, "SensorsComponentControllerLog") |
|
|
|
|
|
|
|
|
|
|
|
SensorsComponentController::SensorsComponentController(void) : |
|
|
|
SensorsComponentController::SensorsComponentController(void) |
|
|
|
_statusLog(NULL), |
|
|
|
: _statusLog (NULL) |
|
|
|
_progressBar(NULL), |
|
|
|
, _progressBar (NULL) |
|
|
|
_compassButton(NULL), |
|
|
|
, _compassButton (NULL) |
|
|
|
_gyroButton(NULL), |
|
|
|
, _gyroButton (NULL) |
|
|
|
_accelButton(NULL), |
|
|
|
, _accelButton (NULL) |
|
|
|
_airspeedButton(NULL), |
|
|
|
, _airspeedButton (NULL) |
|
|
|
_levelButton(NULL), |
|
|
|
, _levelButton (NULL) |
|
|
|
_cancelButton(NULL), |
|
|
|
, _cancelButton (NULL) |
|
|
|
_setOrientationsButton(NULL), |
|
|
|
, _setOrientationsButton (NULL) |
|
|
|
_showOrientationCalArea(false), |
|
|
|
, _showOrientationCalArea (false) |
|
|
|
_gyroCalInProgress(false), |
|
|
|
, _gyroCalInProgress (false) |
|
|
|
_magCalInProgress(false), |
|
|
|
, _magCalInProgress (false) |
|
|
|
_accelCalInProgress(false), |
|
|
|
, _accelCalInProgress (false) |
|
|
|
_orientationCalDownSideDone(false), |
|
|
|
, _airspeedCalInProgress (false) |
|
|
|
_orientationCalUpsideDownSideDone(false), |
|
|
|
, _levelCalInProgress (false) |
|
|
|
_orientationCalLeftSideDone(false), |
|
|
|
, _orientationCalDownSideDone (false) |
|
|
|
_orientationCalRightSideDone(false), |
|
|
|
, _orientationCalUpsideDownSideDone (false) |
|
|
|
_orientationCalNoseDownSideDone(false), |
|
|
|
, _orientationCalLeftSideDone (false) |
|
|
|
_orientationCalTailDownSideDone(false), |
|
|
|
, _orientationCalRightSideDone (false) |
|
|
|
_orientationCalDownSideVisible(false), |
|
|
|
, _orientationCalNoseDownSideDone (false) |
|
|
|
_orientationCalUpsideDownSideVisible(false), |
|
|
|
, _orientationCalTailDownSideDone (false) |
|
|
|
_orientationCalLeftSideVisible(false), |
|
|
|
, _orientationCalDownSideVisible (false) |
|
|
|
_orientationCalRightSideVisible(false), |
|
|
|
, _orientationCalUpsideDownSideVisible (false) |
|
|
|
_orientationCalNoseDownSideVisible(false), |
|
|
|
, _orientationCalLeftSideVisible (false) |
|
|
|
_orientationCalTailDownSideVisible(false), |
|
|
|
, _orientationCalRightSideVisible (false) |
|
|
|
_orientationCalDownSideInProgress(false), |
|
|
|
, _orientationCalNoseDownSideVisible (false) |
|
|
|
_orientationCalUpsideDownSideInProgress(false), |
|
|
|
, _orientationCalTailDownSideVisible (false) |
|
|
|
_orientationCalLeftSideInProgress(false), |
|
|
|
, _orientationCalDownSideInProgress (false) |
|
|
|
_orientationCalRightSideInProgress(false), |
|
|
|
, _orientationCalUpsideDownSideInProgress (false) |
|
|
|
_orientationCalNoseDownSideInProgress(false), |
|
|
|
, _orientationCalLeftSideInProgress (false) |
|
|
|
_orientationCalTailDownSideInProgress(false), |
|
|
|
, _orientationCalRightSideInProgress (false) |
|
|
|
_orientationCalDownSideRotate(false), |
|
|
|
, _orientationCalNoseDownSideInProgress (false) |
|
|
|
_orientationCalUpsideDownSideRotate(false), |
|
|
|
, _orientationCalTailDownSideInProgress (false) |
|
|
|
_orientationCalLeftSideRotate(false), |
|
|
|
, _orientationCalDownSideRotate (false) |
|
|
|
_orientationCalRightSideRotate(false), |
|
|
|
, _orientationCalUpsideDownSideRotate (false) |
|
|
|
_orientationCalNoseDownSideRotate(false), |
|
|
|
, _orientationCalLeftSideRotate (false) |
|
|
|
_orientationCalTailDownSideRotate(false), |
|
|
|
, _orientationCalRightSideRotate (false) |
|
|
|
_unknownFirmwareVersion(false), |
|
|
|
, _orientationCalNoseDownSideRotate (false) |
|
|
|
_waitingForCancel(false) |
|
|
|
, _orientationCalTailDownSideRotate (false) |
|
|
|
|
|
|
|
, _unknownFirmwareVersion (false) |
|
|
|
|
|
|
|
, _waitingForCancel (false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -165,7 +163,9 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St |
|
|
|
switch (code) { |
|
|
|
switch (code) { |
|
|
|
case StopCalibrationSuccess: |
|
|
|
case StopCalibrationSuccess: |
|
|
|
_orientationCalAreaHelpText->setProperty("text", tr("Calibration complete")); |
|
|
|
_orientationCalAreaHelpText->setProperty("text", tr("Calibration complete")); |
|
|
|
emit resetStatusTextArea(); |
|
|
|
if (!_airspeedCalInProgress && !_levelCalInProgress) { |
|
|
|
|
|
|
|
emit resetStatusTextArea(); |
|
|
|
|
|
|
|
} |
|
|
|
if (_magCalInProgress) { |
|
|
|
if (_magCalInProgress) { |
|
|
|
emit setCompassRotations(); |
|
|
|
emit setCompassRotations(); |
|
|
|
} |
|
|
|
} |
|
|
@ -186,6 +186,7 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St |
|
|
|
_magCalInProgress = false; |
|
|
|
_magCalInProgress = false; |
|
|
|
_accelCalInProgress = false; |
|
|
|
_accelCalInProgress = false; |
|
|
|
_gyroCalInProgress = false; |
|
|
|
_gyroCalInProgress = false; |
|
|
|
|
|
|
|
_airspeedCalInProgress = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void SensorsComponentController::calibrateGyro(void) |
|
|
|
void SensorsComponentController::calibrateGyro(void) |
|
|
@ -336,6 +337,10 @@ void SensorsComponentController::_handleUASTextMessage(int uasId, int compId, in |
|
|
|
emit orientationCalSidesVisibleChanged(); |
|
|
|
emit orientationCalSidesVisibleChanged(); |
|
|
|
emit orientationCalSidesInProgressChanged(); |
|
|
|
emit orientationCalSidesInProgressChanged(); |
|
|
|
_updateAndEmitShowOrientationCalArea(true); |
|
|
|
_updateAndEmitShowOrientationCalArea(true); |
|
|
|
|
|
|
|
} else if (text == "airspeed") { |
|
|
|
|
|
|
|
_airspeedCalInProgress = true; |
|
|
|
|
|
|
|
} else if (text == "level") { |
|
|
|
|
|
|
|
_levelCalInProgress = true; |
|
|
|
} |
|
|
|
} |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|