fix different colors BG vs target range
This commit is contained in:
parent
9ee329b7db
commit
5c9baa31f3
1 changed files with 2 additions and 8 deletions
|
@ -220,14 +220,8 @@ public class BgReading implements DataPointWithLabelInterface {
|
||||||
@Override
|
@Override
|
||||||
public int getColor() {
|
public int getColor() {
|
||||||
String units = ProfileFunctions.getInstance().getProfileUnits();
|
String units = ProfileFunctions.getInstance().getProfileUnits();
|
||||||
Double lowLine = SP.getDouble("low_mark", 0d);
|
Double lowLine = OverviewPlugin.getPlugin().determineLowLine(units);
|
||||||
Double highLine = SP.getDouble("high_mark", 0d);
|
Double highLine = OverviewPlugin.getPlugin().determineHighLine(units);
|
||||||
if (lowLine < 1) {
|
|
||||||
lowLine = Profile.fromMgdlToUnits(OverviewPlugin.bgTargetLow, units);
|
|
||||||
}
|
|
||||||
if (highLine < 1) {
|
|
||||||
highLine = Profile.fromMgdlToUnits(OverviewPlugin.bgTargetHigh, units);
|
|
||||||
}
|
|
||||||
int color = MainApp.gc(R.color.inrange);
|
int color = MainApp.gc(R.color.inrange);
|
||||||
if (isPrediction())
|
if (isPrediction())
|
||||||
return getPredectionColor();
|
return getPredectionColor();
|
||||||
|
|
Loading…
Reference in a new issue