EOPATCH2: fix NS carbs sync

This commit is contained in:
Milos Kozak 2023-03-16 18:29:53 +01:00
parent 294f3cb789
commit 53c13684ea

View file

@ -360,7 +360,7 @@ public class PatchManager implements IPatchManager {
if (detailedBolusInfo.insulin > 0) { if (detailedBolusInfo.insulin > 0) {
pumpSync.syncBolusWithPumpId( pumpSync.syncBolusWithPumpId(
detailedBolusInfo.timestamp, dateUtil.now(), // Use real timestamp to have it different from carbs (otherwise NS sync fail)
detailedBolusInfo.insulin, detailedBolusInfo.insulin,
detailedBolusInfo.getBolusType(), detailedBolusInfo.getBolusType(),
dateUtil.now(), dateUtil.now(),
@ -368,15 +368,6 @@ public class PatchManager implements IPatchManager {
patchManager.pm.getPatchSerial() patchManager.pm.getPatchSerial()
); );
} }
if (detailedBolusInfo.carbs > 0) {
pumpSync.syncCarbsWithTimestamp(
detailedBolusInfo.getCarbsTimestamp() != null ? detailedBolusInfo.getCarbsTimestamp() : detailedBolusInfo.timestamp,
detailedBolusInfo.carbs,
null,
PumpType.USER,
patchManager.pm.getPatchSerial()
);
}
} }
@Override @Override