case Ok: case NeedsCalibration: insertBackfillItem(backsies, dexTime, glucose, trend); break; insertBackfillItem(backsies, dexTime, glucose, trend); insertBackfillItem(backsies, dexTime, glucose, trend);
private static void monitorBackFill(Ob1G5CollectionService parent, RxBleConnection connection) { if (d) UserError.Log.d(TAG, "monitor backfill enter"); final BackFillStream backfill = new BackFillStream(); connection.setupNotification(ProbablyBackfill) .timeout(15, TimeUnit.SECONDS) // WARN .observeOn(Schedulers.newThread()) .flatMap(notificationObservable -> notificationObservable) .subscribe(bytes -> { UserError.Log.d(TAG, "Received backfill notification bytes: " + JoH.bytesToHex(bytes)); backfill.push(bytes); inevitableDisconnect(parent, connection); Inevitable.task("Process G5 backfill", 3000, () -> processBacksies(backfill.decode())); }, throwable -> { UserError.Log.d(TAG, "backfill throwable: " + throwable); } ); if (d) UserError.Log.d(TAG, "monitor backfill exit"); }
private static void monitorBackFill(Ob1G5CollectionService parent, RxBleConnection connection) { if (d) UserError.Log.d(TAG, "monitor backfill enter"); final BackFillStream backfill = new BackFillStream(); connection.setupNotification(ProbablyBackfill) .timeout(15, TimeUnit.SECONDS) // WARN .observeOn(Schedulers.newThread()) .flatMap(notificationObservable -> notificationObservable) .subscribe(bytes -> { UserError.Log.d(TAG, "Received backfill notification bytes: " + JoH.bytesToHex(bytes)); backfill.push(bytes); inevitableDisconnect(parent, connection); Inevitable.task("Process G5 backfill", 3000, () -> processBacksies(backfill.decode())); }, throwable -> { UserError.Log.d(TAG, "backfill throwable: " + throwable); } ); if (d) UserError.Log.d(TAG, "monitor backfill exit"); }
private static void monitorBackFill(Ob1G5CollectionService parent, RxBleConnection connection) { if (d) UserError.Log.d(TAG, "monitor backfill enter"); final BackFillStream backfill = new BackFillStream(); connection.setupNotification(ProbablyBackfill) .timeout(15, TimeUnit.SECONDS) // WARN .observeOn(Schedulers.newThread()) .flatMap(notificationObservable -> notificationObservable) .subscribe(bytes -> { UserError.Log.d(TAG, "Received backfill notification bytes: " + JoH.bytesToHex(bytes)); backfill.push(bytes); inevitableDisconnect(parent, connection); Inevitable.task("Process G5 backfill", 3000, () -> processBacksies(backfill.decode())); }, throwable -> { UserError.Log.d(TAG, "backfill throwable: " + throwable); } ); if (d) UserError.Log.d(TAG, "monitor backfill exit"); }
case Ok: case NeedsCalibration: insertBackfillItem(backsies, dexTime, glucose, trend); break; insertBackfillItem(backsies, dexTime, glucose, trend); insertBackfillItem(backsies, dexTime, glucose, trend);
case Ok: case NeedsCalibration: insertBackfillItem(backsies, dexTime, glucose, trend); break; insertBackfillItem(backsies, dexTime, glucose, trend); insertBackfillItem(backsies, dexTime, glucose, trend);