Skip to content

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

@mountrcg

Description

@mountrcg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions