diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index 96ade0b61cffd6205ed90bd8e9b3f232ab784a44..5f4a5f83f1f3eeaed4e9f7ed4945e0785b507e13 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 85faa5673beedf5625f8736b94ffa365ca1ae168..5abc1691819fe0f31575bd925880946ce717833d 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 49d55f6d0b189986d3b1a52d7cd2d8906831a958..f06d3ac5ea8df0ee03f9736e7849bff4f3a57845 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 fcaa00c18deb9b6603b7158cfd202e16ce61eb0d..f456b06558d15f133d5574e457dc818c82c17f0c 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 b0f7034115939c200c7109245012d62be06e55ea..3b823ac4416b66a2b8c15df5ab44122dfa79d62e 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 299b58514191d72b6ed411dfb5bc16201c3ef173..6892d6ec9e753f2f33ccf264ab5b0dcee617118e 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 2e6625c3a4b561d1e5bb43a7888ef57601fcfd8d..390a8f32e690c6f8d3209c9bccecfdd11eb41be6 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 0000000000000000000000000000000000000000..66555490ba924ef2cfd5246eb050036500504871 --- /dev/null +++ b/resources/antenna.svg @@ -0,0 +1,14 @@ + + + + + diff --git a/src/audio/QGCAudioWorker.cpp b/src/audio/QGCAudioWorker.cpp index 69a9e258e15cb90f31bf8b66c4bb1352d020936d..4425a7908725de69f00159264cb6106cbe5405d3 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 beafe429e7329040576ba11728787def41dcad60..1d40322912c976340feb02b4cbc6c7049ab1ecbe 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 e45aef2ad5e09634aee39e96b0b7ddbaa6b9b09e..b190008f6351bad9f71b6c46c3ba854d6972d0f0 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 56e3fcfb51ff48a45f09b6e37f8ea7ce87d8873f..bbe196c8f28c6f9e859d28e1032a5e8c30b5213d 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 e06128847169c839be9bb8e49672bd574d83956a..cd85684306c05b02bab945071f1c79258d34b02b 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 16bcdbec7fcf824741fd1b24f3b800a872a538dd..036595c8181c5e781afccf83a1b511923c1bf39a 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 537cdce8e22cc30928845d0e94eee910d29c1a58..d7d2a4724f7bfabd1331990066ba586a62e5ac99 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 f10c31547458f73dcd6c5ff914e521507425d853..d42b2282aa2fe407bc0103336567dabc39bf47cd 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 09ded36532beed5c6deff598df18c7cae1c50201..240e9778808dab481b3ded40ccfd3c7e00cd7362 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 f5890994738c834bfb95cf981f612ea98604b3c8..c2570ed23025ebd2134234f60391e48d0602c4c0 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 }