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