Eopatch: fix pairing
This commit is contained in:
parent
7ae9ad1105
commit
9d14db71c7
3 changed files with 69 additions and 75 deletions
|
@ -82,7 +82,8 @@ public class PatchManager implements IPatchManager {
|
||||||
private Disposable mConnectingDisposable = null;
|
private Disposable mConnectingDisposable = null;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public PatchManager() {}
|
public PatchManager() {
|
||||||
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
void onInit() {
|
void onInit() {
|
||||||
|
@ -256,24 +257,26 @@ public class PatchManager implements IPatchManager {
|
||||||
public Single<Boolean> patchActivation(long timeout) {
|
public Single<Boolean> patchActivation(long timeout) {
|
||||||
return patchManager.patchActivation(timeout)
|
return patchManager.patchActivation(timeout)
|
||||||
.doOnSuccess(success -> {
|
.doOnSuccess(success -> {
|
||||||
// if (success) {
|
if (success) {
|
||||||
// pumpSync.insertTherapyEventIfNewWithTimestamp(
|
pumpSync.connectNewPump(true);
|
||||||
// getPatchConfig().getPatchWakeupTimestamp(),
|
Thread.sleep(1000);
|
||||||
// DetailedBolusInfo.EventType.CANNULA_CHANGE,
|
pumpSync.insertTherapyEventIfNewWithTimestamp(
|
||||||
// null,
|
System.currentTimeMillis(),
|
||||||
// null,
|
DetailedBolusInfo.EventType.CANNULA_CHANGE,
|
||||||
// PumpType.EOFLOW_EOPATCH2,
|
null,
|
||||||
// getPatchConfig().getPatchSerialNumber()
|
null,
|
||||||
// );
|
PumpType.EOFLOW_EOPATCH2,
|
||||||
// pumpSync.insertTherapyEventIfNewWithTimestamp(
|
getPatchConfig().getPatchSerialNumber()
|
||||||
// getPatchConfig().getPatchWakeupTimestamp(),
|
);
|
||||||
// DetailedBolusInfo.EventType.INSULIN_CHANGE,
|
pumpSync.insertTherapyEventIfNewWithTimestamp(
|
||||||
// null,
|
System.currentTimeMillis(),
|
||||||
// null,
|
DetailedBolusInfo.EventType.INSULIN_CHANGE,
|
||||||
// PumpType.EOFLOW_EOPATCH2,
|
null,
|
||||||
// getPatchConfig().getPatchSerialNumber()
|
null,
|
||||||
// );
|
PumpType.EOFLOW_EOPATCH2,
|
||||||
// }
|
getPatchConfig().getPatchSerialNumber()
|
||||||
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -382,14 +382,6 @@ public class PatchManagerImpl {
|
||||||
if (success) {
|
if (success) {
|
||||||
TaskBase.enqueue(TaskFunc.LOW_RESERVOIR);
|
TaskBase.enqueue(TaskFunc.LOW_RESERVOIR);
|
||||||
TaskBase.enqueue(TaskFunc.INFO_REMINDER);
|
TaskBase.enqueue(TaskFunc.INFO_REMINDER);
|
||||||
pumpSync.connectNewPump(true);
|
|
||||||
pumpSync.insertTherapyEventIfNewWithTimestamp(
|
|
||||||
System.currentTimeMillis(),
|
|
||||||
DetailedBolusInfo.EventType.INSULIN_CHANGE,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
PumpType.EOFLOW_EOPATCH2,
|
|
||||||
null);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -278,7 +278,6 @@ class EopatchActivity : EoBaseActivity<ActivityEopatchBinding>() {
|
||||||
this@EopatchActivity.finish()
|
this@EopatchActivity.finish()
|
||||||
}
|
}
|
||||||
start()
|
start()
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue