From dcb377038ed78d85ea3b92d5822e36c236bfb508 Mon Sep 17 00:00:00 2001 From: dogmaphobic Date: Mon, 20 Apr 2015 00:20:50 -0400 Subject: [PATCH] Added RSSI Indicator to ToolBar. --- qgroundcontrol.qrc | 1 + resources/Battery_0.svg | 26 +- resources/Battery_100.svg | 37 +- resources/Battery_20.svg | 30 +- resources/Battery_40.svg | 32 +- resources/Battery_60.svg | 34 +- resources/Battery_80.svg | 36 +- resources/antenna.svg | 14 + src/audio/QGCAudioWorker.cpp | 12 +- src/audio/QGCAudioWorker.h | 2 +- src/comm/MAVLinkProtocol.h | 2 +- src/ui/SettingsDialog.cc | 6 + src/ui/SettingsDialog.h | 2 + src/ui/SettingsDialog.ui | 558 +++++++++++------------ src/ui/flightdisplay/QGCFlightDisplay.cc | 12 +- src/ui/toolbar/MainToolBar.cc | 49 +- src/ui/toolbar/MainToolBar.h | 20 +- src/ui/toolbar/MainToolBar.qml | 130 +++++- 18 files changed, 570 insertions(+), 433 deletions(-) create mode 100644 resources/antenna.svg diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index 96ade0b61..5f4a5f83f 100644 --- a/qgroundcontrol.qrc +++ b/qgroundcontrol.qrc @@ -156,6 +156,7 @@ resources/Kill.svg resources/Shutdown.svg + resources/antenna.svg resources/Gps.svg resources/Megaphone.png resources/Yield.png diff --git a/resources/Battery_0.svg b/resources/Battery_0.svg index 85faa5673..5abc16918 100644 --- a/resources/Battery_0.svg +++ b/resources/Battery_0.svg @@ -1,22 +1,16 @@ - -Battery - - - - + + + - + -X diff --git a/resources/Battery_100.svg b/resources/Battery_100.svg index 49d55f6d0..f06d3ac5e 100644 --- a/resources/Battery_100.svg +++ b/resources/Battery_100.svg @@ -1,31 +1,18 @@ - -Battery - - - - - - - - - + + + + - + diff --git a/resources/Battery_20.svg b/resources/Battery_20.svg index fcaa00c18..f456b0655 100644 --- a/resources/Battery_20.svg +++ b/resources/Battery_20.svg @@ -1,24 +1,18 @@ - -Battery - - - - - + + + + - + diff --git a/resources/Battery_40.svg b/resources/Battery_40.svg index b0f703411..3b823ac44 100644 --- a/resources/Battery_40.svg +++ b/resources/Battery_40.svg @@ -1,26 +1,18 @@ - -Battery - - - - - - + + + + - + diff --git a/resources/Battery_60.svg b/resources/Battery_60.svg index 299b58514..6892d6ec9 100644 --- a/resources/Battery_60.svg +++ b/resources/Battery_60.svg @@ -1,28 +1,18 @@ - -Battery - - - - - - - + + + + - + diff --git a/resources/Battery_80.svg b/resources/Battery_80.svg index 2e6625c3a..390a8f32e 100644 --- a/resources/Battery_80.svg +++ b/resources/Battery_80.svg @@ -1,30 +1,18 @@ - -Battery - - - - - - - - + + + + - + diff --git a/resources/antenna.svg b/resources/antenna.svg new file mode 100644 index 000000000..66555490b --- /dev/null +++ b/resources/antenna.svg @@ -0,0 +1,14 @@ + + + + + diff --git a/src/audio/QGCAudioWorker.cpp b/src/audio/QGCAudioWorker.cpp index 69a9e258e..4425a7908 100644 --- a/src/audio/QGCAudioWorker.cpp +++ b/src/audio/QGCAudioWorker.cpp @@ -100,7 +100,7 @@ void QGCAudioWorker::say(QString inText, int severity) if (!muted) { - QString text = _fixMillisecondString(inText); + QString text = _fixTextMessageForAudio(inText); // Prepend high priority text with alert beep if (severity < GAudioOutput::AUDIO_SEVERITY_CRITICAL) { beep(); @@ -187,10 +187,18 @@ bool QGCAudioWorker::_getMillisecondString(const QString& string, QString& match return false; } -QString QGCAudioWorker::_fixMillisecondString(const QString& string) { +QString QGCAudioWorker::_fixTextMessageForAudio(const QString& string) { QString match; QString newNumber; QString result = string; + //-- Look for modes + if(result.contains("POSCTL", Qt::CaseInsensitive)) { + result.replace("POSCTL", "Position Control", Qt::CaseInsensitive); + } else if(result.contains("ALTCTL", Qt::CaseInsensitive)) { + result.replace("ALTCTL", "Altitude Control", Qt::CaseInsensitive); + } else if(result.contains("RTL", Qt::CaseInsensitive)) { + result.replace("RTL", "Return To Land", Qt::CaseInsensitive); + } int number; if(_getMillisecondString(string, match, number) && number > 1000) { if(number < 60000) { diff --git a/src/audio/QGCAudioWorker.h b/src/audio/QGCAudioWorker.h index beafe429e..1d4032291 100644 --- a/src/audio/QGCAudioWorker.h +++ b/src/audio/QGCAudioWorker.h @@ -51,7 +51,7 @@ protected: QTimer *emergencyTimer; bool muted; private: - QString _fixMillisecondString(const QString& string); + QString _fixTextMessageForAudio(const QString& string); bool _getMillisecondString(const QString& string, QString& match, int& number); }; diff --git a/src/comm/MAVLinkProtocol.h b/src/comm/MAVLinkProtocol.h index e45aef2ad..b190008f6 100644 --- a/src/comm/MAVLinkProtocol.h +++ b/src/comm/MAVLinkProtocol.h @@ -254,7 +254,7 @@ signals: void paramRewriteTimeoutChanged(int ms); /** @brief Emitted if action guard status changed */ void actionGuardChanged(bool enabled); - /** @brief Emitted if actiion request timeout changed */ + /** @brief Emitted if action request timeout changed */ void actionRetransmissionTimeoutChanged(int ms); /** @brief Update the packet loss from one system */ void receiveLossChanged(int uasId, float loss); diff --git a/src/ui/SettingsDialog.cc b/src/ui/SettingsDialog.cc index 56e3fcfb5..bbe196c8f 100644 --- a/src/ui/SettingsDialog.cc +++ b/src/ui/SettingsDialog.cc @@ -81,6 +81,7 @@ _ui(new Ui::SettingsDialog) _ui->showGPS->setChecked(settings.value( TOOL_BAR_SHOW_GPS, true).toBool()); _ui->showMav->setChecked(settings.value( TOOL_BAR_SHOW_MAV, true).toBool()); _ui->showMessages->setChecked(settings.value(TOOL_BAR_SHOW_MESSAGES, true).toBool()); + _ui->showRSSI->setChecked(settings.value( TOOL_BAR_SHOW_RSSI, true).toBool()); settings.endGroup(); // Audio preferences _ui->audioMuteCheckBox->setChecked(GAudioOutput::instance()->isMuted()); @@ -206,3 +207,8 @@ void SettingsDialog::on_showMav_clicked(bool checked) { _mainWindow->getMainToolBar()->viewStateChanged(TOOL_BAR_SHOW_MAV, checked); } + +void SettingsDialog::on_showRSSI_clicked(bool checked) +{ + _mainWindow->getMainToolBar()->viewStateChanged(TOOL_BAR_SHOW_RSSI, checked); +} diff --git a/src/ui/SettingsDialog.h b/src/ui/SettingsDialog.h index e06128847..cd8568430 100644 --- a/src/ui/SettingsDialog.h +++ b/src/ui/SettingsDialog.h @@ -65,6 +65,8 @@ private slots: void on_showMessages_clicked(bool checked); void on_showMav_clicked(bool checked); + void on_showRSSI_clicked(bool checked); + private: MainWindow* _mainWindow; Ui::SettingsDialog* _ui; diff --git a/src/ui/SettingsDialog.ui b/src/ui/SettingsDialog.ui index 16bcdbec7..036595c81 100644 --- a/src/ui/SettingsDialog.ui +++ b/src/ui/SettingsDialog.ui @@ -7,7 +7,7 @@ 0 0 500 - 604 + 596 @@ -37,338 +37,326 @@ - - - 10 + + + + 0 + 0 + - - - - - 0 - 0 - - - - Mute all audio output - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - Automatically reconnect last link on application startup - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - Lowers all update rates to save battery power - - - Enable low power mode - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - Prompt to save Flight Data Log after each flight - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - Style - - - false - - - false - - + + Mute all audio output + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + Automatically reconnect last link on application startup + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + Lowers all update rates to save battery power + + + Enable low power mode + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + Prompt to save Flight Data Log after each flight + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + Style + + + false + + + false + + + + 8 + + + 8 + + + + + 0 + + + QLayout::SetDefaultConstraint + + + 0 + + + 80 + - - - QLayout::SetMinimumSize - - - 0 + + + + 0 + 0 + - - 80 + + + 200 + 0 + - - - - 0 - 0 - - - - - 200 - 0 - - - - - Dark (for indoor use) - - - - - Light (for outdoor use) - - - + + Dark (for indoor use) + - + + + Light (for outdoor use) + + + - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - File Locations - - + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + File Locations + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Specify the location you would like to save files: + + + true + + + + + - - - - 0 - 0 - - + - 0 - 0 + 200 + 21 - - Specify the location you would like to save files: + + 1024 - - true + + + + + + Browse + + + + + + + + + + 0 + 0 + + + + Tool Bar + + + + - + - + - 200 - 21 + 160 + 0 - - 1024 + + Show GPS - + - Browse + Show Messages - - - - - - - - 0 - 0 - - - - Tool Bar - - - + - - - - - - 160 - 0 - - - - Show GPS - - - - - - - Show Messages - - - - + + + + 160 + 0 + + + + Show Battery + + - - - - - - 160 - 0 - - - - Show Battery - - - - - - - Show Mav Icon - - - - + + + Show Mav Icon + + - - - - - - - Reset All Settings to Default - - - + - Delete all saved settings on next boot - - - - - - - - 11 - - - - Note: You can also use --clear-settings as a command line option to accomplish this. - - - true + Show RSSI - - - - - - Qt::Vertical - - - - 20 - 10 - - - - - + + + + + + + + Reset All Settings to Default + + + + + + Delete all saved settings on next boot + + + + + + + + 11 + + + + Note: You can also use --clear-settings as a command line option to accomplish this. + + + true + + + + + - audioMuteCheckBox - reconnectCheckBox - lowPowerCheckBox - promptFlightDataSave - groupBox - fileLocationsLayout - groupBox_2 - groupBox_3 diff --git a/src/ui/flightdisplay/QGCFlightDisplay.cc b/src/ui/flightdisplay/QGCFlightDisplay.cc index 537cdce8e..d7d2a4724 100644 --- a/src/ui/flightdisplay/QGCFlightDisplay.cc +++ b/src/ui/flightdisplay/QGCFlightDisplay.cc @@ -303,10 +303,14 @@ void QGCFlightDisplay::_checkUpdate() emit longitudeChanged(); } if(_mav) { - _latitude = _mav->getLatitude(); - _longitude = _mav->getLongitude(); - if(_latitude) emit latitudeChanged(); - if(_longitude) emit longitudeChanged(); + if(_latitude != _mav->getLatitude()) { + _latitude = _mav->getLatitude(); + emit latitudeChanged(); + } + if(_longitude != _mav->getLongitude()) { + _longitude = _mav->getLongitude(); + emit longitudeChanged(); + } } } diff --git a/src/ui/toolbar/MainToolBar.cc b/src/ui/toolbar/MainToolBar.cc index f10c31547..d42b2282a 100644 --- a/src/ui/toolbar/MainToolBar.cc +++ b/src/ui/toolbar/MainToolBar.cc @@ -58,8 +58,11 @@ MainToolBar::MainToolBar(QWidget* parent) , _showGPS(true) , _showMav(true) , _showMessages(true) + , _showRSSI(true) , _showBattery(true) , _progressBarValue(0.0f) + , _remoteRSSI(0.0f) + , _telemetryRSSI(0) , _rollDownMessages(0) { setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); @@ -95,10 +98,14 @@ MainToolBar::MainToolBar(QWidget* parent) emit heartbeatTimeoutChanged(_currentHeartbeatTimeout); emit connectionCountChanged(_connectionCount); // Link signals - connect(UASManager::instance(), &UASManager::activeUASSet, this, &MainToolBar::_setActiveUAS); - connect(LinkManager::instance(), &LinkManager::linkConfigurationChanged, this, &MainToolBar::_updateConfigurations); - connect(LinkManager::instance(), &LinkManager::linkConnected, this, &MainToolBar::_linkConnected); - connect(LinkManager::instance(), &LinkManager::linkDisconnected, this, &MainToolBar::_linkDisconnected); + connect(UASManager::instance(), &UASManager::activeUASSet, this, &MainToolBar::_setActiveUAS); + connect(LinkManager::instance(), &LinkManager::linkConfigurationChanged, this, &MainToolBar::_updateConfigurations); + connect(LinkManager::instance(), &LinkManager::linkConnected, this, &MainToolBar::_linkConnected); + connect(LinkManager::instance(), &LinkManager::linkDisconnected, this, &MainToolBar::_linkDisconnected); + // RSSI (didn't like standard connection) + connect(MAVLinkProtocol::instance(), + SIGNAL(radioStatusChanged(LinkInterface*, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned)), this, + SLOT(_telemetryChanged(LinkInterface*, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned))); } MainToolBar::~MainToolBar() @@ -124,6 +131,9 @@ void MainToolBar::_setToolBarState(const QString& key, bool value) } else if(key == TOOL_BAR_SHOW_MESSAGES) { _showMessages = value; emit showMessagesChanged(value); + } else if(key == TOOL_BAR_SHOW_RSSI) { + _showRSSI = value; + emit showRSSIChanged(value); } } @@ -296,6 +306,7 @@ void MainToolBar::_setActiveUAS(UASInterface* active) disconnect(_mav, &UASInterface::nameChanged, this, &MainToolBar::_updateName); disconnect(_mav, &UASInterface::systemTypeSet, this, &MainToolBar::_setSystemType); disconnect(_mav, &UASInterface::localizationChanged, this, &MainToolBar::_setSatLoc); + disconnect(_mav, &UASInterface::remoteControlRSSIChanged, this, &MainToolBar::_remoteControlRSSIChanged); disconnect(_mav, SIGNAL(statusChanged(UASInterface*,QString,QString)), this, SLOT(_updateState(UASInterface*,QString,QString))); disconnect(_mav, SIGNAL(armingChanged(bool)), this, SLOT(_updateArmingState(bool))); if (_mav->getWaypointManager()) @@ -324,6 +335,7 @@ void MainToolBar::_setActiveUAS(UASInterface* active) connect(_mav, &UASInterface::nameChanged, this, &MainToolBar::_updateName); connect(_mav, &UASInterface::systemTypeSet, this, &MainToolBar::_setSystemType); connect(_mav, &UASInterface::localizationChanged, this, &MainToolBar::_setSatLoc); + connect(_mav, &UASInterface::remoteControlRSSIChanged, this, &MainToolBar::_remoteControlRSSIChanged); connect(_mav, SIGNAL(statusChanged(UASInterface*,QString,QString)), this, SLOT(_updateState(UASInterface*, QString,QString))); connect(_mav, SIGNAL(armingChanged(bool)), this, SLOT(_updateArmingState(bool))); if (_mav->getWaypointManager()) @@ -347,6 +359,26 @@ void MainToolBar::_setActiveUAS(UASInterface* active) emit mavPresentChanged(_mav != NULL); } +void MainToolBar::_telemetryChanged(LinkInterface*, unsigned, unsigned, unsigned rssi, unsigned foo, unsigned, unsigned, unsigned) +{ + // If we don't have any connections or more than one, ignore it + if(_connectionCount == 1) { + if((unsigned)_telemetryRSSI != rssi) { + _telemetryRSSI = rssi; + emit telemetryRSSIChanged(_telemetryRSSI); + } + } + qDebug() << rssi << foo; +} + +void MainToolBar::_remoteControlRSSIChanged(float rssi) +{ + if(_remoteRSSI != rssi) { + _remoteRSSI = rssi; + emit remoteRSSIChanged(_remoteRSSI); + } +} + void MainToolBar::_updateArmingState(bool armed) { if(_systemArmed != armed) { @@ -426,6 +458,15 @@ void MainToolBar::_updateConnection(LinkInterface *disconnectedLink) _connectedList = connList; emit connectedListChanged(_connectedList); } + // Update telemetry RSSI display + if(_connectionCount == 0 && _telemetryRSSI > 0) { + _telemetryRSSI = 0; + emit telemetryRSSIChanged(_telemetryRSSI); + } + if(_connectionCount == 0 && _remoteRSSI > 0) { + _remoteRSSI = 0; + emit remoteRSSIChanged(_remoteRSSI); + } } void MainToolBar::_updateState(UASInterface*, QString name, QString) diff --git a/src/ui/toolbar/MainToolBar.h b/src/ui/toolbar/MainToolBar.h index 09ded3653..240e97788 100644 --- a/src/ui/toolbar/MainToolBar.h +++ b/src/ui/toolbar/MainToolBar.h @@ -37,6 +37,7 @@ This file is part of the QGROUNDCONTROL project #define TOOL_BAR_SHOW_GPS "ShowGPS" #define TOOL_BAR_SHOW_MAV "ShowMav" #define TOOL_BAR_SHOW_MESSAGES "ShowMessages" +#define TOOL_BAR_SHOW_RSSI "ShowRSSI" class UASInterface; class UASMessage; @@ -96,12 +97,17 @@ public: Q_PROPERTY(bool showMav MEMBER _showMav NOTIFY showMavChanged) Q_PROPERTY(bool showMessages MEMBER _showMessages NOTIFY showMessagesChanged) Q_PROPERTY(bool showBattery MEMBER _showBattery NOTIFY showBatteryChanged) + Q_PROPERTY(bool showRSSI MEMBER _showRSSI NOTIFY showRSSIChanged) Q_PROPERTY(float progressBarValue MEMBER _progressBarValue NOTIFY progressBarValueChanged) + Q_PROPERTY(float remoteRSSI READ remoteRSSI NOTIFY remoteRSSIChanged) + Q_PROPERTY(int telemetryRSSI READ telemetryRSSI NOTIFY telemetryRSSIChanged) - bool mavPresent () { return _mav != NULL; } + bool mavPresent () { return _mav != NULL; } + float remoteRSSI () { return _remoteRSSI; } + int telemetryRSSI () { return _telemetryRSSI; } - void setCurrentView (int currentView); - void viewStateChanged (const QString& key, bool value); + void setCurrentView (int currentView); + void viewStateChanged (const QString& key, bool value); signals: void connectionCountChanged (int count); @@ -126,7 +132,10 @@ signals: void showMavChanged (bool value); void showMessagesChanged (bool value); void showBatteryChanged (bool value); + void showRSSIChanged (bool value); void progressBarValueChanged (float value); + void remoteRSSIChanged (float value); + void telemetryRSSIChanged (int value); private slots: void _setActiveUAS (UASInterface* active); @@ -147,6 +156,8 @@ private slots: void _leaveMessageView (); void _setSatLoc (UASInterface* uas, int fix); void _setProgressBarValue (float value); + void _remoteControlRSSIChanged (float rssi); + void _telemetryChanged (LinkInterface* link, unsigned rxerrors, unsigned fixed, unsigned rssi, unsigned remrssi, unsigned txbuf, unsigned noise, unsigned remnoise); private: void _updateConnection (LinkInterface *disconnectedLink = NULL); @@ -180,8 +191,11 @@ private: bool _showGPS; bool _showMav; bool _showMessages; + bool _showRSSI; bool _showBattery; float _progressBarValue; + float _remoteRSSI; + int _telemetryRSSI; UASMessageViewRollDown* _rollDownMessages; }; diff --git a/src/ui/toolbar/MainToolBar.qml b/src/ui/toolbar/MainToolBar.qml index f58909947..c2570ed23 100644 --- a/src/ui/toolbar/MainToolBar.qml +++ b/src/ui/toolbar/MainToolBar.qml @@ -126,6 +126,11 @@ Rectangle { return colorGreen; } + function getRSSIColor() { + // TODO: Figure out RSSI threshold values + return colorBlue; + } + function showMavStatus() { return (mainToolBar.mavPresent && mainToolBar.heartbeatTimeout === 0 && mainToolBar.connectionCount > 0); } @@ -238,7 +243,7 @@ Rectangle { fillMode: Image.PreserveAspectFit anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left - anchors.leftMargin: getProportionalDimmension(10) + anchors.leftMargin: getProportionalDimmension(8) } Rectangle { @@ -314,7 +319,7 @@ Rectangle { Rectangle { id: satelitte - width: getProportionalDimmension(60) + width: getProportionalDimmension(50) height: cellHeight visible: showMavStatus() && (mainToolBar.showGPS) anchors.verticalCenter: parent.verticalCenter @@ -329,7 +334,7 @@ Rectangle { fillMode: Image.PreserveAspectFit anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left - anchors.leftMargin: getProportionalDimmension(10) + anchors.leftMargin: getProportionalDimmension(6) mipmap: true smooth: true } @@ -341,15 +346,124 @@ Rectangle { font.weight: Font.DemiBold anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: getProportionalDimmension(10) + anchors.rightMargin: getProportionalDimmension(6) horizontalAlignment: Text.AlignRight color: colorWhite } } + Rectangle { + id: rssi + width: getProportionalDimmension(70) + height: cellHeight + visible: showMavStatus() && (mainToolBar.showRSSI) && ((mainToolBar.remoteRSSI > 0) || (mainToolBar.telemetryRSSI > 0)) + anchors.verticalCenter: parent.verticalCenter + color: getRSSIColor(); + radius: cellRadius + border.color: "#00000000" + border.width: 0 + + Image { + source: "qrc:/res/Antenna"; + height: cellHeight * 0.65 + fillMode: Image.PreserveAspectFit + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: getProportionalDimmension(6) + mipmap: true + smooth: true + } + + Column { + id: rssiCombined + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: getProportionalDimmension(6) + visible: (mainToolBar.remoteRSSI > 0) && (mainToolBar.telemetryRSSI > 0) + Row { + anchors.right: parent.right + QGCLabel { + text: 'R ' + font.pointSize: screenTools.dpiAdjustedPointSize(12); + font.weight: Font.DemiBold + color: colorWhite + } + QGCLabel { + text: (mainToolBar.remoteRSSI * 100).toFixed(0) + width: getProportionalDimmension(20) + horizontalAlignment: Text.AlignRight + font.pointSize: screenTools.dpiAdjustedPointSize(12); + font.weight: Font.DemiBold + color: colorWhite + } + } + Row { + anchors.right: parent.right + QGCLabel { + text: 'T ' + font.pointSize: screenTools.dpiAdjustedPointSize(12); + font.weight: Font.DemiBold + color: colorWhite + } + QGCLabel { + text: mainToolBar.telemetryRSSI + width: getProportionalDimmension(20) + horizontalAlignment: Text.AlignRight + font.pointSize: screenTools.dpiAdjustedPointSize(12); + font.weight: Font.DemiBold + color: colorWhite + } + } + } + + Row { + id: telemetryRSSISingle + anchors.right: parent.right + anchors.rightMargin: getProportionalDimmension(6) + visible: (mainToolBar.remoteRSSI < 0.01) && (mainToolBar.telemetryRSSI > 0) + anchors.verticalCenter: parent.verticalCenter + QGCLabel { + text: 'T ' + font.pointSize: screenTools.dpiAdjustedPointSize(12); + font.weight: Font.DemiBold + color: colorWhite + } + QGCLabel { + text: mainToolBar.telemetryRSSI + width: getProportionalDimmension(20) + horizontalAlignment: Text.AlignRight + font.pointSize: screenTools.dpiAdjustedPointSize(12); + font.weight: Font.DemiBold + color: colorWhite + } + } + + Row { + id: remoteRSSISingle + anchors.right: parent.right + anchors.rightMargin: getProportionalDimmension(6) + visible: (mainToolBar.remoteRSSI > 0) && (mainToolBar.telemetryRSSI === 0) + anchors.verticalCenter: parent.verticalCenter + QGCLabel { + text: 'R ' + font.pointSize: screenTools.dpiAdjustedPointSize(12); + font.weight: Font.DemiBold + color: colorWhite + } + QGCLabel { + text: (mainToolBar.remoteRSSI * 100).toFixed(0) + width: getProportionalDimmension(20) + horizontalAlignment: Text.AlignRight + font.pointSize: screenTools.dpiAdjustedPointSize(12); + font.weight: Font.DemiBold + color: colorWhite + } + } + } + Rectangle { id: battery - width: getProportionalDimmension(80) + width: getProportionalDimmension(60) height: cellHeight visible: showMavStatus() && (mainToolBar.showBattery) anchors.verticalCenter: parent.verticalCenter @@ -371,12 +485,12 @@ Rectangle { QGCLabel { id: batteryText - text: mainToolBar.batteryVoltage.toFixed(1) + ' V'; - font.pointSize: screenTools.dpiAdjustedPointSize(14); + text: mainToolBar.batteryVoltage.toFixed(1) + 'V'; + font.pointSize: screenTools.dpiAdjustedPointSize(12); font.weight: Font.DemiBold anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: getProportionalDimmension(8) + anchors.rightMargin: getProportionalDimmension(6) horizontalAlignment: Text.AlignRight color: colorWhite } -- 2.22.0