Merge pull request #931 from MilosKozak/cobchart
align failoverToMinAbsorbtionRate to cobtime
This commit is contained in:
commit
e951a924c4
2 changed files with 9 additions and 3 deletions
|
@ -28,6 +28,10 @@ import info.nightscout.utils.SP;
|
||||||
public class AutosensData implements DataPointWithLabelInterface {
|
public class AutosensData implements DataPointWithLabelInterface {
|
||||||
private static Logger log = LoggerFactory.getLogger(AutosensData.class);
|
private static Logger log = LoggerFactory.getLogger(AutosensData.class);
|
||||||
|
|
||||||
|
public void setChartTime(long chartTime) {
|
||||||
|
this.chartTime = chartTime;
|
||||||
|
}
|
||||||
|
|
||||||
static class CarbsInPast {
|
static class CarbsInPast {
|
||||||
long time = 0L;
|
long time = 0L;
|
||||||
double carbs = 0d;
|
double carbs = 0d;
|
||||||
|
@ -52,6 +56,7 @@ public class AutosensData implements DataPointWithLabelInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
public long time = 0L;
|
public long time = 0L;
|
||||||
|
long chartTime;
|
||||||
public String pastSensitivity = "";
|
public String pastSensitivity = "";
|
||||||
public double deviation = 0d;
|
public double deviation = 0d;
|
||||||
boolean nonCarbsDeviation = false;
|
boolean nonCarbsDeviation = false;
|
||||||
|
@ -121,7 +126,7 @@ public class AutosensData implements DataPointWithLabelInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getX() {
|
public double getX() {
|
||||||
return time;
|
return chartTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -151,7 +156,7 @@ public class AutosensData implements DataPointWithLabelInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getSize() {
|
public float getSize() {
|
||||||
return 1f;
|
return 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -385,6 +385,7 @@ public class GraphData {
|
||||||
}
|
}
|
||||||
if (autosensData.failoverToMinAbsorbtionRate) {
|
if (autosensData.failoverToMinAbsorbtionRate) {
|
||||||
autosensData.setScale(cobScale);
|
autosensData.setScale(cobScale);
|
||||||
|
autosensData.setChartTime(time);
|
||||||
minFailoverActiveList.add(autosensData);
|
minFailoverActiveList.add(autosensData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -395,7 +396,7 @@ public class GraphData {
|
||||||
cobData = cobArray.toArray(cobData);
|
cobData = cobArray.toArray(cobData);
|
||||||
cobSeries = new FixedLineGraphSeries<>(cobData);
|
cobSeries = new FixedLineGraphSeries<>(cobData);
|
||||||
cobSeries.setDrawBackground(true);
|
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.setColor(MainApp.gc(R.color.cob));
|
||||||
cobSeries.setThickness(3);
|
cobSeries.setThickness(3);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue