-
Notifications
You must be signed in to change notification settings - Fork 54
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
False interpretation of decimal #61
Comments
Hey, sorry for such a delay in responding. I think this maybe the string to decimal function cleaning "0,55" to 055. Can you confirm that if you enter "0.55" (dot, not comma) works correctly? |
First I tried only replacing the decimal places, leaving the dot in place, but 0.55 became 55. Then I tried using the dot as decimal point, but 0.55 still became 55. |
ok, thanks, ill perform some tests and get back to you. Does 1.55 work ok?
On Fri, 9 Jun 2017 at 11:15 YPOC ***@***.***> wrote:
First I tried only replacing the decimal places, leaving the dot in place,
but 0.55 became 55. Then I tried using the dot as decimal point, but 0.55
still became 55.
When I press the comma on my keyboard nothing gets inserted.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#61 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AE_kFOvRrAdQWXv8QRySEME50X0xEoz2ks5sCQ1FgaJpZM4NlCnd>
.
--
IT Consultant, Diabetic Hacker | www.twoit.co.uk
|
1.55 becomes 155 as well. |
Ok, thanks, that is odd, ill get a Android 7 DE VM setup
On Fri, 9 Jun 2017 at 11:25 YPOC ***@***.***> wrote:
1.55 becomes 155 as well.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#61 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AE_kFIclC4Lj2CTq-OxSfuMnm1wiPArcks5sCQ-egaJpZM4NlCnd>
.
--
IT Consultant, Diabetic Hacker | www.twoit.co.uk
|
Hey @YPOC , please test the following apk. So the issue was in two places, first, the edit text box was limited so that only decimal numbers with a "." can be used. Second, the function that converts a Sting to Double correctly detected you are DE, found a string with a dot "0.55", as this is incorrect for DE as it expected a "," it removes the dot "055". One option to fix this is to allow the edit text box to enter any number with "," or "." and allow the Sting to Double function to clean it up, but, this could result in an input of a DE user entering "0.55" and it being converted to "055", but "0,55" would work correctly. I do not like this as it means we have to be sure for locations that use "," as a decimal separator that they never use "." A better approach is to keep the input fields locked to decimal with "." - this means I can control the user input (even if they don't like it!) and correct the Sting to Double function to never expect "," Please test and let me know your thoughts? (Looks like I have already fixed this in Dev and may not have pushed it to master) |
When entering carbs or insulin shots with decimal places the decimal point gets omitted, so inputting 0.55 results in 55.0. The same goes for entering the basal profile.
I'm using Happ on an Android 7.0.1 phone with the system language set to German, where the default decimal sign is , (comma). It would be nice if it was possible to enter values with either decimal point or decimal comma, currently I have to press the dot for a decimal sign to appear in the input field.
The text was updated successfully, but these errors were encountered: