Several EnvironmentMetrics enhancements #1037
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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