Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions DroneTrackingPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Rectangle {
}


// Drone list view
// Drone list view-----------------
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert* :)

ListView {
id: droneListView
Layout.fillWidth: true
Expand Down Expand Up @@ -256,12 +256,15 @@ Rectangle {

Image {
id: statusIcon
source: {
modelData.altitude > 0.05 ? "qrc:/resources/droneStatusSVG.svg" : "qrc:/resources/grounded.png"
}
source: mainPanel.isIndexSelected(index) ? "qrc:/resources/droneMapIconSelected.svg"
: (modelData.altitude > 0.05 ? "qrc:/resources/droneStatusSVG.svg" : "qrc:/resources/grounded.png")
sourceSize.width: GcsStyle.PanelStyle.statusIconSize
sourceSize.height: GcsStyle.PanelStyle.statusIconSize
Layout.alignment: Qt.AlignVCenter
opacity: mainPanel.isIndexSelected(index) ? 1.0 : 0.6
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert :)

Behavior on opacity {
NumberAnimation { duration: 150 }
}
}

ColumnLayout {
Expand Down
13 changes: 12 additions & 1 deletion QmlMap.qml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ Item {

Image {
id: markerImage
source: "qrc:/resources/droneMapIconSVG.svg"
readonly property bool isCurrentDroneSelected: droneIsSelected(modelData)
source: isCurrentDroneSelected ? "qrc:/resources/droneMapIconSelected.svg" : "qrc:/resources/droneMapIconSVG.svg"
width: 100 // controlling w or h affects the whole image due to preserving the aspect fit
fillMode: Image.PreserveAspectFit
}
Expand Down Expand Up @@ -306,6 +307,16 @@ Item {
}
}

function droneIsSelected(modelData) {
for (let drone of selectedDrones) {
if (drone.latitude === modelData.latitude) {
return true
}
}
return false
}


onActiveDroneChanged: {
if (activeDrone === null) {
turnOffFollowDrone()
Expand Down
1 change: 1 addition & 0 deletions QtMap.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<file>fireSVG.svg</file>
<file>fireSVGDarkMode.svg</file>
<file>droneMapIconSVG.svg</file>
<file>droneMapIconSelected.svg</file>
</qresource>
<qresource prefix="/gcsStyle">
<file>panelStyle.qml</file>
Expand Down
62 changes: 62 additions & 0 deletions droneMapIcon-SVG.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 33 additions & 61 deletions droneMapIconSVG.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions droneMapIconSelected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion extern/pybind11
Submodule pybind11 updated 211 files
2 changes: 1 addition & 1 deletion external/mavlink
Submodule mavlink updated 243 files
7 changes: 5 additions & 2 deletions main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Window {
id: mapComponent
anchors.fill: parent
activeDrone: mainWindow.activeDrone
selectedDrones: mainWindow.selectedDrones // Not yet implemented. But will be like this
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert :)

selectedDrones: mainWindow.selectedDrones
onZoomScaleChanged: function(coord1, coord2, pixelLength) {
mapScaleBar.updateScaleBar(coord1, coord2, pixelLength)
}
Expand Down Expand Up @@ -62,9 +62,12 @@ Window {
z: 100
}

//active drone, initial anchor drone, clicked selected first,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert :)

//more than one selected, pass in list of selected drones to qml map, -> use list to determine what is selected
//to select each drone, to change our icon.
TelemetryPanel {
id: telemetryPanel
activeDrone: mainWindow.activeDrone
activeDrone: mainWindow.activeDrone // Pass the active drone reference to the telemetry panel
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert :)

anchors {
bottom: parent.bottom
margins: GcsStyle.PanelStyle.applicationBorderMargin
Expand Down
2 changes: 1 addition & 1 deletion third_party/c_library_v2
Submodule c_library_v2 updated 247 files