Search in sources :

Example 1 with THINJAM_WRITE

use of com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_WRITE in project xDrip by NightscoutFoundation.

the class BlueJayService method enableNotifications.

private void enableNotifications() {
    UserError.Log.d(TAG, "enableNotifications called()");
    if (I.isNotificationEnabled) {
        UserError.Log.d(TAG, "Notifications already enabled");
        changeNextState();
        return;
    }
    if (notificationSubscription != null) {
        notificationSubscription.unsubscribe();
    }
    JoH.threadSleep(500);
    UserError.Log.d(TAG, "Requesting to enable notifications");
    if (I.connection == null) {
        UserError.Log.d(TAG, "Connection went away before we could enable notifications");
        return;
    }
    notificationSubscription = new Subscription(I.connection.setupNotification(THINJAM_WRITE).observeOn(// needed?
    Schedulers.newThread()).doOnNext(notificationObservable -> {
        UserError.Log.d(TAG, "Notifications enabled");
        I.connection.writeCharacteristic(THINJAM_BULK, new byte[] { 0x55 });
        // Debug sleep to make sure notifications are actually enabled???
        JoH.threadSleep(500);
        I.isNotificationEnabled = true;
        changeNextState();
    }).flatMap(notificationObservable -> notificationObservable).observeOn(Schedulers.newThread()).subscribe(bytes -> {
        // incoming notifications
        UserError.Log.d(TAG, "Received notification bytes: " + JoH.bytesToHex(bytes));
        val pushRx = PushRx.parse(bytes);
        if (pushRx != null) {
            UserError.Log.d(TAG, "Received PushRX: " + pushRx.toS());
            getInfo().processPushRx(pushRx);
            processPushRxActions(pushRx);
        } else if (bytes[0] == 0x06) {
            // TODO move this to parsed response
            final int replyParam = ((int) bytes[1]) & 0xff;
            if (replyParam == 0) {
                UserError.Log.d(TAG, "Bulk up success reply marker received! - removing queue head item");
                // removes first item from the queue which should be the one we just processed!
                commandQueue.poll();
                UserError.Log.d(TAG, "Scheduling immediate run of queue");
                // remove timeout retry task
                Inevitable.kill("tj-next-queue");
                Inevitable.task("tj-next-queue", 0, this::processQueue);
            } else {
                revisedOffset = replyParam;
                // race condition on display
                UserError.Log.d(TAG, "Bulk up failure at: " + revisedOffset);
            }
        } else if (bytes[0] == (byte) 0xFE) {
            audioStreamCallBack(bytes);
        } else {
            if (ThinJamActivity.isD()) {
                notificationString.append(new String(bytes));
                Inevitable.task("tj update notifi", 250, new Runnable() {

                    @Override
                    public void run() {
                        stringObservableField.set(notificationString.toString());
                    }
                });
            }
        }
    }, throwable -> {
        UserError.Log.d(TAG, "Throwable in Record Notification: " + throwable);
        I.isNotificationEnabled = false;
        if (throwable instanceof BleCharacteristicNotFoundException) {
            // maybe legacy - ignore for now but needs better handling
            UserError.Log.d(TAG, "Characteristic not found for notification");
            debug.processTestSuite("logcharerror");
            tryGattRefresh(getI().connection);
        }
        if (throwable instanceof BleCannotSetCharacteristicNotificationException) {
            UserError.Log.e(TAG, "Problems setting notifications - disconnecting");
            changeState(CLOSE);
        }
        if (throwable instanceof BleDisconnectedException) {
            UserError.Log.d(TAG, "Disconnected while enabling notifications");
            changeState(CLOSE);
        }
    }));
}
Also used : Arrays(java.util.Arrays) CLOSED(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.CLOSED) Inevitable(com.eveningoutpost.dexdrip.UtilityModels.Inevitable) SET_TIME(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.SET_TIME) Pref(com.eveningoutpost.dexdrip.UtilityModels.Pref) OPCODE_BULK_R_XFER_0(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_BULK_R_XFER_0) BleGattCharacteristicException(com.polidea.rxandroidble2.exceptions.BleGattCharacteristicException) BroadcastSnooze(com.eveningoutpost.dexdrip.UtilityModels.BroadcastSnooze) SetTimeTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.SetTimeTx) BaseTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.BaseTx) ERROR_INVALID(com.eveningoutpost.dexdrip.watch.thinjam.Const.ERROR_INVALID) OPCODE_IDENTIFY(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_IDENTIFY) ReplyProcessor(com.eveningoutpost.dexdrip.utils.bt.ReplyProcessor) ThinJamAudioStream(com.eveningoutpost.dexdrip.watch.thinjam.io.ThinJamAudioStream) FirmwareDownload(com.eveningoutpost.dexdrip.watch.thinjam.firmware.FirmwareDownload) OPCODE_SHOW_QRCODE(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_SHOW_QRCODE) OPCODE_RESET_ALL(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_RESET_ALL) JoH(com.eveningoutpost.dexdrip.Models.JoH) GlucoseTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.GlucoseTx) THINJAM_NOTIFY_TYPE_LOW_ALERT(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_NOTIFY_TYPE_LOW_ALERT) OPCODE_EASY_AUTH(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_EASY_AUTH) JoH.bytesToHex(com.eveningoutpost.dexdrip.Models.JoH.bytesToHex) PROTOTYPE(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.PROTOTYPE) CalibrationState(com.eveningoutpost.dexdrip.G5Model.CalibrationState) Home(com.eveningoutpost.dexdrip.Home) BluetoothGattCharacteristic(android.bluetooth.BluetoothGattCharacteristic) WakeLockTrampoline(com.eveningoutpost.dexdrip.utils.framework.WakeLockTrampoline) Unitized(com.eveningoutpost.dexdrip.UtilityModels.Unitized) THINJAM_NOTIFY_TYPE_TEXTBOX1(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_NOTIFY_TYPE_TEXTBOX1) BulkUpRequestTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.BulkUpRequestTx) CRITICAL(com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.CRITICAL) GOOD(com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.GOOD) SCHEDULE_ITEMS(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.SCHEDULE_ITEMS) HexDump(com.eveningoutpost.dexdrip.ImportedLibraries.usbserial.util.HexDump) ArrayList(java.util.ArrayList) BlueJay.versionSufficient(com.eveningoutpost.dexdrip.watch.thinjam.BlueJay.versionSufficient) JoH.tsl(com.eveningoutpost.dexdrip.Models.JoH.tsl) Helper(com.eveningoutpost.dexdrip.utils.bt.Helper) SetTxIdTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.SetTxIdTx) DefineWindowTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.DefineWindowTx) THINJAM_NOTIFY_TYPE_CANCEL(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_NOTIFY_TYPE_CANCEL) JamBaseBluetoothSequencer(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer) ERROR_MISC(com.eveningoutpost.dexdrip.watch.thinjam.Const.ERROR_MISC) ObservableField(android.databinding.ObservableField) RxBleDeviceServices(com.polidea.rxandroidble2.RxBleDeviceServices) THINJAM_BULK(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_BULK) lombok.val(lombok.val) THINJAM_NOTIFY_TYPE_DIALOG(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_NOTIFY_TYPE_DIALOG) AlertPlayer(com.eveningoutpost.dexdrip.UtilityModels.AlertPlayer) OPCODE_GET_STATUS_3(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_GET_STATUS_3) UserError(com.eveningoutpost.dexdrip.Models.UserError) OPCODE_GET_STATUS_1(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_GET_STATUS_1) OPCODE_GET_STATUS_2(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_GET_STATUS_2) PersistentStore(com.eveningoutpost.dexdrip.UtilityModels.PersistentStore) Treatments(com.eveningoutpost.dexdrip.Models.Treatments) BitmapTools(com.eveningoutpost.dexdrip.watch.thinjam.utils.BitmapTools) com.eveningoutpost.dexdrip.xdrip(com.eveningoutpost.dexdrip.xdrip) FirmwareInfo(com.eveningoutpost.dexdrip.watch.thinjam.firmware.FirmwareInfo) RequiredArgsConstructor(lombok.RequiredArgsConstructor) INIT(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.INIT) FEATURE_TJ_DISP_A(com.eveningoutpost.dexdrip.watch.thinjam.Const.FEATURE_TJ_DISP_A) IBinder(android.os.IBinder) BytesGenerator(com.eveningoutpost.dexdrip.utils.BytesGenerator) ERROR_OUT_OF_RANGE(com.eveningoutpost.dexdrip.watch.thinjam.Const.ERROR_OUT_OF_RANGE) BleCannotSetCharacteristicNotificationException(com.polidea.rxandroidble2.exceptions.BleCannotSetCharacteristicNotificationException) NotifyTx.getPacketStreamForNotification(com.eveningoutpost.dexdrip.watch.thinjam.messages.NotifyTx.getPacketStreamForNotification) PowerManager(android.os.PowerManager) StatusItem(com.eveningoutpost.dexdrip.UtilityModels.StatusItem) BleCharacteristicNotFoundException(com.polidea.rxandroidble2.exceptions.BleCharacteristicNotFoundException) BlueJay.shouldSendReadings(com.eveningoutpost.dexdrip.watch.thinjam.BlueJay.shouldSendReadings) Locale(java.util.Locale) Schedulers(io.reactivex.schedulers.Schedulers) DEXCOM_PERIOD(com.eveningoutpost.dexdrip.UtilityModels.BgGraphBuilder.DEXCOM_PERIOD) DISCOVER(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.DISCOVER) BlueJayFirmware.parse(com.eveningoutpost.dexdrip.watch.thinjam.firmware.BlueJayFirmware.parse) BAD(com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.BAD) THINJAM_OTA(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_OTA) CLOSE(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.CLOSE) BgReading(com.eveningoutpost.dexdrip.Models.BgReading) NORMAL(com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.NORMAL) Expose(com.google.gson.annotations.Expose) UUID(java.util.UUID) ENABLE_NOTIFICATIONS(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.ENABLE_NOTIFICATIONS) THINJAM_NOTIFY_TYPE_HIGH_ALERT(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_NOTIFY_TYPE_HIGH_ALERT) List(java.util.List) BleDisconnectedException(com.polidea.rxandroidble2.exceptions.BleDisconnectedException) NOTICE(com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.NOTICE) R(com.eveningoutpost.dexdrip.R) Subscription(com.eveningoutpost.dexdrip.utils.bt.Subscription) Ob1G5CollectionService(com.eveningoutpost.dexdrip.Services.Ob1G5CollectionService) ERROR_OK(com.eveningoutpost.dexdrip.watch.thinjam.Const.ERROR_OK) BulkUpTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.BulkUpTx) ThinJamActivity(com.eveningoutpost.dexdrip.ui.activities.ThinJamActivity) ConcurrentLinkedQueue(java.util.concurrent.ConcurrentLinkedQueue) JoH.msTill(com.eveningoutpost.dexdrip.Models.JoH.msTill) Setter(lombok.Setter) LOG_TESTS(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.LOG_TESTS) Getter(lombok.Getter) AuthReqTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.AuthReqTx) Constants(com.eveningoutpost.dexdrip.UtilityModels.Constants) PushRx(com.eveningoutpost.dexdrip.watch.thinjam.messages.PushRx) Pair(android.util.Pair) Intent(android.content.Intent) HOUR_IN_MS(com.eveningoutpost.dexdrip.UtilityModels.Constants.HOUR_IN_MS) RBulkUpTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.RBulkUpTx) StandbyTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.StandbyTx) JoH.niceTimeScalar(com.eveningoutpost.dexdrip.Models.JoH.niceTimeScalar) Binder(android.os.Binder) SuppressLint(android.annotation.SuppressLint) OTAUI(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.OTAUI) SlidingWindowConstraint(com.eveningoutpost.dexdrip.utils.time.SlidingWindowConstraint) TJ_BitmapType(com.eveningoutpost.dexdrip.watch.thinjam.utils.BitmapTools.TJ_BitmapType) SLEEP(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.SLEEP) BluetoothGattService(android.bluetooth.BluetoothGattService) com.eveningoutpost.dexdrip.xdrip.gs(com.eveningoutpost.dexdrip.xdrip.gs) BlueJayFirmware.split(com.eveningoutpost.dexdrip.watch.thinjam.firmware.BlueJayFirmware.split) JoH.msSince(com.eveningoutpost.dexdrip.Models.JoH.msSince) JoH.threadSleep(com.eveningoutpost.dexdrip.Models.JoH.threadSleep) BackFillTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.BackFillTx) TimeUnit(java.util.concurrent.TimeUnit) SECOND_IN_MS(com.eveningoutpost.dexdrip.UtilityModels.Constants.SECOND_IN_MS) THINJAM_WRITE(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_WRITE) ResetPersistTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.ResetPersistTx) RUN_QUEUE(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.RUN_QUEUE) SEND_QUEUE(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.SEND_QUEUE) SetGammaEtc(com.eveningoutpost.dexdrip.watch.thinjam.messages.SetGammaEtc) MINUTE_IN_MS(com.eveningoutpost.dexdrip.UtilityModels.Constants.MINUTE_IN_MS) lombok.val(lombok.val) BleCannotSetCharacteristicNotificationException(com.polidea.rxandroidble2.exceptions.BleCannotSetCharacteristicNotificationException) BleCharacteristicNotFoundException(com.polidea.rxandroidble2.exceptions.BleCharacteristicNotFoundException) BleDisconnectedException(com.polidea.rxandroidble2.exceptions.BleDisconnectedException) Subscription(com.eveningoutpost.dexdrip.utils.bt.Subscription)

Example 2 with THINJAM_WRITE

use of com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_WRITE in project xDrip-plus by jamorham.

the class BlueJayService method enableNotifications.

private void enableNotifications() {
    UserError.Log.d(TAG, "enableNotifications called()");
    if (I.isNotificationEnabled) {
        UserError.Log.d(TAG, "Notifications already enabled");
        changeNextState();
        return;
    }
    if (notificationSubscription != null) {
        notificationSubscription.unsubscribe();
    }
    JoH.threadSleep(500);
    UserError.Log.d(TAG, "Requesting to enable notifications");
    if (I.connection == null) {
        UserError.Log.d(TAG, "Connection went away before we could enable notifications");
        return;
    }
    notificationSubscription = new Subscription(I.connection.setupNotification(THINJAM_WRITE).observeOn(// needed?
    Schedulers.newThread()).doOnNext(notificationObservable -> {
        UserError.Log.d(TAG, "Notifications enabled");
        I.connection.writeCharacteristic(THINJAM_BULK, new byte[] { 0x55 });
        // Debug sleep to make sure notifications are actually enabled???
        JoH.threadSleep(500);
        I.isNotificationEnabled = true;
        changeNextState();
    }).flatMap(notificationObservable -> notificationObservable).observeOn(Schedulers.newThread()).subscribe(bytes -> {
        // incoming notifications
        UserError.Log.d(TAG, "Received notification bytes: " + JoH.bytesToHex(bytes));
        val pushRx = PushRx.parse(bytes);
        if (pushRx != null) {
            UserError.Log.d(TAG, "Received PushRX: " + pushRx.toS());
            getInfo().processPushRx(pushRx);
            processPushRxActions(pushRx);
        } else if (bytes[0] == 0x06) {
            // TODO move this to parsed response
            final int replyParam = ((int) bytes[1]) & 0xff;
            if (replyParam == 0) {
                UserError.Log.d(TAG, "Bulk up success reply marker received! - removing queue head item");
                // removes first item from the queue which should be the one we just processed!
                commandQueue.poll();
                UserError.Log.d(TAG, "Scheduling immediate run of queue");
                // remove timeout retry task
                Inevitable.kill("tj-next-queue");
                Inevitable.task("tj-next-queue", 0, this::processQueue);
            } else {
                revisedOffset = replyParam;
                // race condition on display
                UserError.Log.d(TAG, "Bulk up failure at: " + revisedOffset);
            }
        } else if (bytes[0] == (byte) 0xFE) {
            audioStreamCallBack(bytes);
        } else {
            if (ThinJamActivity.isD()) {
                notificationString.append(new String(bytes));
                Inevitable.task("tj update notifi", 250, new Runnable() {

                    @Override
                    public void run() {
                        stringObservableField.set(notificationString.toString());
                    }
                });
            }
        }
    }, throwable -> {
        UserError.Log.d(TAG, "Throwable in Record Notification: " + throwable);
        I.isNotificationEnabled = false;
        if (throwable instanceof BleCharacteristicNotFoundException) {
            // maybe legacy - ignore for now but needs better handling
            UserError.Log.d(TAG, "Characteristic not found for notification");
            debug.processTestSuite("logcharerror");
            tryGattRefresh(getI().connection);
        }
        if (throwable instanceof BleCannotSetCharacteristicNotificationException) {
            UserError.Log.e(TAG, "Problems setting notifications - disconnecting");
            changeState(CLOSE);
        }
        if (throwable instanceof BleDisconnectedException) {
            UserError.Log.d(TAG, "Disconnected while enabling notifications");
            changeState(CLOSE);
        }
    }));
}
Also used : Arrays(java.util.Arrays) CLOSED(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.CLOSED) Inevitable(com.eveningoutpost.dexdrip.UtilityModels.Inevitable) SET_TIME(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.SET_TIME) Pref(com.eveningoutpost.dexdrip.UtilityModels.Pref) OPCODE_BULK_R_XFER_0(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_BULK_R_XFER_0) BleGattCharacteristicException(com.polidea.rxandroidble2.exceptions.BleGattCharacteristicException) BroadcastSnooze(com.eveningoutpost.dexdrip.UtilityModels.BroadcastSnooze) SetTimeTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.SetTimeTx) BaseTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.BaseTx) ERROR_INVALID(com.eveningoutpost.dexdrip.watch.thinjam.Const.ERROR_INVALID) OPCODE_IDENTIFY(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_IDENTIFY) ReplyProcessor(com.eveningoutpost.dexdrip.utils.bt.ReplyProcessor) ThinJamAudioStream(com.eveningoutpost.dexdrip.watch.thinjam.io.ThinJamAudioStream) FirmwareDownload(com.eveningoutpost.dexdrip.watch.thinjam.firmware.FirmwareDownload) OPCODE_SHOW_QRCODE(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_SHOW_QRCODE) OPCODE_RESET_ALL(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_RESET_ALL) JoH(com.eveningoutpost.dexdrip.Models.JoH) GlucoseTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.GlucoseTx) THINJAM_NOTIFY_TYPE_LOW_ALERT(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_NOTIFY_TYPE_LOW_ALERT) OPCODE_EASY_AUTH(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_EASY_AUTH) JoH.bytesToHex(com.eveningoutpost.dexdrip.Models.JoH.bytesToHex) PROTOTYPE(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.PROTOTYPE) CalibrationState(com.eveningoutpost.dexdrip.G5Model.CalibrationState) Home(com.eveningoutpost.dexdrip.Home) BluetoothGattCharacteristic(android.bluetooth.BluetoothGattCharacteristic) WakeLockTrampoline(com.eveningoutpost.dexdrip.utils.framework.WakeLockTrampoline) Unitized(com.eveningoutpost.dexdrip.UtilityModels.Unitized) THINJAM_NOTIFY_TYPE_TEXTBOX1(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_NOTIFY_TYPE_TEXTBOX1) BulkUpRequestTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.BulkUpRequestTx) CRITICAL(com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.CRITICAL) GOOD(com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.GOOD) SCHEDULE_ITEMS(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.SCHEDULE_ITEMS) HexDump(com.eveningoutpost.dexdrip.ImportedLibraries.usbserial.util.HexDump) ArrayList(java.util.ArrayList) BlueJay.versionSufficient(com.eveningoutpost.dexdrip.watch.thinjam.BlueJay.versionSufficient) JoH.tsl(com.eveningoutpost.dexdrip.Models.JoH.tsl) Helper(com.eveningoutpost.dexdrip.utils.bt.Helper) SetTxIdTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.SetTxIdTx) DefineWindowTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.DefineWindowTx) THINJAM_NOTIFY_TYPE_CANCEL(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_NOTIFY_TYPE_CANCEL) JamBaseBluetoothSequencer(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer) ERROR_MISC(com.eveningoutpost.dexdrip.watch.thinjam.Const.ERROR_MISC) ObservableField(android.databinding.ObservableField) RxBleDeviceServices(com.polidea.rxandroidble2.RxBleDeviceServices) THINJAM_BULK(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_BULK) lombok.val(lombok.val) THINJAM_NOTIFY_TYPE_DIALOG(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_NOTIFY_TYPE_DIALOG) AlertPlayer(com.eveningoutpost.dexdrip.UtilityModels.AlertPlayer) OPCODE_GET_STATUS_3(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_GET_STATUS_3) UserError(com.eveningoutpost.dexdrip.Models.UserError) OPCODE_GET_STATUS_1(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_GET_STATUS_1) OPCODE_GET_STATUS_2(com.eveningoutpost.dexdrip.watch.thinjam.Const.OPCODE_GET_STATUS_2) PersistentStore(com.eveningoutpost.dexdrip.UtilityModels.PersistentStore) Treatments(com.eveningoutpost.dexdrip.Models.Treatments) BitmapTools(com.eveningoutpost.dexdrip.watch.thinjam.utils.BitmapTools) com.eveningoutpost.dexdrip.xdrip(com.eveningoutpost.dexdrip.xdrip) FirmwareInfo(com.eveningoutpost.dexdrip.watch.thinjam.firmware.FirmwareInfo) RequiredArgsConstructor(lombok.RequiredArgsConstructor) INIT(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.INIT) FEATURE_TJ_DISP_A(com.eveningoutpost.dexdrip.watch.thinjam.Const.FEATURE_TJ_DISP_A) IBinder(android.os.IBinder) BytesGenerator(com.eveningoutpost.dexdrip.utils.BytesGenerator) ERROR_OUT_OF_RANGE(com.eveningoutpost.dexdrip.watch.thinjam.Const.ERROR_OUT_OF_RANGE) BleCannotSetCharacteristicNotificationException(com.polidea.rxandroidble2.exceptions.BleCannotSetCharacteristicNotificationException) NotifyTx.getPacketStreamForNotification(com.eveningoutpost.dexdrip.watch.thinjam.messages.NotifyTx.getPacketStreamForNotification) PowerManager(android.os.PowerManager) StatusItem(com.eveningoutpost.dexdrip.UtilityModels.StatusItem) BleCharacteristicNotFoundException(com.polidea.rxandroidble2.exceptions.BleCharacteristicNotFoundException) BlueJay.shouldSendReadings(com.eveningoutpost.dexdrip.watch.thinjam.BlueJay.shouldSendReadings) Locale(java.util.Locale) Schedulers(io.reactivex.schedulers.Schedulers) DEXCOM_PERIOD(com.eveningoutpost.dexdrip.UtilityModels.BgGraphBuilder.DEXCOM_PERIOD) DISCOVER(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.DISCOVER) BlueJayFirmware.parse(com.eveningoutpost.dexdrip.watch.thinjam.firmware.BlueJayFirmware.parse) BAD(com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.BAD) THINJAM_OTA(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_OTA) CLOSE(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.CLOSE) BgReading(com.eveningoutpost.dexdrip.Models.BgReading) NORMAL(com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.NORMAL) Expose(com.google.gson.annotations.Expose) UUID(java.util.UUID) ENABLE_NOTIFICATIONS(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.ENABLE_NOTIFICATIONS) THINJAM_NOTIFY_TYPE_HIGH_ALERT(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_NOTIFY_TYPE_HIGH_ALERT) List(java.util.List) BleDisconnectedException(com.polidea.rxandroidble2.exceptions.BleDisconnectedException) NOTICE(com.eveningoutpost.dexdrip.UtilityModels.StatusItem.Highlight.NOTICE) R(com.eveningoutpost.dexdrip.R) Subscription(com.eveningoutpost.dexdrip.utils.bt.Subscription) Ob1G5CollectionService(com.eveningoutpost.dexdrip.Services.Ob1G5CollectionService) ERROR_OK(com.eveningoutpost.dexdrip.watch.thinjam.Const.ERROR_OK) BulkUpTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.BulkUpTx) ThinJamActivity(com.eveningoutpost.dexdrip.ui.activities.ThinJamActivity) ConcurrentLinkedQueue(java.util.concurrent.ConcurrentLinkedQueue) JoH.msTill(com.eveningoutpost.dexdrip.Models.JoH.msTill) Setter(lombok.Setter) LOG_TESTS(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.LOG_TESTS) Getter(lombok.Getter) AuthReqTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.AuthReqTx) Constants(com.eveningoutpost.dexdrip.UtilityModels.Constants) PushRx(com.eveningoutpost.dexdrip.watch.thinjam.messages.PushRx) Pair(android.util.Pair) Intent(android.content.Intent) HOUR_IN_MS(com.eveningoutpost.dexdrip.UtilityModels.Constants.HOUR_IN_MS) RBulkUpTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.RBulkUpTx) StandbyTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.StandbyTx) JoH.niceTimeScalar(com.eveningoutpost.dexdrip.Models.JoH.niceTimeScalar) Binder(android.os.Binder) SuppressLint(android.annotation.SuppressLint) OTAUI(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.OTAUI) SlidingWindowConstraint(com.eveningoutpost.dexdrip.utils.time.SlidingWindowConstraint) TJ_BitmapType(com.eveningoutpost.dexdrip.watch.thinjam.utils.BitmapTools.TJ_BitmapType) SLEEP(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.SLEEP) BluetoothGattService(android.bluetooth.BluetoothGattService) com.eveningoutpost.dexdrip.xdrip.gs(com.eveningoutpost.dexdrip.xdrip.gs) BlueJayFirmware.split(com.eveningoutpost.dexdrip.watch.thinjam.firmware.BlueJayFirmware.split) JoH.msSince(com.eveningoutpost.dexdrip.Models.JoH.msSince) JoH.threadSleep(com.eveningoutpost.dexdrip.Models.JoH.threadSleep) BackFillTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.BackFillTx) TimeUnit(java.util.concurrent.TimeUnit) SECOND_IN_MS(com.eveningoutpost.dexdrip.UtilityModels.Constants.SECOND_IN_MS) THINJAM_WRITE(com.eveningoutpost.dexdrip.watch.thinjam.Const.THINJAM_WRITE) ResetPersistTx(com.eveningoutpost.dexdrip.watch.thinjam.messages.ResetPersistTx) RUN_QUEUE(com.eveningoutpost.dexdrip.watch.thinjam.BlueJayService.ThinJamState.RUN_QUEUE) SEND_QUEUE(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.SEND_QUEUE) SetGammaEtc(com.eveningoutpost.dexdrip.watch.thinjam.messages.SetGammaEtc) MINUTE_IN_MS(com.eveningoutpost.dexdrip.UtilityModels.Constants.MINUTE_IN_MS) lombok.val(lombok.val) BleCannotSetCharacteristicNotificationException(com.polidea.rxandroidble2.exceptions.BleCannotSetCharacteristicNotificationException) BleCharacteristicNotFoundException(com.polidea.rxandroidble2.exceptions.BleCharacteristicNotFoundException) BleDisconnectedException(com.polidea.rxandroidble2.exceptions.BleDisconnectedException) Subscription(com.eveningoutpost.dexdrip.utils.bt.Subscription)

Aggregations

SuppressLint (android.annotation.SuppressLint)2 BluetoothGattCharacteristic (android.bluetooth.BluetoothGattCharacteristic)2 BluetoothGattService (android.bluetooth.BluetoothGattService)2 Intent (android.content.Intent)2 ObservableField (android.databinding.ObservableField)2 Binder (android.os.Binder)2 IBinder (android.os.IBinder)2 PowerManager (android.os.PowerManager)2 Pair (android.util.Pair)2 CalibrationState (com.eveningoutpost.dexdrip.G5Model.CalibrationState)2 Home (com.eveningoutpost.dexdrip.Home)2 HexDump (com.eveningoutpost.dexdrip.ImportedLibraries.usbserial.util.HexDump)2 BgReading (com.eveningoutpost.dexdrip.Models.BgReading)2 JoH (com.eveningoutpost.dexdrip.Models.JoH)2 JoH.bytesToHex (com.eveningoutpost.dexdrip.Models.JoH.bytesToHex)2 JoH.msSince (com.eveningoutpost.dexdrip.Models.JoH.msSince)2 JoH.msTill (com.eveningoutpost.dexdrip.Models.JoH.msTill)2 JoH.niceTimeScalar (com.eveningoutpost.dexdrip.Models.JoH.niceTimeScalar)2 JoH.threadSleep (com.eveningoutpost.dexdrip.Models.JoH.threadSleep)2 JoH.tsl (com.eveningoutpost.dexdrip.Models.JoH.tsl)2