Add some todos

This commit is contained in:
Bart Sopers 2019-11-10 22:43:33 +01:00
parent c77cc018f0
commit a670a04ab9

View file

@ -66,6 +66,8 @@ public class OmnipodManager {
BasalScheduleMapper.mapProfileToBasalSchedule(profile))); BasalScheduleMapper.mapProfileToBasalSchedule(profile)));
executeDelayed(() -> { executeDelayed(() -> {
// TODO improve: repeat get status when it fails and handle unexpected statuses
// TODO give user feedback when priming finished (or somehow failed)
StatusResponse delayedStatusResponse = communicationService.executeAction(new GetStatusAction(podState)); StatusResponse delayedStatusResponse = communicationService.executeAction(new GetStatusAction(podState));
InsertCannulaAction.updateCannulaInsertionStatus(podState, delayedStatusResponse); InsertCannulaAction.updateCannulaInsertionStatus(podState, delayedStatusResponse);
}, OmnipodConst.POD_CANNULA_INSERTION_DURATION); }, OmnipodConst.POD_CANNULA_INSERTION_DURATION);
@ -87,6 +89,8 @@ public class OmnipodManager {
communicationService.executeAction(new PrimeAction(new PrimeService(), podState)); communicationService.executeAction(new PrimeAction(new PrimeService(), podState));
executeDelayed(() -> { executeDelayed(() -> {
// TODO improve: repeat get status when it fails and handle unexpected statuses
// TODO give user feedback when priming finished (or somehow failed)
StatusResponse delayedStatusResponse = communicationService.executeAction(new GetStatusAction(podState)); StatusResponse delayedStatusResponse = communicationService.executeAction(new GetStatusAction(podState));
PrimeAction.updatePrimingStatus(podState, delayedStatusResponse); PrimeAction.updatePrimingStatus(podState, delayedStatusResponse);
}, OmnipodConst.POD_PRIME_DURATION); }, OmnipodConst.POD_PRIME_DURATION);
@ -193,6 +197,7 @@ public class OmnipodManager {
return new PumpEnactResult().success(false).enacted(false).comment(ex.getMessage()); return new PumpEnactResult().success(false).enacted(false).comment(ex.getMessage());
} }
// TODO calculate bolus duration
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }