fix autosens

bgi's most of the time where 0 or got truncated to full integers.

Example from tonight: autosens result factor from 1.0 before and 1.09 after this.
This commit is contained in:
AdrianLxM 2017-01-28 01:20:36 +01:00 committed by GitHub
parent 1e8defb884
commit 4ced11819c

View file

@ -98,7 +98,7 @@ public class Autosens {
// avgDelta = avgDelta.toFixed(2);
IobTotal iob = IobTotal.calulateFromTreatmentsAndTemps(bgTime);
double bgi = Math.round((-iob.activity * sens * 5) * 100) / 100;
double bgi = Math.round((-iob.activity * sens * 5) * 100) / 100d;
// bgi = bgi.toFixed(2);
//console.error(delta);
double deviation = delta - bgi;