Save Last Bolus
This commit is contained in:
parent
ecefcdf9c2
commit
72fc2f3a54
|
@ -289,7 +289,7 @@ public class LocalInsightFragment extends DaggerFragment implements View.OnClick
|
||||||
if (cartridgeStatus == null) return;
|
if (cartridgeStatus == null) return;
|
||||||
String status;
|
String status;
|
||||||
if (cartridgeStatus.isInserted())
|
if (cartridgeStatus.isInserted())
|
||||||
status = DecimalFormatter.INSTANCE.to2Decimal(localInsightPlugin.getCartridgeStatus().getRemainingAmount()) + "U";
|
status = DecimalFormatter.INSTANCE.to2Decimal(cartridgeStatus.getRemainingAmount()) + "U";
|
||||||
else status = rh.gs(R.string.not_inserted);
|
else status = rh.gs(R.string.not_inserted);
|
||||||
statusItems.add(getStatusItem(rh.gs(R.string.reservoir_label), status));
|
statusItems.add(getStatusItem(rh.gs(R.string.reservoir_label), status));
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,6 +232,8 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai
|
||||||
|
|
||||||
pumpDescription = new PumpDescription();
|
pumpDescription = new PumpDescription();
|
||||||
pumpDescription.fillFor(PumpType.ACCU_CHEK_INSIGHT);
|
pumpDescription.fillFor(PumpType.ACCU_CHEK_INSIGHT);
|
||||||
|
lastBolusTimestamp = sp.getLong(R.string.key_insight_lastbolustimestamp,0L);
|
||||||
|
lastBolusAmount = sp.getDouble(R.string.key_insight_lastbolusamount, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TBROverNotificationBlock getTBROverNotificationBlock() {
|
public TBROverNotificationBlock getTBROverNotificationBlock() {
|
||||||
|
@ -1442,7 +1444,9 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai
|
||||||
PumpType.ACCU_CHEK_INSIGHT,
|
PumpType.ACCU_CHEK_INSIGHT,
|
||||||
serial);
|
serial);
|
||||||
lastBolusTimestamp = bolusID.getTimestamp();
|
lastBolusTimestamp = bolusID.getTimestamp();
|
||||||
|
sp.putLong(R.string.key_insight_lastbolustimestamp,lastBolusTimestamp);
|
||||||
lastBolusAmount = event.getImmediateAmount();
|
lastBolusAmount = event.getImmediateAmount();
|
||||||
|
sp.putDouble(R.string.key_insight_lastbolusamount, lastBolusAmount);
|
||||||
}
|
}
|
||||||
if (event.getBolusType() == BolusType.EXTENDED || event.getBolusType() == BolusType.MULTIWAVE) {
|
if (event.getBolusType() == BolusType.EXTENDED || event.getBolusType() == BolusType.MULTIWAVE) {
|
||||||
if (event.getDuration() > 0 && profileFunction.getProfile(bolusID.getTimestamp()) != null)
|
if (event.getDuration() > 0 && profileFunction.getProfile(bolusID.getTimestamp()) != null)
|
||||||
|
|
|
@ -47,6 +47,8 @@
|
||||||
<string name="key_insight_min_recovery_duration" translatable="false">insight_min_recovery_duration</string>
|
<string name="key_insight_min_recovery_duration" translatable="false">insight_min_recovery_duration</string>
|
||||||
<string name="key_insight_max_recovery_duration" translatable="false">insight_max_recovery_duration</string>
|
<string name="key_insight_max_recovery_duration" translatable="false">insight_max_recovery_duration</string>
|
||||||
<string name="key_insight_disconnect_delay" translatable="false">insight_disconnect_delay</string>
|
<string name="key_insight_disconnect_delay" translatable="false">insight_disconnect_delay</string>
|
||||||
|
<string name="key_insight_lastbolusamount" translatable="false">insight_lastbolusamount</string>
|
||||||
|
<string name="key_insight_lastbolustimestamp" translatable="false">insight_lastbolustimestamp</string>
|
||||||
<string name="disable_vibration_auto">Disable vibrations on automated bolus delivery</string>
|
<string name="disable_vibration_auto">Disable vibrations on automated bolus delivery</string>
|
||||||
<string name="disable_vibration_auto_summary">For SMB and Temp Basal with TBR emulation (only available with Insight firmware 3.x)</string>
|
<string name="disable_vibration_auto_summary">For SMB and Temp Basal with TBR emulation (only available with Insight firmware 3.x)</string>
|
||||||
<string name="timeout_during_handshake">Timeout during handshake - reset bluetooth</string>
|
<string name="timeout_during_handshake">Timeout during handshake - reset bluetooth</string>
|
||||||
|
|
Loading…
Reference in a new issue