diff --git a/pump/dana/src/main/java/info/nightscout/pump/dana/DanaPump.kt b/pump/dana/src/main/java/info/nightscout/pump/dana/DanaPump.kt
index f266dae18e..35764163a6 100644
--- a/pump/dana/src/main/java/info/nightscout/pump/dana/DanaPump.kt
+++ b/pump/dana/src/main/java/info/nightscout/pump/dana/DanaPump.kt
@@ -55,7 +55,7 @@ class DanaPump @Inject constructor(
var lastConnection: Long = 0
var lastSettingsRead: Long = 0
- @JvmField var lastHistoryFetched: Long = 0
+ @JvmField var readHistoryFrom: Long = 0 // start next history read from this timestamp
@JvmField var historyDoneReceived: Boolean = false // true when last history message is received
// Info
@@ -410,7 +410,7 @@ class DanaPump @Inject constructor(
aapsLogger.debug(LTag.PUMP, "DanaRPump reset")
lastConnection = 0
lastSettingsRead = 0
- lastHistoryFetched = 0
+ readHistoryFrom = 0
}
fun modelFriendlyName(): String =
diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java
index 8d4dcfdb0d..3ab6863eb7 100644
--- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java
+++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java
@@ -57,8 +57,6 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
private final TemporaryBasalStorage temporaryBasalStorage;
private final FabricPrivacy fabricPrivacy;
- public long lastEventTimeLoaded = 0;
-
@Inject
public DanaRv2Plugin(
HasAndroidInjector injector,
diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt
index 6bc89b0077..a904ff0d12 100644
--- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt
+++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt
@@ -277,7 +277,7 @@ class MsgHistoryEventsV2 constructor(
status = "UNKNOWN " + dateUtil.timeString(datetime)
}
}
- if (datetime > danaRv2Plugin.lastEventTimeLoaded) danaRv2Plugin.lastEventTimeLoaded = datetime
+ if (datetime > danaPump.lastEventTimeLoaded) danaPump.lastEventTimeLoaded = datetime
rxBus.send(EventPumpStatusChanged(rh.gs(info.nightscout.pump.dana.R.string.processinghistory) + ": " + status))
}
}
\ No newline at end of file
diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java
index 18eabcdf03..f723ac765d 100644
--- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java
+++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java
@@ -346,7 +346,7 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService {
MsgSetHistoryEntry_v2 msgSetHistoryEntry_v2 = new MsgSetHistoryEntry_v2(injector,
DanaPump.HistoryEntry.CARBS.getValue(), carbtime, carbs, 0);
mSerialIOThread.sendMessage(msgSetHistoryEntry_v2);
- danaPump.lastHistoryFetched = Math.min(danaPump.lastHistoryFetched, carbtime - T.Companion.mins(1).msecs());
+ danaPump.readHistoryFrom = Math.min(danaPump.readHistoryFrom, carbtime - T.Companion.mins(1).msecs());
if (!msgSetHistoryEntry_v2.isReceived() || msgSetHistoryEntry_v2.getFailed())
uiInteraction.runAlarm(rh.gs(info.nightscout.pump.dana.R.string.carbs_store_error), rh.gs(info.nightscout.core.ui.R.string.error), info.nightscout.core.ui.R.raw.boluserror);
}
@@ -418,7 +418,7 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService {
MsgSetHistoryEntry_v2 msgSetHistoryEntry_v2 = new MsgSetHistoryEntry_v2(injector,
DanaPump.HistoryEntry.CARBS.getValue(), time, amount, 0);
mSerialIOThread.sendMessage(msgSetHistoryEntry_v2);
- danaPump.lastHistoryFetched = Math.min(danaPump.lastHistoryFetched, time - T.Companion.mins(1).msecs());
+ danaPump.readHistoryFrom = Math.min(danaPump.readHistoryFrom, time - T.Companion.mins(1).msecs());
return true;
}
@@ -433,18 +433,17 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService {
if (!isConnected())
return new PumpEnactResult(injector).success(false);
SystemClock.sleep(300);
- MsgHistoryEventsV2 msg = new MsgHistoryEventsV2(injector, danaPump.lastHistoryFetched);
- aapsLogger.debug(LTag.PUMP, "Loading event history from: " + dateUtil.dateAndTimeString(danaPump.lastHistoryFetched));
+ MsgHistoryEventsV2 msg = new MsgHistoryEventsV2(injector, danaPump.readHistoryFrom);
+ aapsLogger.debug(LTag.PUMP, "Loading event history from: " + dateUtil.dateAndTimeString(danaPump.readHistoryFrom));
mSerialIOThread.sendMessage(msg);
while (!danaPump.historyDoneReceived && mRfcommSocket.isConnected()) {
SystemClock.sleep(100);
}
SystemClock.sleep(200);
- if (danaRv2Plugin.lastEventTimeLoaded != 0)
- danaPump.lastHistoryFetched = danaRv2Plugin.lastEventTimeLoaded - T.Companion.mins(1).msecs();
+ if (danaPump.getLastEventTimeLoaded() != 0) danaPump.readHistoryFrom = danaPump.getLastEventTimeLoaded() - T.Companion.mins(1).msecs();
else
- danaPump.lastHistoryFetched = 0;
+ danaPump.readHistoryFrom = 0;
danaPump.setLastConnection(System.currentTimeMillis());
return new PumpEnactResult(injector).success(true);
}
diff --git a/pump/danars/src/main/java/info/nightscout/pump/danars/services/DanaRSService.kt b/pump/danars/src/main/java/info/nightscout/pump/danars/services/DanaRSService.kt
index 0b43f17b02..88a5ea63df 100644
--- a/pump/danars/src/main/java/info/nightscout/pump/danars/services/DanaRSService.kt
+++ b/pump/danars/src/main/java/info/nightscout/pump/danars/services/DanaRSService.kt
@@ -262,19 +262,13 @@ class DanaRSService : DaggerService() {
return result
}
SystemClock.sleep(1000)
- val msg: DanaRSPacketAPSHistoryEvents
- if (danaPump.lastHistoryFetched == 0L) {
- msg = DanaRSPacketAPSHistoryEvents(injector, 0)
- aapsLogger.debug(LTag.PUMPCOMM, "Loading complete event history")
- } else {
- msg = DanaRSPacketAPSHistoryEvents(injector, danaPump.lastHistoryFetched)
- aapsLogger.debug(LTag.PUMPCOMM, "Loading event history from: " + dateUtil.dateAndTimeString(danaPump.lastHistoryFetched))
- }
+ val msg = DanaRSPacketAPSHistoryEvents(injector, danaPump.readHistoryFrom)
+ aapsLogger.debug(LTag.PUMPCOMM, "Loading event history from: " + dateUtil.dateAndTimeString(danaPump.readHistoryFrom))
sendMessage(msg)
while (!danaPump.historyDoneReceived && bleComm.isConnected) {
SystemClock.sleep(100)
}
- danaPump.lastHistoryFetched = if (danaPump.lastEventTimeLoaded != 0L) danaPump.lastEventTimeLoaded - T.mins(1).msecs() else 0
+ danaPump.readHistoryFrom = if (danaPump.lastEventTimeLoaded != 0L) danaPump.lastEventTimeLoaded - T.mins(1).msecs() else 0
aapsLogger.debug(LTag.PUMPCOMM, "Events loaded")
rxBus.send(EventPumpStatusChanged(rh.gs(info.nightscout.pump.dana.R.string.gettingpumpstatus)))
sendMessage(DanaRSPacketGeneralInitialScreenInformation(injector))
@@ -305,7 +299,7 @@ class DanaRSService : DaggerService() {
// sendMessage(msg);
val msgSetHistoryEntryV2 = DanaRSPacketAPSSetEventHistory(injector, DanaPump.HistoryEntry.CARBS.value, carbTime, carbs, 0)
sendMessage(msgSetHistoryEntryV2)
- danaPump.lastHistoryFetched = min(danaPump.lastHistoryFetched, carbTime - T.mins(1).msecs())
+ danaPump.readHistoryFrom = min(danaPump.readHistoryFrom, carbTime - T.mins(1).msecs())
if (!msgSetHistoryEntryV2.isReceived || msgSetHistoryEntryV2.failed)
uiInteraction.runAlarm(rh.gs(info.nightscout.pump.dana.R.string.carbs_store_error), rh.gs(info.nightscout.core.ui.R.string.error), info.nightscout.core.ui.R.raw.boluserror)
}
diff --git a/pump/eopatch/src/main/res/values-ko/strings.xml b/pump/eopatch/src/main/res/values-ko/strings.xml
index b6a4b40c9d..a22c51e5b8 100644
--- a/pump/eopatch/src/main/res/values-ko/strings.xml
+++ b/pump/eopatch/src/main/res/values-ko/strings.xml
@@ -9,7 +9,6 @@
패치 버저 알림
h:mm a
- 볼루스 %1$.2f U의 주입이 완료되었습니다.
BLE 상태
일련 번호
로트 번호