Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ private void getCartridgeStatusItem(List<View> statusItems) {
if (cartridgeStatus == null) return;
String status;
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);
statusItems.add(getStatusItem(rh.gs(R.string.reservoir_label), status));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ public LocalInsightPlugin(

pumpDescription = new PumpDescription();
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() {
Expand Down Expand Up @@ -1442,7 +1444,9 @@ private void processBolusDeliveredEvent(String serial, BolusDeliveredEvent event
PumpType.ACCU_CHEK_INSIGHT,
serial);
lastBolusTimestamp = bolusID.getTimestamp();
sp.putLong(R.string.key_insight_lastbolustimestamp,lastBolusTimestamp);
lastBolusAmount = event.getImmediateAmount();
sp.putDouble(R.string.key_insight_lastbolusamount, lastBolusAmount);
}
if (event.getBolusType() == BolusType.EXTENDED || event.getBolusType() == BolusType.MULTIWAVE) {
if (event.getDuration() > 0 && profileFunction.getProfile(bolusID.getTimestamp()) != null)
Expand Down
2 changes: 2 additions & 0 deletions insight/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
<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_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_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>
Expand Down