Commit 23ab840c authored by Gus Grubba's avatar Gus Grubba

Linux fixes

parent db5c070a
...@@ -37,7 +37,7 @@ Rectangle { ...@@ -37,7 +37,7 @@ Rectangle {
property real _valueWidth: ScreenTools.defaultFontPixelWidth * 20 property real _valueWidth: ScreenTools.defaultFontPixelWidth * 20
property real _panelWidth: _root.width * _internalWidthRatio property real _panelWidth: _root.width * _internalWidthRatio
property Fact _microhardEnabledFact: QGroundControl.settingsManager.appSettings.enableMicrohard property Fact _microhardEnabledFact: QGroundControl.settingsManager.appSettings.enableMicrohard
property bool _microhardEnabled: _microhardEnabledFact.rawValue property bool _microhardEnabled: _microhardEnabledFact ? _microhardEnabledFact.rawValue : false
readonly property real _internalWidthRatio: 0.8 readonly property real _internalWidthRatio: 0.8
...@@ -80,7 +80,7 @@ Rectangle { ...@@ -80,7 +80,7 @@ Rectangle {
text: qsTr("Enable Microhard") text: qsTr("Enable Microhard")
fact: _microhardEnabledFact fact: _microhardEnabledFact
enabled: true enabled: true
visible: _microhardEnabledFact.visible visible: _microhardEnabledFact ? _microhardEnabledFact.visible : false
} }
} }
} }
......
...@@ -144,7 +144,7 @@ void PairingNFC::run() ...@@ -144,7 +144,7 @@ void PairingNFC::run()
while(!_exitThread) while(!_exitThread)
{ {
qCDebug(PairingNFCLog) << "Waiting for NFC connection"; qCDebug(PairingNFCLog) << "Waiting for NFC connection";
qgcApp()->toolbox()->pairingManager()->setStatusMessage(tr("Waiting for NFC connection")); qgcApp()->toolbox()->pairingManager()->setStatusMessage(PairingManager::PairingActive, tr("Waiting for NFC connection"));
// Wait until a peer is discovered // Wait until a peer is discovered
while(NxpNci_WaitForDiscoveryNotification(&RfInterface) != NFC_SUCCESS); while(NxpNci_WaitForDiscoveryNotification(&RfInterface) != NFC_SUCCESS);
...@@ -158,14 +158,14 @@ void PairingNFC::run() ...@@ -158,14 +158,14 @@ void PairingNFC::run()
qCDebug(PairingNFCLog) << "Wrong discovery"; qCDebug(PairingNFCLog) << "Wrong discovery";
} }
} }
qgcApp()->toolbox()->pairingManager()->setStatusMessage(""); qgcApp()->toolbox()->pairingManager()->setStatusMessage(PairingManager::PairingIdle, "");
qCDebug(PairingNFCLog) << "NFC: Stop"; qCDebug(PairingNFCLog) << "NFC: Stop";
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void PairingNFC::task_nfc_reader(NxpNci_RfIntf_t RfIntf) void PairingNFC::task_nfc_reader(NxpNci_RfIntf_t RfIntf)
{ {
qgcApp()->toolbox()->pairingManager()->setStatusMessage(tr("Device detected")); qgcApp()->toolbox()->pairingManager()->setStatusMessage(PairingManager::PairingActive, tr("Device detected"));
qCDebug(PairingNFCLog) << "NFC: Device detected"; qCDebug(PairingNFCLog) << "NFC: Device detected";
// For each discovered cards // For each discovered cards
while(!_exitThread) { while(!_exitThread) {
...@@ -202,7 +202,7 @@ void PairingNFC::task_nfc_reader(NxpNci_RfIntf_t RfIntf) ...@@ -202,7 +202,7 @@ void PairingNFC::task_nfc_reader(NxpNci_RfIntf_t RfIntf)
// Wait for card removal // Wait for card removal
NxpNci_ProcessReaderMode(RfIntf, PRESENCE_CHECK); NxpNci_ProcessReaderMode(RfIntf, PRESENCE_CHECK);
qgcApp()->toolbox()->pairingManager()->setStatusMessage(tr("Device removed")); qgcApp()->toolbox()->pairingManager()->setStatusMessage(PairingManager::PairingActive, tr("Device removed"));
qCDebug(PairingNFCLog) << "NFC device removed"; qCDebug(PairingNFCLog) << "NFC device removed";
// Restart discovery loop // Restart discovery loop
......
...@@ -26,6 +26,7 @@ Item { ...@@ -26,6 +26,7 @@ Item {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
property bool _light: qgcPal.globalTheme === QGCPalette.Light && !activeVehicle property bool _light: qgcPal.globalTheme === QGCPalette.Light && !activeVehicle
property real _contentWidth: ScreenTools.defaultFontPixelWidth * 30 property real _contentWidth: ScreenTools.defaultFontPixelWidth * 30
property real _contentSpacing: ScreenTools.defaultFontPixelHeight * 0.5
Row { Row {
id: pairingRow id: pairingRow
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
...@@ -91,7 +92,7 @@ Item { ...@@ -91,7 +92,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
Column { Column {
id: comboListCol id: comboListCol
spacing: ScreenTools.defaultFontPixelHeight spacing: _contentSpacing
anchors.centerIn: parent anchors.centerIn: parent
Item { width: 1; height: 1; } Item { width: 1; height: 1; }
QGCLabel { QGCLabel {
...@@ -103,7 +104,7 @@ Item { ...@@ -103,7 +104,7 @@ Item {
Item { width: 1; height: 1; } Item { width: 1; height: 1; }
Rectangle { Rectangle {
width: ScreenTools.defaultFontPixelWidth * 40 width: ScreenTools.defaultFontPixelWidth * 40
height: ScreenTools.defaultFontPixelHeight * 12 height: ScreenTools.defaultFontPixelHeight * 8
color: Qt.rgba(0,0,0,0) color: Qt.rgba(0,0,0,0)
border.color: qgcPal.text border.color: qgcPal.text
border.width: 1 border.width: 1
...@@ -166,7 +167,7 @@ Item { ...@@ -166,7 +167,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
Column { Column {
id: mhCol id: mhCol
spacing: ScreenTools.defaultFontPixelHeight spacing: _contentSpacing
anchors.centerIn: parent anchors.centerIn: parent
Item { width: 1; height: 1; } Item { width: 1; height: 1; }
QGCLabel { QGCLabel {
...@@ -186,7 +187,7 @@ Item { ...@@ -186,7 +187,7 @@ Item {
Item { width: 1; height: 1; } Item { width: 1; height: 1; }
Rectangle { Rectangle {
width: ScreenTools.defaultFontPixelWidth * 40 width: ScreenTools.defaultFontPixelWidth * 40
height: ScreenTools.defaultFontPixelHeight * 12 height: ScreenTools.defaultFontPixelHeight * 8
color: Qt.rgba(0,0,0,0) color: Qt.rgba(0,0,0,0)
border.color: qgcPal.text border.color: qgcPal.text
border.width: 1 border.width: 1
...@@ -235,7 +236,7 @@ Item { ...@@ -235,7 +236,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
Column { Column {
id: nfcCol id: nfcCol
spacing: ScreenTools.defaultFontPixelHeight spacing: _contentSpacing
anchors.centerIn: parent anchors.centerIn: parent
Item { width: 1; height: 1; } Item { width: 1; height: 1; }
QGCLabel { QGCLabel {
...@@ -304,7 +305,7 @@ Item { ...@@ -304,7 +305,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
Column { Column {
id: connectionCol id: connectionCol
spacing: ScreenTools.defaultFontPixelHeight spacing: _contentSpacing * 2
anchors.centerIn: parent anchors.centerIn: parent
Item { width: 1; height: 1; } Item { width: 1; height: 1; }
QGCLabel { QGCLabel {
......
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