-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add specific regional versions of Microtech and Ottai in companion #3756
base: master
Are you sure you want to change the base?
Conversation
… mode. 2. Modify companion mode so that when an xDrip user selects mg/dL as the display unit, if the source reading is in mmol/L, it is multiplied by 18 to convert to mg/dL.
Thanks for this. I don't think you need to convert units here. xDrip already offers the user to choose the unit they desire. This has nothing to do with the units used in the companion app. If you can show a scenario where xDrip does not let you choose the unit of your choice, I would love to see a video clip. All that is just my suggestion and is not the review that counts. |
Thank you for your reply. Initially, I only added the first four lines, but I noticed that com.ottai.tag was not displaying correctly. Since com.ottai.tag is intended for specific regions, its unit cannot be changed and defaults to mmol/L. With mmol/L, decimal points are used, which leads to a java.lang.NumberFormatException in the original code when it reaches the line: mgdl = Integer.parseInt(String.valueOf(ftext)) Given the cost advantage of com.ottai.tag, I’d like to convert the CGM readings in mmol/L to be used as mg/dL. Please review this approach, thank you. |
There is no reason to mention the cost advantage. It's really irrelevant to what I suggested. Can you show a notification of the companion app instead of the app itself? |
When you compiled your original attempt with only the first 4 lines, did it work if you chose mmol/L in xDrip and only failed when you chose mg/dL in xDrip? I know that you want to use mg/dL. I'm not suggesting otherwise. But, I am asking as a test, would it work if you chose mmol/L? |
Yes, if mmol/L is selected as the unit in xDrip, it can read the values from com.ottai.tag. |
OK, Thanks again for your submission. |
Wait a minute! This is actually a limitation of the companion app mode. |
Alright, I'll wait for your response. |
So the only problem with this PR is the mixing of units. One of the main reasons to only parse mmol/l units from a companion app for a mmol/l xDrip is to avoid any chance of parsing data which is not glucose related to minimize any chance of getting the wrong values. I would have to think on it further but I think to allow this we might have to introduce a new configuration option so that the user has to opt in to using different units like this. |
Thank you for your response. Looking forward to the final decision. |
Explanation: In some regions, CGMs are more affordable. Addressing the differences in blood glucose units enables users without insurance to access and use these more affordable CGM options.