-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several EnvironmentMetrics enhancements #1037
base: main
Are you sure you want to change the base?
Conversation
1049409
to
cd10961
Compare
I've been using this enhancement for a few weeks successfully. Having nil values lets you avoid showing bad data (zeros) on the charts and graphs, and also lets the widgets show themselves based on whether there is really data. The one thing I'd say is related to persisting the chart series and table columns. I find them to be not persistent enough. By attaching the persistence data to the NodeInfoEntity, you lose the settings when the node is purged. I find myself wanting a separate "NodeDefaultsEntity" that holds this information separate from the NodeInfoEntity. This would allow your preferred settings to persist even when NodeInfoEntities are removed/reloaded. This would break the "node is the user" model a little, by maintaining a bit of data that persists across users/nodes and would only be purged with an app or nodeDB reset. Questions to determine the future of this pull request:
|
What changed?
How was it implemented:
EnvironmentDefaultColumns
andEnvironmentDefaultSeries
files.MetricsChartSeries
was extended to provide aminumumYAxisSpan
andinitialYAxisRange
. The forces the chart to a 0-100 scale when humidity is added, and keeps the temperature scale to be a 50-degree spread. If the data requires larger scales, these ranges will be expanded as necessary.MeshtasticDataModelV 48.xcdatamodel
was created with changes toNodeInfoEntity
:telemetryColumns
andtelemetrySeries
were added as [String] arrays. These will hold the list of chart series and the list of table columns that the user has active per-node.TelemetryEntity
was disabled (Manual/none). Manual implementations were provided inTelemetryEntity+CoreDataClass
andTelemetryEntity+CoreDataProperties
ManagedAttribute
property wrapper was created to handle the translation of NSNumbers to scalar optionals.TelemetryEntity+CoreDataClass
is the manual NSManagedObject class implementation that uses the before metioned@ManagedAttribute
to implement scalar optional accessors for various metrics attributes.TelemetryEntity+CoreDataProperties
is the manual NSManagedObject extension that contains standard@NSManaged
implementationsMeshPackets.swift
was updated to load nil values into the database when thehasXXXX
is false, and the actual value with it is true.Why did it change?
Continued evolution of the Environment Metrics Log view.
How is this tested?
Testing is ongoing. he change to optional scalars touches a bunch of places in the app. Wouldn't mind more eyes on this to see if it works as expected.
Screenshots/Videos (when applicable)
Checklist