mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
2.7.2 Device Metrics Crash Fix (#1400)
* Bump version * iOS 26 styled keyboard toolbar Update tips backgrounds * Link the logo to the about page * Remove double logo on node list, update scary location log message, update tls toggle visibility and keyboard scroll dismiss on mqtt config * Remove redundant colorScheme check * Change background for textfield from a capsule to a RoundedRectangle * Fix device metrics crash * Add back rule marks for network colors
This commit is contained in:
parent
d95db4eb1e
commit
b0eeeaf874
2 changed files with 46 additions and 56 deletions
|
|
@ -42088,4 +42088,4 @@
|
|||
}
|
||||
},
|
||||
"version" : "1.1"
|
||||
}
|
||||
}
|
||||
|
|
@ -38,64 +38,54 @@ struct DeviceMetricsLog: View {
|
|||
GroupBox(label: Label("\(deviceMetrics.count) Readings Total", systemImage: "chart.xyaxis.line")) {
|
||||
Chart {
|
||||
ForEach(chartData, id: \.self) { point in
|
||||
if let batteryLevel = point.batteryLevel {
|
||||
Plot {
|
||||
LineMark(
|
||||
x: .value("x", point.time!),
|
||||
y: .value("y", batteryLevel)
|
||||
)
|
||||
if let pointTime = point.time {
|
||||
if let batteryLevel = point.batteryLevel {
|
||||
Plot {
|
||||
LineMark(
|
||||
x: .value("x", pointTime),
|
||||
y: .value("y", batteryLevel)
|
||||
)
|
||||
}
|
||||
.accessibilityLabel("Line Series")
|
||||
.accessibilityValue("X: \(pointTime), Y: \(batteryLevel)")
|
||||
.foregroundStyle(batteryChartColor)
|
||||
.interpolationMethod(.linear)
|
||||
}
|
||||
.accessibilityLabel("Line Series")
|
||||
.accessibilityValue("X: \(point.time!), Y: \(batteryLevel)")
|
||||
.foregroundStyle(batteryChartColor)
|
||||
.interpolationMethod(.linear)
|
||||
}
|
||||
if let channelUtilization = point.channelUtilization {
|
||||
Plot {
|
||||
PointMark(
|
||||
x: .value("x", point.time!),
|
||||
y: .value("y", channelUtilization)
|
||||
)
|
||||
.symbolSize(25)
|
||||
if let channelUtilization = point.channelUtilization {
|
||||
Plot {
|
||||
PointMark(
|
||||
x: .value("x", pointTime),
|
||||
y: .value("y", channelUtilization)
|
||||
)
|
||||
.symbolSize(25)
|
||||
}
|
||||
.accessibilityLabel("Line Series")
|
||||
.accessibilityValue("X: \(pointTime), Y: \(channelUtilization)")
|
||||
.foregroundStyle(channelUtilizationChartColor)
|
||||
}
|
||||
.accessibilityLabel("Line Series")
|
||||
.accessibilityValue("X: \(point.time!), Y: \(channelUtilization)")
|
||||
.foregroundStyle(channelUtilizationChartColor)
|
||||
}
|
||||
if let chartSelection {
|
||||
RuleMark(x: .value("Second", chartSelection, unit: .second))
|
||||
.foregroundStyle(.tertiary.opacity(0.5))
|
||||
// .annotation(
|
||||
// position: .automatic,
|
||||
// overflowResolution: .init(x: .fit, y: .disabled)
|
||||
// ) {
|
||||
// ZStack {
|
||||
// Text("\(getTelemetry(for: chartSelection))")
|
||||
// }
|
||||
// .padding()
|
||||
// .background {
|
||||
// RoundedRectangle(cornerRadius: 4)
|
||||
// .foregroundStyle(Color.accentColor.opacity(0.2))
|
||||
// }
|
||||
// }
|
||||
}
|
||||
RuleMark(y: .value("Network Status Orange", 25))
|
||||
.lineStyle(StrokeStyle(lineWidth: 1, dash: [5, 10]))
|
||||
.foregroundStyle(.orange)
|
||||
RuleMark(y: .value("Network Status Red", 50))
|
||||
.lineStyle(StrokeStyle(lineWidth: 1, dash: [5, 10]))
|
||||
.foregroundStyle(.red)
|
||||
if let airUtilTx = point.airUtilTx {
|
||||
Plot {
|
||||
PointMark(
|
||||
x: .value("x", point.time!),
|
||||
y: .value("y", airUtilTx)
|
||||
)
|
||||
.symbolSize(25)
|
||||
if let chartSelection {
|
||||
RuleMark(x: .value("Second", chartSelection, unit: .second))
|
||||
.foregroundStyle(.tertiary.opacity(0.5))
|
||||
}
|
||||
RuleMark(y: .value("Network Status Orange", 25))
|
||||
.lineStyle(StrokeStyle(lineWidth: 1, dash: [5, 10]))
|
||||
.foregroundStyle(.orange)
|
||||
RuleMark(y: .value("Network Status Red", 50))
|
||||
.lineStyle(StrokeStyle(lineWidth: 1, dash: [5, 10]))
|
||||
.foregroundStyle(.red)
|
||||
|
||||
if let airUtilTx = point.airUtilTx {
|
||||
Plot {
|
||||
PointMark(
|
||||
x: .value("x", pointTime),
|
||||
y: .value("y", airUtilTx)
|
||||
)
|
||||
.symbolSize(25)
|
||||
}
|
||||
.accessibilityLabel("Line Series")
|
||||
.accessibilityValue("X: \(pointTime), Y: \(airUtilTx)")
|
||||
.foregroundStyle(airtimeChartColor)
|
||||
}
|
||||
.accessibilityLabel("Line Series")
|
||||
.accessibilityValue("X: \(point.time!), Y: \(airUtilTx)")
|
||||
.foregroundStyle(airtimeChartColor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue