Skip to content

Conversation

nhamming
Copy link

when there is no cgm or pump, gray out loop. also remove caption when loop is open

@nhamming nhamming requested review from Camji55 and ps2 October 15, 2025 14:15
Copy link

@ps2 ps2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a q about possible cleanup.

let carbModel: CarbAbsorptionModel = FeatureFlags.nonlinearCarbModelEnabled ? .piecewiseLinear : .linear

self.automaticDosingStatus = UserDefaults.standard.automaticDosingStatus ?? AutomaticDosingStatus(automaticDosingEnabled: UserDefaults.standard.automationHistory.last?.enabled ?? false, isAutomaticDosingAllowed: false)
self.automaticDosingStatus = UserDefaults.standard.automaticDosingStatus ?? AutomaticDosingStatus(automaticDosingEnabled: UserDefaults.standard.automationHistory.last?.enabled ?? false, isAutomaticDosingAllowed: true)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the AutomaticDosingStatus struct needed anymore, now that we're not trying to combine system state with user intention for closed loop state?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also wondered about this. Honestly, I'm not sure. Defaulting isAutomaticDosingAllowed to true and removing that observance seems like the same as removing isAutomaticDosingAllowed.

@nhamming nhamming force-pushed the nate/LOOP-5452/loop-status-fixes branch from 3f39b54 to 5d8198c Compare October 16, 2025 16:26
@nhamming nhamming merged commit a1fb4fa into dev Oct 16, 2025
@nhamming nhamming deleted the nate/LOOP-5452/loop-status-fixes branch October 16, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants