Correct lastDataTime handling
This commit is contained in:
parent
2fee7f3186
commit
ba83f7f499
1 changed files with 2 additions and 6 deletions
|
@ -242,7 +242,6 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai
|
|||
// TODO review
|
||||
if (!Config.NSCLIENT && !Config.G5UPLOADER)
|
||||
NSUpload.uploadDeviceStatus();
|
||||
lastDataTime = new Date();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -283,7 +282,6 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai
|
|||
public void getPumpStatus() {
|
||||
|
||||
log("getPumpStatus");
|
||||
lastDataTime = new Date();
|
||||
if (Connector.get().isPumpConnected()) {
|
||||
log("is connected.. requesting status");
|
||||
final UUID uuid = aSyncTaskRunner(new StatusTaskRunner(connector.getServiceConnector()), "Status");
|
||||
|
@ -439,7 +437,6 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai
|
|||
updateGui();
|
||||
connector.tryToGetPumpStatusAgain();
|
||||
|
||||
lastDataTime = new Date();
|
||||
connector.requestHistorySync(30000);
|
||||
|
||||
if (result.success) while (true) {
|
||||
|
@ -538,8 +535,6 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai
|
|||
if (Config.logPumpComm)
|
||||
log.debug("Setting temp basal absolute: " + pumpEnactResult.success);
|
||||
|
||||
lastDataTime = new Date();
|
||||
|
||||
updateGui();
|
||||
|
||||
connector.requestHistorySync(5000);
|
||||
|
@ -621,7 +616,6 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai
|
|||
TemporaryBasal tempStop = new TemporaryBasal().date(System.currentTimeMillis()).source(Source.USER);
|
||||
TreatmentsPlugin.getPlugin().addToHistoryTempBasal(tempStop);
|
||||
}
|
||||
lastDataTime = new Date();
|
||||
updateGui();
|
||||
if (Config.logPumpComm)
|
||||
log.debug("Canceling temp basal: "); // TODO get more info
|
||||
|
@ -950,6 +944,7 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai
|
|||
singleMessageTaskRunner.fetch(new TaskRunner.ResultCallback() {
|
||||
@Override
|
||||
public void onResult(Object o) {
|
||||
lastDataTime = new Date();
|
||||
log(name + " success");
|
||||
event.response_object = o;
|
||||
if (o instanceof BolusMessage) {
|
||||
|
@ -988,6 +983,7 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai
|
|||
task.fetch(new TaskRunner.ResultCallback() {
|
||||
@Override
|
||||
public void onResult(Object o) {
|
||||
lastDataTime = new Date();
|
||||
log(name + " success");
|
||||
event.response_object = o;
|
||||
event.success = true;
|
||||
|
|
Loading…
Reference in a new issue