From b0d5b2c4dc602081762fa1c4dcabe0c076f1b20c Mon Sep 17 00:00:00 2001 From: sound-eng Date: Thu, 1 Feb 2024 22:37:21 +0200 Subject: [PATCH] fix to properly report Manual TCP mode IP address, also small UI change (#658) I've merged it, but we first need to see if the new size does work on all resolutions we currently support, .. it's quite a little annoying --- app/telemetry/MavlinkTelemetry.cpp | 5 +++-- qml/ui/configpopup/connect/PaneConnectionMode.qml | 2 +- qml/ui/configpopup/status/StatusCardRow.qml | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/telemetry/MavlinkTelemetry.cpp b/app/telemetry/MavlinkTelemetry.cpp index 34203fd1e..7cb84f5cf 100644 --- a/app/telemetry/MavlinkTelemetry.cpp +++ b/app/telemetry/MavlinkTelemetry.cpp @@ -303,6 +303,7 @@ bool MavlinkTelemetry::change_manual_tcp_ip(QString ip) return false; } m_connction_manual_tcp_ip=std::make_shared(ip.toStdString()); + return true; } void MavlinkTelemetry::send_heartbeat_loop() @@ -373,8 +374,8 @@ void MavlinkTelemetry::perform_connection_management() } } std::stringstream ss; - ss<<"MANUAL TCP -"; - if(m_udp_connection->threadsafe_is_alive()){ + ss<<"MANUAL TCP - "; + if(m_tcp_connection->threadsafe_is_alive()){ ss<<"CONNECTED"; }else{ ss<<"WRONG IP ? ["< 260 ? 260 : parent.width + width: parent.width > 400 ? 400 : parent.width height: main_item.height anchors.centerIn: parent @@ -80,6 +80,7 @@ Item { font.pixelSize: 18 clip: true elide: Text.ElideRight + padding: 4 } Text{ @@ -90,12 +91,13 @@ Item { anchors.top: left_part.top text: m_right_text verticalAlignment: Qt.AlignVCenter - horizontalAlignment: Qt.AlignHCenter + horizontalAlignment: Qt.AlignLeft color: m_has_error ? m_right_text_color_error : m_right_text_color visible: !right_part_button.visible font.pixelSize: 18 clip: true elide: Text.ElideRight + padding: 4 } MouseArea { enabled: m_has_error && !m_look_shit_on_error