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

Harmonize mmol/l and mg/dl related outputs as number in rT (requested Temp) #1413

Open
mountrcg opened this issue Nov 30, 2021 · 0 comments · Fixed by #1414
Open

Harmonize mmol/l and mg/dl related outputs as number in rT (requested Temp) #1413

mountrcg opened this issue Nov 30, 2021 · 0 comments · Fixed by #1414

Comments

@mountrcg
Copy link
Contributor

Function convert_bg

function convert_bg(value, profile)

results in bg-related objects of rT
rT.reason="COB: " + meal_data.mealCOB + ", Dev: " + convert_bg(deviation, profile) + ", BGI: " + convert_bg(bgi, profile) + ", ISF: " + convert_bg(sens, profile) + ", CR: " + round(profile.carb_ratio, 2) + ", Target: " + convert_bg(target_bg, profile) + ", minPredBG " + convert_bg(minPredBG, profile) + ", minGuardBG " + convert_bg(minGuardBG, profile) + ", IOBpredBG " + convert_bg(lastIOBpredBG, profile);

being treated differently if user uses mmol/l or if user display in mg/dl. Variables in mg/dl will be numbers, those converted in mmol/l by above function will be strings. Subsequential usage of rT must then differentiate between these different definitions. This can be avoided by omitting the string formating in function convert_bg

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 a pull request may close this issue.

1 participant