mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Properly acknowledge in the environment metrics graph that sometimes Canada is not frozen
This commit is contained in:
parent
5641896ed2
commit
baaa88dbec
3 changed files with 8 additions and 4 deletions
|
|
@ -182,7 +182,7 @@ struct UserMessageList: View {
|
|||
if message.realACK {
|
||||
Text("\(ackErrorVal?.display ?? "Empty Ack Error")").font(.caption2).foregroundColor(.gray)
|
||||
} else {
|
||||
Text("Implicit ACK from Unknown Node").font(.caption2).foregroundColor(.orange)
|
||||
Text("Implicit ACK from another node").font(.caption2).foregroundColor(.orange)
|
||||
}
|
||||
} else if currentUser && message.ackError == 0 {
|
||||
// Empty Error
|
||||
|
|
|
|||
|
|
@ -27,7 +27,10 @@ struct EnvironmentMetricsLog: View {
|
|||
let chartData = environmentMetrics
|
||||
.filter { $0.time != nil && $0.time! >= oneWeekAgo! }
|
||||
.sorted { $0.time! < $1.time! }
|
||||
|
||||
let locale = NSLocale.current as NSLocale
|
||||
let localeUnit = locale.object(forKey: NSLocale.Key(rawValue: "kCFLocaleTemperatureUnitKey"))
|
||||
var format: UnitTemperature = localeUnit as? String ?? "Celsius" == "Fahrenheit" ? .fahrenheit : .celsius
|
||||
|
||||
NavigationStack {
|
||||
|
||||
if chartData.count > 0 {
|
||||
|
|
@ -69,7 +72,7 @@ struct EnvironmentMetricsLog: View {
|
|||
.chartXAxis(content: {
|
||||
AxisMarks(position: .top)
|
||||
})
|
||||
.chartYScale(domain: 0...125)
|
||||
.chartYScale(domain: format == .celsius ? -20...50 : 0...125)
|
||||
.chartForegroundStyleScale([
|
||||
"Temperature" : .clear
|
||||
])
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ struct AdminMessageList: View {
|
|||
var body: some View {
|
||||
let localeDateFormat = DateFormatter.dateFormat(fromTemplate: "yyMMddjmmssa", options: 0, locale: Locale.current)
|
||||
let dateFormatString = (localeDateFormat ?? "MM/dd/YY j:mm:ss a")
|
||||
|
||||
List {
|
||||
if user != nil {
|
||||
|
||||
|
|
@ -47,7 +48,7 @@ struct AdminMessageList: View {
|
|||
.foregroundColor(am.receivedACK ? .gray : .red)
|
||||
.font(.caption2)
|
||||
} else {
|
||||
Text("Implicit ACK from Unknown Node")
|
||||
Text("Implicit ACK from another node")
|
||||
.foregroundColor(.orange)
|
||||
.font(.caption2)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue