Merge pull request #931 from MilosKozak/cobchart

align failoverToMinAbsorbtionRate to cobtime
This commit is contained in:
Milos Kozak 2018-04-27 10:54:39 +02:00 committed by GitHub
commit e951a924c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -28,6 +28,10 @@ import info.nightscout.utils.SP;
public class AutosensData implements DataPointWithLabelInterface {
private static Logger log = LoggerFactory.getLogger(AutosensData.class);
public void setChartTime(long chartTime) {
this.chartTime = chartTime;
}
static class CarbsInPast {
long time = 0L;
double carbs = 0d;
@ -52,6 +56,7 @@ public class AutosensData implements DataPointWithLabelInterface {
}
public long time = 0L;
long chartTime;
public String pastSensitivity = "";
public double deviation = 0d;
boolean nonCarbsDeviation = false;
@ -121,7 +126,7 @@ public class AutosensData implements DataPointWithLabelInterface {
@Override
public double getX() {
return time;
return chartTime;
}
@Override
@ -151,7 +156,7 @@ public class AutosensData implements DataPointWithLabelInterface {
@Override
public float getSize() {
return 1f;
return 0.5f;
}
@Override

View file

@ -385,6 +385,7 @@ public class GraphData {
}
if (autosensData.failoverToMinAbsorbtionRate) {
autosensData.setScale(cobScale);
autosensData.setChartTime(time);
minFailoverActiveList.add(autosensData);
}
}
@ -395,7 +396,7 @@ public class GraphData {
cobData = cobArray.toArray(cobData);
cobSeries = new FixedLineGraphSeries<>(cobData);
cobSeries.setDrawBackground(true);
cobSeries.setBackgroundColor(0xB0FFFFFF & MainApp.gc(R.color.cob)); //50%
cobSeries.setBackgroundColor(0x80FFFFFF & MainApp.gc(R.color.cob)); //50%
cobSeries.setColor(MainApp.gc(R.color.cob));
cobSeries.setThickness(3);