- reverted some of my changes
- fixed problem that service doesn't start with AAPS, but with Tab click
This commit is contained in:
parent
19675b1951
commit
54d30cd8c4
|
@ -37,6 +37,7 @@ repositories {
|
|||
maven { url 'https://maven.fabric.io/public' }
|
||||
jcenter { url "https://jcenter.bintray.com/" }
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
|
||||
def generateGitBuild = { ->
|
||||
|
|
|
@ -430,7 +430,8 @@ public class RileyLinkBLE {
|
|||
// Catch if the service is not supported by the BLE device
|
||||
rval.resultCode = BLECommOperationResult.RESULT_NONE;
|
||||
aapsLogger.error(LTag.PUMPBTCOMM, "BT Device not supported");
|
||||
rileyLinkServiceData.setServiceState(RileyLinkServiceState.BluetoothError, RileyLinkError.NoBluetoothAdapter);
|
||||
// TODO: 11/07/2016 UI update for user
|
||||
// xyz rileyLinkServiceData.setServiceState(RileyLinkServiceState.BluetoothError, RileyLinkError.NoBluetoothAdapter);
|
||||
} else {
|
||||
BluetoothGattCharacteristic chara = bluetoothConnectionGatt.getService(serviceUUID)
|
||||
.getCharacteristic(charaUUID);
|
||||
|
@ -489,7 +490,8 @@ public class RileyLinkBLE {
|
|||
// e.g. when the user switches from portrait to landscape.
|
||||
rval.resultCode = BLECommOperationResult.RESULT_NONE;
|
||||
aapsLogger.error(LTag.PUMPBTCOMM, "BT Device not supported");
|
||||
rileyLinkServiceData.setServiceState(RileyLinkServiceState.BluetoothError, RileyLinkError.NoBluetoothAdapter);
|
||||
// TODO: 11/07/2016 UI update for user
|
||||
// xyz rileyLinkServiceData.setServiceState(RileyLinkServiceState.BluetoothError, RileyLinkError.NoBluetoothAdapter);
|
||||
} else {
|
||||
BluetoothGattCharacteristic chara = bluetoothConnectionGatt.getService(serviceUUID)
|
||||
.getCharacteristic(charaUUID);
|
||||
|
@ -531,7 +533,8 @@ public class RileyLinkBLE {
|
|||
// Catch if the service is not supported by the BLE device
|
||||
rval.resultCode = BLECommOperationResult.RESULT_NONE;
|
||||
aapsLogger.error(LTag.PUMPBTCOMM, "BT Device not supported");
|
||||
rileyLinkServiceData.setServiceState(RileyLinkServiceState.BluetoothError, RileyLinkError.NoBluetoothAdapter);
|
||||
// TODO: 11/07/2016 UI update for user
|
||||
// xyz rileyLinkServiceData.setServiceState(RileyLinkServiceState.BluetoothError, RileyLinkError.NoBluetoothAdapter);
|
||||
} else {
|
||||
BluetoothGattCharacteristic chara = bluetoothConnectionGatt.getService(serviceUUID).getCharacteristic(
|
||||
charaUUID);
|
||||
|
|
|
@ -101,7 +101,7 @@ public abstract class RileyLinkService extends DaggerService {
|
|||
super.onDestroy();
|
||||
//LOG.error("I die! I die!");
|
||||
|
||||
rfspy.stopReader();
|
||||
// xyz rfspy.stopReader();
|
||||
rileyLinkBLE.disconnect(); // dispose of Gatt (disconnect and close)
|
||||
|
||||
if (mBroadcastReceiver != null) {
|
||||
|
|
|
@ -61,14 +61,11 @@ import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil;
|
|||
*/
|
||||
public class MedtronicCommunicationManager extends RileyLinkCommunicationManager {
|
||||
|
||||
@Inject AAPSLogger aapsLogger;
|
||||
@Inject MedtronicPumpStatus medtronicPumpStatus;
|
||||
@Inject MedtronicPumpPlugin medtronicPumpPlugin;
|
||||
@Inject MedtronicConverter medtronicConverter;
|
||||
@Inject MedtronicUtil medtronicUtil;
|
||||
@Inject MedtronicPumpHistoryDecoder medtronicPumpHistoryDecoder;
|
||||
@Inject RileyLinkServiceData rileyLinkServiceData;
|
||||
@Inject ServiceTaskExecutor serviceTaskExecutor;
|
||||
|
||||
private final int MAX_COMMAND_TRIES = 3;
|
||||
private final int DEFAULT_TIMEOUT = 2000;
|
||||
|
|
|
@ -213,6 +213,7 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
|
|||
aapsLogger.debug(LTag.PUMP, "RileyLinkOmnipodService is connected");
|
||||
RileyLinkOmnipodService.LocalBinder mLocalBinder = (RileyLinkOmnipodService.LocalBinder) service;
|
||||
rileyLinkOmnipodService = mLocalBinder.getServiceInstance();
|
||||
rileyLinkOmnipodService.verifyConfiguration();
|
||||
|
||||
new Thread(() -> {
|
||||
|
||||
|
|
|
@ -220,6 +220,7 @@ public class OmnipodUITask {
|
|||
}
|
||||
|
||||
omnipodUtil.setPodDeviceState(PodDeviceState.Sleeping);
|
||||
omnipodUtil.setCurrentCommand(null);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import info.nightscout.androidaps.events.Event
|
|||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkError
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState
|
||||
import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpDeviceState
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodCommandType
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodDeviceState
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodSessionState
|
||||
|
||||
|
@ -26,6 +27,11 @@ class EventOmnipodDeviceStatusChange : Event {
|
|||
this.rileyLinkError = rileyLinkError
|
||||
}
|
||||
|
||||
|
||||
constructor(commandType: OmnipodCommandType?) {
|
||||
}
|
||||
|
||||
|
||||
constructor(podSessionState: PodSessionState?) {
|
||||
this.podSessionState = podSessionState
|
||||
}
|
||||
|
|
|
@ -100,6 +100,8 @@ public class OmnipodUtil {
|
|||
|
||||
if (currentCommand != null)
|
||||
rileyLinkUtil.getRileyLinkHistory().add(new RLHistoryItem(currentCommand));
|
||||
|
||||
rxBus.send(new EventOmnipodDeviceStatusChange((OmnipodCommandType)null));
|
||||
}
|
||||
|
||||
public static void displayNotConfiguredDialog(Context context) {
|
||||
|
|
Loading…
Reference in a new issue