Skip to content
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

Dana. Can't set any .14 basal rates. #961

Closed
Tracked by #1003
Jon-b-m opened this issue Nov 25, 2024 · 3 comments
Closed
Tracked by #1003

Dana. Can't set any .14 basal rates. #961

Jon-b-m opened this issue Nov 25, 2024 · 3 comments

Comments

@Jon-b-m
Copy link
Member

Jon-b-m commented Nov 25, 2024

You can set .13 and .15, but whenever you're trying to set a .14 basal rate. (0.14, 1.14, ... ) in Basal settings in iAPS with a Dana pump it can't be set from iAPS, instead it's converted to a 0 U/h setting. Or actually it is saved to pump, but in iAPS it gets saved as 0.

Not sure where the bug is at yet.

Tagging @bastiaanv.

@53645714n
Copy link

Same happens for .28, .56, but nót for 1.28 and 1.56..

@bastiaanv
Copy link
Contributor

Like @Jon-b-m stated, the value is being set in the Dana pump, but it is also being set in the json:

[
  {
    "minutes" : 0,
    "start" : "00:00:00",
    "rate" : 0.14000000000000002048
  },
  {
    "rate" : 0.08,
    "minutes" : 420,
    "start" : "07:00:00"
  }
]

This means that BasalProfileEntry.init function is malfunctioning. I believe it has to do with the lossless conversion of this decimal.

Screenshot 2024-12-16 at 19 46 56

My proposed change would be in FreeAps -> Sources -> Models -> BasalProfileEntry.swift:

let rate = try Decimal(floatLiteral: container.decode(Double.self, forKey: .rate))

See #1004

@Jon-b-m
Copy link
Member Author

Jon-b-m commented Dec 16, 2024

Yes. Thanks!

@Jon-b-m Jon-b-m closed this as completed Dec 16, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in iAPS Development Board Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants