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

Ability to see Glucose Change in Carbohydrates screen prior to current day. #681

Closed
natetr opened this issue Feb 18, 2018 · 13 comments
Closed

Comments

@natetr
Copy link

natetr commented Feb 18, 2018

Is there a way to adjust how far back the carbohydrates screen shows the carbs entered on the chart? When meals are still being absorbed overnight it would be nice to see how the carbs acted when I wake up in the morning. Currently, it looks like Loop resets the carb chart sometime in the middle of the night so I don't see how a meal I ate the prior evening was observed vs. predicted. This would be helpful to know in order to make adjustments to my meals.
img_3047

@elnjensen
Copy link
Contributor

I agree that this would be useful. Nightscout helps some here, but doesn't provide the same info that the Loop carb view does. I'm not sure what a good UI solution would be, though. Is there a way to programmatically snapshot and (temporarily) save what a previous UI view would have been even if the user didn't load that view?

@natetr
Copy link
Author

natetr commented Feb 26, 2018

Is it possible to just set the time frame to show more hours on the table? I played around with the file "CarbAbsorptionViewController.swift" in this section by increasing max hours to line 109:

let date = Date(timeIntervalSinceNow: -TimeInterval(hours: max(1, totalHours)))

While it did allow me to look further back in time it also adjusted the chart at the top to the point that it was unreadable. I don't know Swift (or any code for that matter) so I wasn't sure what else I could adjust to show more hours in just the table.

@Kdisimone
Copy link
Collaborator

Kdisimone commented Feb 26, 2018

screen shot 2018-02-26 at 9 27 48 am

I haven't played with it, but I'm thinking that searching for midnight in the Loop files is a good place to start. There's three references in the CarbAbsorptionViewController.swift that are relevant.

The view starts over at midnight based on the current code.

@natetr
Copy link
Author

natetr commented Feb 26, 2018

So if I understand correctly midnight is defined in let midnight and then each use after that is referencing the definition used in let midnight?

@Kdisimone
Copy link
Collaborator

Kdisimone commented Feb 26, 2018

Actually, looking at it a little deeper, I'm guessing you need to go to LoopKit (not Loop). That looks like the Loop is for the carb absorption (top graph of ICE), not the carbstore. I'd go to LoopKit. Although I really should not half-ass my searching...I am just offering some ideas of where to look. Sorry...not a well-planned search yet. lol

screen shot 2018-02-26 at 10 05 08 am

@natetr
Copy link
Author

natetr commented Feb 26, 2018

@Kdisimone Thanks for finding that for me. I'll see what I can find in there and hopefully I won't break everything :)

@francescaneri
Copy link

@natetr did you find a solution?

@natetr
Copy link
Author

natetr commented May 23, 2018

I did not, unfortunately. I still think it could be really helpful but I just didn't have the time/know how to dig deeper into it.

@bharat
Copy link

bharat commented Jun 14, 2018

If you set midnight to an earlier time, it seems to work properly. For example, I set it to a rolling 24 window with this change in one of my branches: bharat@81b9ef7

Here's what it looks like:
screen shot 2018-06-14 at 1 56 04 pm

This screenshot was taken at 1:30 PM and it shows data back to 7 PM of the prior evening.

Note that the chart time window doesn't change- that would make the chart too cramped. But it does show you more historical data. If this solves your problem, I'll submit a pull request. Let me know!

@natetr
Copy link
Author

natetr commented Jun 14, 2018

That's perfect! Thanks for figuring that out. Solves my problem.

@NightScoutForSeb
Copy link

Showing entries from the last 12h or even a rolling 24h would solve the problem for me.

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Nov 19, 2023
Copy link

github-actions bot commented Dec 4, 2023

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as completed Dec 4, 2023
ps2 pushed a commit that referenced this issue Oct 5, 2024
#681)

* separating new data from uploads to remove blocking queues

* putting the performUpload task on the main thread

* removing unneeded awaits

* corrected function call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants