Skip to content

Conversation

@scottleibrand
Copy link
Contributor

Since the original mealAssist days, the carbs value in meal.json, also known as mealCarbs in some files, has contained the total number of carbs seen in the last 6 hours or so. When using this value in determine-basal to blend COB and UAM, it would be better if carbs value only contained those carbs used in calculating the current COB value, and ignored carbs from previous meals that had fully expired before the current meal (and weren't stacked on top of it).

This change removes from carbs any carb values that don't end up getting used in COB calculation.

@scottleibrand scottleibrand added this to the 0.6.0 milestone Sep 6, 2017
@sulkaharo
Copy link
Collaborator

👍 I was wondering about that, should have asked. :)

@PieterGit
Copy link
Contributor

👍 I also wondered about the variable names. Shouldn't carbs named carbs_on_board to make the meaning more clear?

@scottleibrand
Copy link
Contributor Author

@PieterGit No, in meal.json, carbs is the total carbs entered (now for the current meal, instead of the last 6h). mealCOB is the carbs still on board.

@sulkaharo
Copy link
Collaborator

So, total_carbs and carbs_on_board then? ;)

@PieterGit
Copy link
Contributor

PieterGit commented Sep 6, 2017

If I understand @scottleibrand comments correctly I would propose carbs_last_meal, carbs_last_6h and carbs_on_board. Dropping mealCOB if it means carbs_on_board would be a very good idea for 0.6.x. That would also harmonize pump loop output and Nightscout. Showing it as COB in the reason field and Nightscout UI is fine by me.

@scottleibrand
Copy link
Contributor Author

If you're going to start renaming variables, you're going to very quickly end up with having to do so everywhere in the system, and dealing with dependencies on input and output json files as well. I'd say let's not do that ad hoc as part of something like this. If you want to make a comprehensive proposal for which variables need to be renamed, we can discuss and agree and then go make all the changes together, perhaps as their own patch release to avoid making the other diffs completely unreadable.

@scottleibrand scottleibrand merged commit 6c2456f into 0.6.0-dev Sep 7, 2017
@scottleibrand scottleibrand deleted the redefine-mealCarbs branch September 7, 2017 06:14
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.

4 participants