Apply @andyrozman's fixes for compilation errors
This commit is contained in:
parent
71d5409344
commit
df2de82810
|
@ -21,6 +21,7 @@ import info.nightscout.androidaps.interfaces.PluginDescription;
|
||||||
import info.nightscout.androidaps.interfaces.PluginType;
|
import info.nightscout.androidaps.interfaces.PluginType;
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.LTag;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
||||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
|
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDriverState;
|
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDriverState;
|
||||||
|
@ -46,7 +47,7 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP;
|
||||||
public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodPumpPluginInterface {
|
public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodPumpPluginInterface {
|
||||||
|
|
||||||
// TODO Dagger
|
// TODO Dagger
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMP);
|
//private static final Logger LOG = LoggerFactory.getLogger(L.PUMP);
|
||||||
|
|
||||||
protected static OmnipodDashPumpPlugin plugin = null;
|
protected static OmnipodDashPumpPlugin plugin = null;
|
||||||
//private RileyLinkOmnipodService omnipodService;
|
//private RileyLinkOmnipodService omnipodService;
|
||||||
|
@ -66,7 +67,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
||||||
|
|
||||||
private Profile currentProfile;
|
private Profile currentProfile;
|
||||||
|
|
||||||
@Inject
|
//@Inject
|
||||||
public OmnipodDashPumpPlugin(HasAndroidInjector injector,
|
public OmnipodDashPumpPlugin(HasAndroidInjector injector,
|
||||||
AAPSLogger aapsLogger,
|
AAPSLogger aapsLogger,
|
||||||
RxBusWrapper rxBus,
|
RxBusWrapper rxBus,
|
||||||
|
@ -104,13 +105,13 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
||||||
//
|
//
|
||||||
// public void onServiceDisconnected(ComponentName name) {
|
// public void onServiceDisconnected(ComponentName name) {
|
||||||
// if (isLoggingEnabled())
|
// if (isLoggingEnabled())
|
||||||
// LOG.debug("RileyLinkOmnipodService is disconnected");
|
// aapsLogger.debug(LTag.PUMP, "RileyLinkOmnipodService is disconnected");
|
||||||
// omnipodService = null;
|
// omnipodService = null;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// public void onServiceConnected(ComponentName name, IBinder service) {
|
// public void onServiceConnected(ComponentName name, IBinder service) {
|
||||||
// if (isLoggingEnabled())
|
// if (isLoggingEnabled())
|
||||||
// LOG.debug("RileyLinkOmnipodService is connected");
|
// aapsLogger.debug(LTag.PUMP, "RileyLinkOmnipodService is connected");
|
||||||
// RileyLinkOmnipodService.LocalBinder mLocalBinder = (RileyLinkOmnipodService.LocalBinder) service;
|
// RileyLinkOmnipodService.LocalBinder mLocalBinder = (RileyLinkOmnipodService.LocalBinder) service;
|
||||||
// omnipodService = mLocalBinder.getServiceInstance();
|
// omnipodService = mLocalBinder.getServiceInstance();
|
||||||
//
|
//
|
||||||
|
@ -121,7 +122,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
||||||
//
|
//
|
||||||
// if (OmnipodUtil.getPumpStatus() != null) {
|
// if (OmnipodUtil.getPumpStatus() != null) {
|
||||||
// if (isLoggingEnabled())
|
// if (isLoggingEnabled())
|
||||||
// LOG.debug("Starting OmniPod-RileyLink service");
|
// aapsLogger.debug(LTag.PUMP, "Starting OmniPod-RileyLink service");
|
||||||
// if (OmnipodUtil.getPumpStatus().setNotInPreInit()) {
|
// if (OmnipodUtil.getPumpStatus().setNotInPreInit()) {
|
||||||
// break;
|
// break;
|
||||||
// }
|
// }
|
||||||
|
@ -171,7 +172,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
||||||
@Override
|
@Override
|
||||||
public boolean isInitialized() {
|
public boolean isInitialized() {
|
||||||
if (displayConnectionMessages)
|
if (displayConnectionMessages)
|
||||||
LOG.debug(getLogPrefix() + "isInitialized");
|
aapsLogger.debug(LTag.PUMP, getLogPrefix() + "isInitialized");
|
||||||
return isServiceSet() && isInitialized;
|
return isServiceSet() && isInitialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +180,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
||||||
@Override
|
@Override
|
||||||
public boolean isConnected() {
|
public boolean isConnected() {
|
||||||
if (displayConnectionMessages)
|
if (displayConnectionMessages)
|
||||||
LOG.debug(getLogPrefix() + "isConnected");
|
aapsLogger.debug(LTag.PUMP, getLogPrefix() + "isConnected");
|
||||||
return isServiceSet() && isServiceInitialized();
|
return isServiceSet() && isServiceInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +188,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
||||||
@Override
|
@Override
|
||||||
public boolean isConnecting() {
|
public boolean isConnecting() {
|
||||||
if (displayConnectionMessages)
|
if (displayConnectionMessages)
|
||||||
LOG.debug(getLogPrefix() + "isConnecting");
|
aapsLogger.debug(LTag.PUMP, getLogPrefix() + "isConnecting");
|
||||||
return !isServiceSet() || !isServiceInitialized();
|
return !isServiceSet() || !isServiceInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +225,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
||||||
|
|
||||||
private void initializePump(boolean realInit) {
|
private void initializePump(boolean realInit) {
|
||||||
|
|
||||||
LOG.info(getLogPrefix() + "initializePump - start");
|
aapsLogger.info(LTag.PUMP, getLogPrefix() + "initializePump - start");
|
||||||
|
|
||||||
if (omnipodCommunicationManager == null) {
|
if (omnipodCommunicationManager == null) {
|
||||||
omnipodCommunicationManager = OmnipodDashCommunicationManager.getInstance();
|
omnipodCommunicationManager = OmnipodDashCommunicationManager.getInstance();
|
||||||
|
|
|
@ -2,13 +2,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod_dash.comm;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import info.nightscout.androidaps.data.DetailedBolusInfo;
|
import info.nightscout.androidaps.data.DetailedBolusInfo;
|
||||||
import info.nightscout.androidaps.data.Profile;
|
import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||||
import info.nightscout.androidaps.logging.L;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.common.data.TempBasalPair;
|
import info.nightscout.androidaps.plugins.pump.common.data.TempBasalPair;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy;
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo.PodInfoRecentPulseLog;
|
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo.PodInfoRecentPulseLog;
|
||||||
|
@ -26,7 +22,7 @@ public class OmnipodDashCommunicationManager implements OmnipodCommunicationMana
|
||||||
|
|
||||||
// TODO Dagger
|
// TODO Dagger
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPCOMM);
|
// private static final Logger LOG = LoggerFactory.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
private static OmnipodDashCommunicationManager omnipodCommunicationManager;
|
private static OmnipodDashCommunicationManager omnipodCommunicationManager;
|
||||||
private String errorMessage;
|
private String errorMessage;
|
||||||
|
@ -38,51 +34,48 @@ public class OmnipodDashCommunicationManager implements OmnipodCommunicationMana
|
||||||
// RileyLinkConst.Prefs.LastGoodDeviceCommunicationTime, 0L);
|
// RileyLinkConst.Prefs.LastGoodDeviceCommunicationTime, 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private PodSessionState getPodSessionState() {
|
private PodSessionState getPodSessionState() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static OmnipodDashCommunicationManager getInstance() {
|
public static OmnipodDashCommunicationManager getInstance() {
|
||||||
return omnipodCommunicationManager;
|
return omnipodCommunicationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//@Override
|
//@Override
|
||||||
protected void configurePumpSpecificSettings() {
|
protected void configurePumpSpecificSettings() {
|
||||||
//pumpStatus = OmnipodUtil.getPumpStatus();
|
//pumpStatus = OmnipodUtil.getPumpStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getErrorResponse() {
|
public String getErrorResponse() {
|
||||||
return this.errorMessage;
|
return this.errorMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// private boolean isLogEnabled() {
|
||||||
private boolean isLogEnabled() {
|
// return L.isEnabled(L.PUMPCOMM);
|
||||||
return L.isEnabled(L.PUMPCOMM);
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PumpEnactResult initPod(PodInitActionType podInitActionType, PodInitReceiver podInitReceiver, Profile profile) {
|
public PumpEnactResult initPod(PodInitActionType podInitActionType, PodInitReceiver podInitReceiver, Profile profile) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public PumpEnactResult getPodStatus() {
|
public PumpEnactResult getPodStatus() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public PumpEnactResult deactivatePod(PodInitReceiver podInitReceiver) {
|
public PumpEnactResult deactivatePod(PodInitReceiver podInitReceiver) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public PumpEnactResult setBasalProfile(Profile profile) {
|
public PumpEnactResult setBasalProfile(Profile profile) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public PumpEnactResult resetPodStatus() {
|
public PumpEnactResult resetPodStatus() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -96,14 +89,17 @@ public class OmnipodDashCommunicationManager implements OmnipodCommunicationMana
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public PumpEnactResult cancelBolus() {
|
public PumpEnactResult cancelBolus() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public PumpEnactResult setTemporaryBasal(TempBasalPair tbr) {
|
public PumpEnactResult setTemporaryBasal(TempBasalPair tbr) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public PumpEnactResult cancelTemporaryBasal() {
|
public PumpEnactResult cancelTemporaryBasal() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue