Merge pull request #931 from MilosKozak/cobchart
align failoverToMinAbsorbtionRate to cobtime
This commit is contained in:
commit
e951a924c4
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue