mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Fix environment metrics log
This commit is contained in:
parent
1851e96e7a
commit
4c25e8a589
3 changed files with 5 additions and 4 deletions
|
|
@ -121,9 +121,10 @@ struct MapViewSwiftUI: UIViewRepresentable {
|
|||
.filter { $0.latest == true }
|
||||
.sorted { $0.nodePosition?.num ?? 0 > $1.nodePosition?.num ?? -1 }
|
||||
let annotationCount = waypoints.count + (showNodeHistory ? positions.count : latest.count)
|
||||
print("Annotation Count: \(annotationCount) Map Annotations: \(mapView.annotations.count)")
|
||||
|
||||
|
||||
if annotationCount != mapView.annotations.count {
|
||||
print("Annotation Count: \(annotationCount) Map Annotations: \(mapView.annotations.count)")
|
||||
mapView.removeAnnotations(mapView.annotations)
|
||||
mapView.addAnnotations(waypoints)
|
||||
if showRouteLines {
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ struct DeviceMetricsLog: View {
|
|||
}
|
||||
}
|
||||
Button {
|
||||
exportString = telemetryToCsvFile(telemetry: node.telemetries!.array as? [TelemetryEntity] ?? [], metricsType: 0)
|
||||
exportString = telemetryToCsvFile(telemetry: deviceMetrics, metricsType: 0)
|
||||
isExporting = true
|
||||
} label: {
|
||||
Label("save", systemImage: "square.and.arrow.down")
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ struct EnvironmentMetricsLog: View {
|
|||
.font(.caption)
|
||||
.fontWeight(.bold)
|
||||
}
|
||||
ForEach(node.telemetries?.reversed() as? [TelemetryEntity] ?? [], id: \.self) { (em: TelemetryEntity) in
|
||||
ForEach(environmentMetrics, id: \.self) { em in
|
||||
|
||||
GridRow {
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ struct EnvironmentMetricsLog: View {
|
|||
}
|
||||
}
|
||||
Button {
|
||||
exportString = telemetryToCsvFile(telemetry: node.telemetries!.array as? [TelemetryEntity] ?? [], metricsType: 1)
|
||||
exportString = telemetryToCsvFile(telemetry: environmentMetrics, metricsType: 1)
|
||||
isExporting = true
|
||||
} label: {
|
||||
Label("save", systemImage: "square.and.arrow.down")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue