fix TBR U->% rounding

This commit is contained in:
Milos Kozak 2020-07-15 13:10:00 +02:00
parent 04bb3c3558
commit ee3f63c327

View file

@ -395,7 +395,7 @@ public class TemporaryBasal implements Interval, DbObjectBase {
if (isFakeExtended) {
return (int) ((profile.getBasal(time) + netExtendedRate) / profile.getBasal(time)) * 100;
} else if (isAbsolute) {
return (int) (absoluteRate / profile.getBasal(time)) * 100;
return (int) (absoluteRate / profile.getBasal(time) * 100);
} else {
return percentRate;
}