Basal sum in label
This commit is contained in:
parent
e6565c1911
commit
c181aaaf34
1 changed files with 4 additions and 2 deletions
|
@ -18,6 +18,8 @@ import info.nightscout.androidaps.interfaces.Interval;
|
||||||
import info.nightscout.androidaps.plugins.Overview.graphExtensions.DataPointWithLabelInterface;
|
import info.nightscout.androidaps.plugins.Overview.graphExtensions.DataPointWithLabelInterface;
|
||||||
import info.nightscout.androidaps.plugins.Overview.graphExtensions.PointsWithLabelGraphSeries;
|
import info.nightscout.androidaps.plugins.Overview.graphExtensions.PointsWithLabelGraphSeries;
|
||||||
import info.nightscout.utils.DateUtil;
|
import info.nightscout.utils.DateUtil;
|
||||||
|
import info.nightscout.utils.DecimalFormatter;
|
||||||
|
import info.nightscout.utils.SafeParse;
|
||||||
|
|
||||||
@DatabaseTable(tableName = DatabaseHelper.DATABASE_PROFILESWITCHES)
|
@DatabaseTable(tableName = DatabaseHelper.DATABASE_PROFILESWITCHES)
|
||||||
public class ProfileSwitch implements Interval, DataPointWithLabelInterface {
|
public class ProfileSwitch implements Interval, DataPointWithLabelInterface {
|
||||||
|
@ -66,7 +68,7 @@ public class ProfileSwitch implements Interval, DataPointWithLabelInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCustomizedName() {
|
public String getCustomizedName() {
|
||||||
String name = profileName;
|
String name = DecimalFormatter.to2Decimal(getProfileObject().percentageBasalSum()) + "U/h ";
|
||||||
if (isCPP) {
|
if (isCPP) {
|
||||||
name += "(" + percentage + "%," + timeshift + "h)";
|
name += "(" + percentage + "%," + timeshift + "h)";
|
||||||
}
|
}
|
||||||
|
@ -187,7 +189,7 @@ public class ProfileSwitch implements Interval, DataPointWithLabelInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getLabel() {
|
public String getLabel() {
|
||||||
return profileName;
|
return getCustomizedName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue