reactivate bad tuerkis and format basal
This commit is contained in:
parent
a746b0fe05
commit
1186360df4
2 changed files with 13 additions and 2 deletions
|
@ -108,6 +108,10 @@ public class TemporaryBasal implements Interval, DbObjectBase {
|
||||||
this.pumpId = extendedBolus.pumpId;
|
this.pumpId = extendedBolus.pumpId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String toDuration() {
|
||||||
|
return "(" + getRealDuration() + "/" + durationInMinutes + "')";
|
||||||
|
}
|
||||||
|
|
||||||
public TemporaryBasal clone() {
|
public TemporaryBasal clone() {
|
||||||
TemporaryBasal t = new TemporaryBasal();
|
TemporaryBasal t = new TemporaryBasal();
|
||||||
t.date = date;
|
t.date = date;
|
||||||
|
|
|
@ -1151,7 +1151,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
String basalText = "";
|
String basalText = "";
|
||||||
if (shorttextmode) {
|
if (shorttextmode) {
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
basalText = "T: " + activeTemp.toStringVeryShort();
|
basalText = activeTemp.percentRate + "% " + activeTemp.toDuration() + " " + DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h";
|
||||||
} else {
|
} else {
|
||||||
basalText = DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h";
|
basalText = DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h";
|
||||||
}
|
}
|
||||||
|
@ -1160,8 +1160,9 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
fullText += MainApp.gs(R.string.pump_tempbasal_label) + ": " + activeTemp.toStringFull();
|
fullText += MainApp.gs(R.string.pump_tempbasal_label) + ": " + activeTemp.toStringFull();
|
||||||
}
|
}
|
||||||
OKDialog.show(getActivity(), MainApp.gs(R.string.basal), fullText, null);
|
OKDialog.show(getActivity(), MainApp.gs(R.string.basal), fullText);
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
basalText = activeTemp.toStringFull() + " ";
|
basalText = activeTemp.toStringFull() + " ";
|
||||||
|
@ -1172,6 +1173,12 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
basalText += "(" + DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + "U/h)";
|
basalText += "(" + DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + "U/h)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (activeTemp != null) {
|
||||||
|
baseBasalView.setTextColor(MainApp.gc(R.color.basal));
|
||||||
|
} else {
|
||||||
|
baseBasalView.setTextColor(android.R.attr.textColor);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
baseBasalView.setText(basalText);
|
baseBasalView.setText(basalText);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue