Skip to content

Commit

Permalink
fix to properly report Manual TCP mode IP address, also small UI chan…
Browse files Browse the repository at this point in the history
…ge (#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
  • Loading branch information
sound-eng authored Feb 1, 2024
1 parent d3d34e1 commit b0d5b2c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions app/telemetry/MavlinkTelemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ bool MavlinkTelemetry::change_manual_tcp_ip(QString ip)
return false;
}
m_connction_manual_tcp_ip=std::make_shared<std::string>(ip.toStdString());
return true;
}

void MavlinkTelemetry::send_heartbeat_loop()
Expand Down Expand Up @@ -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 ? ["<<user_ip<<"]";
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/connect/PaneConnectionMode.qml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Rectangle{
text: "SAVE"
onClicked: {
if(!_mavlinkTelemetry.change_manual_tcp_ip(textFieldip.text)){
_qopenhd.toast_text("Please enter a valid ip");
_qopenhd.show_toast("Please enter a valid ip");
}else{
settings.qopenhd_mavlink_connection_manual_tcp_ip=textFieldip.text
}
Expand Down
6 changes: 4 additions & 2 deletions qml/ui/configpopup/status/StatusCardRow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Item {
}*/
// Actual item,centered
Item{
width: parent.width > 260 ? 260 : parent.width
width: parent.width > 400 ? 400 : parent.width
height: main_item.height
anchors.centerIn: parent

Expand All @@ -80,6 +80,7 @@ Item {
font.pixelSize: 18
clip: true
elide: Text.ElideRight
padding: 4
}

Text{
Expand All @@ -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
Expand Down

0 comments on commit b0d5b2c

Please sign in to comment.