Add sensor life configuration for Anubis transmitters #8
Open
MikePlante1 wants to merge 2 commits into
Open
Conversation
Implements user-configurable sensor session length (10–60 days) for Anubis-modded transmitters, while maintaining stock 10-day sessions for standard G5/G6 transmitters. Key changes: - Transmitter version frame detection identifies Anubis modification (180-day expiry) - sessionExpDate now updated dynamically based on configured sensor life - Warmup period adjusted for Anubis (50 min) vs stock (2 h) - Settings UI provides wheel picker for sensor life selection (10–60 days) - State persistence for selected sensor life across app sessions
Add a guard statement to keep the session progress ring hidden until the transmitter session enters its final 48 hours. This improves the user experience by reducing visual clutter during the early stages of a session.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds user-configurable sensor session length (10–60 days) for Anubis-modded
G6 transmitters, while stock G5/G6 transmitters keep the standard 10-day
session. Also limits the sensor lifecycle progress bar on the main view so it
only appears during the final 48 hours of a session, matching G7SensorKit
behavior.
Builds on the earlier work surfacing G5/G6 sensor lifecycle and detecting
Anubis-modded transmitters via the version frame.
Changes
frame) is read on connect until known (
needsExpiryRead) and persisted inTransmitterManagerState; a reported 180-day lifetime identifies an Anubistransmitter.
session length (10–60 days), shown for Anubis transmitters only. The value
is clamped, persisted across app restarts, and stock transmitters remain
fixed at 10 days.
sessionExpDateis stamped on each reading fromthe configured sensor life, and refreshed when the setting changes or the
transmitter reports its expiry.
configured
expectedLifetime, and awarmupPeriodof 50 min for Anubis vs2 h for stock.
the final 48 h of the session (warning state inside 24 h, critical at
expiry), matching G7SensorKit. Without this gate the bar sits on the main
view for the entire session. The warmup ring is unaffected.