Commit addfdbc4 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #3542 from DonLakeFlyer/SensorsSmall

Sensors: small screen fixes
parents 9f6cb35a 939b9c85
......@@ -26,6 +26,7 @@ APMSensorsComponentController::APMSensorsComponentController(void) :
_accelButton(NULL),
_nextButton(NULL),
_cancelButton(NULL),
_setOrientationsButton(NULL),
_showOrientationCalArea(false),
_magCalInProgress(false),
_accelCalInProgress(false),
......@@ -85,6 +86,7 @@ void APMSensorsComponentController::_startLogCalibration(void)
_compassButton->setEnabled(false);
_accelButton->setEnabled(false);
_setOrientationsButton->setEnabled(false);
if (_accelCalInProgress) {
_nextButton->setEnabled(true);
}
......@@ -95,6 +97,7 @@ void APMSensorsComponentController::_startVisualCalibration(void)
{
_compassButton->setEnabled(false);
_accelButton->setEnabled(false);
_setOrientationsButton->setEnabled(false);
_cancelButton->setEnabled(true);
_resetInternalState();
......@@ -138,6 +141,7 @@ void APMSensorsComponentController::_stopCalibration(APMSensorsComponentControll
_compassButton->setEnabled(true);
_accelButton->setEnabled(true);
_setOrientationsButton->setEnabled(true);
_nextButton->setEnabled(false);
_cancelButton->setEnabled(false);
......
......@@ -36,6 +36,7 @@ public:
Q_PROPERTY(QQuickItem* accelButton MEMBER _accelButton)
Q_PROPERTY(QQuickItem* nextButton MEMBER _nextButton)
Q_PROPERTY(QQuickItem* cancelButton MEMBER _cancelButton)
Q_PROPERTY(QQuickItem* setOrientationsButton MEMBER _setOrientationsButton)
Q_PROPERTY(QQuickItem* orientationCalAreaHelpText MEMBER _orientationCalAreaHelpText)
Q_PROPERTY(bool compassSetupNeeded READ compassSetupNeeded NOTIFY setupNeededChanged)
......@@ -123,6 +124,7 @@ private:
QQuickItem* _accelButton;
QQuickItem* _nextButton;
QQuickItem* _cancelButton;
QQuickItem* _setOrientationsButton;
QQuickItem* _orientationCalAreaHelpText;
bool _showOrientationCalArea;
......
......@@ -108,6 +108,7 @@ QGCView {
airspeedButton: airspeedButton
levelButton: levelButton
cancelButton: cancelButton
setOrientationsButton: setOrientationsButton
orientationCalAreaHelpText: orientationCalAreaHelpText
onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText
......@@ -398,6 +399,7 @@ QGCView {
}
QGCButton {
id: setOrientationsButton
width: parent.buttonWidth
text: qsTr("Set Orientations")
onClicked: showDialog(setOrientationsDialogComponent, qsTr("Set Orientations"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
......
......@@ -30,6 +30,7 @@ SensorsComponentController::SensorsComponentController(void) :
_airspeedButton(NULL),
_levelButton(NULL),
_cancelButton(NULL),
_setOrientationsButton(NULL),
_showOrientationCalArea(false),
_gyroCalInProgress(false),
_magCalInProgress(false),
......@@ -98,6 +99,7 @@ void SensorsComponentController::_startVisualCalibration(void)
_accelButton->setEnabled(false);
_airspeedButton->setEnabled(false);
_levelButton->setEnabled(false);
_setOrientationsButton->setEnabled(false);
_cancelButton->setEnabled(true);
_resetInternalState();
......@@ -140,6 +142,7 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St
_accelButton->setEnabled(true);
_airspeedButton->setEnabled(true);
_levelButton->setEnabled(true);
_setOrientationsButton->setEnabled(true);
_cancelButton->setEnabled(false);
if (code == StopCalibrationSuccess) {
......
......@@ -40,6 +40,7 @@ public:
Q_PROPERTY(QQuickItem* airspeedButton MEMBER _airspeedButton)
Q_PROPERTY(QQuickItem* levelButton MEMBER _levelButton)
Q_PROPERTY(QQuickItem* cancelButton MEMBER _cancelButton)
Q_PROPERTY(QQuickItem* setOrientationsButton MEMBER _setOrientationsButton)
Q_PROPERTY(QQuickItem* orientationCalAreaHelpText MEMBER _orientationCalAreaHelpText)
Q_PROPERTY(bool showOrientationCalArea MEMBER _showOrientationCalArea NOTIFY showOrientationCalAreaChanged)
......@@ -121,6 +122,7 @@ private:
QQuickItem* _airspeedButton;
QQuickItem* _levelButton;
QQuickItem* _cancelButton;
QQuickItem* _setOrientationsButton;
QQuickItem* _orientationCalAreaHelpText;
bool _showGyroCalArea;
......
......@@ -21,7 +21,7 @@ QGCTextField {
// At this point all Facts are numeric
validator: DoubleValidator {}
inputMethodHints: ScreenTools.isiOS ?
Qt.ImhNone : // iOS numeric keyboard has not done button, we can't use eit
Qt.ImhNone : // iOS numeric keyboard has not done button, we can't use it
Qt.ImhFormattedNumbersOnly // Forces use of virtual numeric keyboard
onEditingFinished: {
......
......@@ -104,8 +104,9 @@ QGCViewDialog {
visible: fact.enumStrings.length == 0 || validate
//focus: true
// At this point all Facts are numeric
inputMethodHints: Qt.ImhFormattedNumbersOnly
inputMethodHints: ScreenTools.isiOS ?
Qt.ImhNone : // iOS numeric keyboard has not done button, we can't use it
Qt.ImhFormattedNumbersOnly // Forces use of virtual numeric keyboard
}
QGCButton {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment