reactivate bad tuerkis and format basal

This commit is contained in:
osodebailar 2019-12-25 17:01:38 +01:00
parent a746b0fe05
commit 1186360df4
2 changed files with 13 additions and 2 deletions

View file

@ -108,6 +108,10 @@ public class TemporaryBasal implements Interval, DbObjectBase {
this.pumpId = extendedBolus.pumpId;
}
public String toDuration() {
return "(" + getRealDuration() + "/" + durationInMinutes + "')";
}
public TemporaryBasal clone() {
TemporaryBasal t = new TemporaryBasal();
t.date = date;

View file

@ -1151,7 +1151,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
String basalText = "";
if (shorttextmode) {
if (activeTemp != null) {
basalText = "T: " + activeTemp.toStringVeryShort();
basalText = activeTemp.percentRate + "% " + activeTemp.toDuration() + " " + DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h";
} else {
basalText = DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h";
}
@ -1160,8 +1160,9 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
if (activeTemp != null) {
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 {
if (activeTemp != null) {
basalText = activeTemp.toStringFull() + " ";
@ -1172,6 +1173,12 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
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);