- fixed display bolus and basal #71
- for bolus we needed to change translation (it was displaying one decmal places)
This commit is contained in:
parent
db6ea5c792
commit
595f838d0f
4 changed files with 21 additions and 10 deletions
|
@ -339,6 +339,7 @@ class OmnipodFragment : Fragment() {
|
|||
fun updateGUI() {
|
||||
val plugin = OmnipodPumpPlugin.getPlugin()
|
||||
val pumpStatus = OmnipodUtil.getPumpStatus()
|
||||
val pumpType = OmnipodUtil.getPumpType()
|
||||
|
||||
setDeviceStatus()
|
||||
|
||||
|
@ -388,14 +389,13 @@ class OmnipodFragment : Fragment() {
|
|||
} else {
|
||||
ago = DateUtil.hourAgo(pumpStatus.lastBolusTime.time)
|
||||
}
|
||||
omnipod_lastbolus.text = MainApp.gs(R.string.combo_last_bolus, bolus, unit, ago)
|
||||
omnipod_lastbolus.text = MainApp.gs(R.string.omnipod_last_bolus, pumpType.determineCorrectBolusSize(bolus), unit, ago)
|
||||
} else {
|
||||
omnipod_lastbolus.text = ""
|
||||
}
|
||||
|
||||
// base basal rate
|
||||
|
||||
omnipod_basabasalrate.text = MainApp.gs(R.string.pump_basebasalrate, plugin.baseBasalRate)
|
||||
omnipod_basabasalrate.text = MainApp.gs(R.string.pump_basebasalrate, pumpType.determineCorrectBasalSize(plugin.baseBasalRate))
|
||||
|
||||
omnipod_tempbasal.text = TreatmentsPlugin.getPlugin()
|
||||
.getTempBasalFromHistory(System.currentTimeMillis())?.toStringFull() ?: ""
|
||||
|
|
|
@ -126,14 +126,15 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
|
|||
|
||||
|
||||
|
||||
// if (OmnipodUtil.isOmnipodEros()) {
|
||||
// OmnipodUtil.setPlugin(this);
|
||||
// OmnipodUtil.setOmnipodPodType(OmnipodPodType.Eros);
|
||||
// }
|
||||
if (OmnipodUtil.isOmnipodEros()) {
|
||||
OmnipodUtil.setPlugin(this);
|
||||
OmnipodUtil.setOmnipodPodType(OmnipodPodType.Eros);
|
||||
OmnipodUtil.setPumpType(PumpType.Insulet_Omnipod);
|
||||
}
|
||||
|
||||
// TODO ccc
|
||||
OmnipodUtil.setOmnipodPodType(OmnipodPodType.Eros);
|
||||
OmnipodUtil.setPlugin(this);
|
||||
// // TODO ccc
|
||||
// OmnipodUtil.setOmnipodPodType(OmnipodPodType.Eros);
|
||||
// OmnipodUtil.setPlugin(this);
|
||||
|
||||
serviceConnection = new ServiceConnection() {
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ import info.nightscout.androidaps.R;
|
|||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.data.RLHistoryItem;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.OmnipodPumpPlugin;
|
||||
|
@ -56,6 +57,7 @@ public class OmnipodUtil extends RileyLinkUtil {
|
|||
private static OmnipodPumpPluginInterface omnipodPumpPlugin;
|
||||
private static OmnipodPodType omnipodPodType;
|
||||
private static OmnipodDriverState driverState = OmnipodDriverState.NotInitalized;
|
||||
private static PumpType pumpType;
|
||||
|
||||
public static Gson getGsonInstance() {
|
||||
return gsonInstance;
|
||||
|
@ -238,4 +240,11 @@ public class OmnipodUtil extends RileyLinkUtil {
|
|||
}
|
||||
|
||||
|
||||
public static void setPumpType(PumpType pumpType) {
|
||||
OmnipodUtil.pumpType = pumpType;
|
||||
}
|
||||
|
||||
public static PumpType getPumpType() {
|
||||
return pumpType;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1670,6 +1670,7 @@
|
|||
<string name="omnipod_pod_not_initalized">Not initialized</string>
|
||||
<string name="omnipod_pod_active_alerts">Active Pod Alerts</string>
|
||||
<string name="omnipod_ack_short">Ack Alerts</string>
|
||||
<string name="omnipod_last_bolus" translatable="false">%1$.2f %2$s (%3$s)</string>
|
||||
|
||||
<!-- Omnipod - Dialogs -->
|
||||
<string name="omnipod_frequency">Omnipod (433.91 MHz)</string>
|
||||
|
|
Loading…
Reference in a new issue