- clean up after merge prepare

This commit is contained in:
Andy Rozman 2020-05-02 21:42:49 +01:00
parent 037d9e88df
commit 0149378b13
11 changed files with 6 additions and 43 deletions

View file

@ -44,7 +44,6 @@ import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.DecimalFormatter; import info.nightscout.androidaps.utils.DecimalFormatter;
import info.nightscout.androidaps.utils.FabricPrivacy; import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.resources.ResourceHelper; import info.nightscout.androidaps.utils.resources.ResourceHelper;
import info.nightscout.androidaps.utils.sharedPreferences.SP; import info.nightscout.androidaps.utils.sharedPreferences.SP;
import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.schedulers.Schedulers; import io.reactivex.schedulers.Schedulers;

View file

@ -3,14 +3,9 @@ package info.nightscout.androidaps.plugins.pump.common.data;
import java.util.Date; import java.util.Date;
import info.nightscout.androidaps.data.ProfileStore; import info.nightscout.androidaps.data.ProfileStore;
import info.nightscout.androidaps.interfaces.PumpDescription;
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpStatusType; import info.nightscout.androidaps.plugins.pump.common.defs.PumpStatusType;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.resources.ResourceHelper;
import info.nightscout.androidaps.utils.sharedPreferences.SP;
/** /**
* Created by andy on 4/28/18. * Created by andy on 4/28/18.
@ -18,8 +13,6 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP;
public abstract class PumpStatus { public abstract class PumpStatus {
// connection // connection
public long lastDataTime; public long lastDataTime;
public long lastConnection = 0L; public long lastConnection = 0L;

View file

@ -54,9 +54,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLin
import info.nightscout.androidaps.plugins.pump.common.utils.LocationHelper; import info.nightscout.androidaps.plugins.pump.common.utils.LocationHelper;
import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin; import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin;
import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpConfigurationChanged; import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpConfigurationChanged;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.OmnipodPumpStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.events.EventOmnipodPumpValuesChanged; import info.nightscout.androidaps.plugins.pump.omnipod.events.EventOmnipodPumpValuesChanged;
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodUtil;
import info.nightscout.androidaps.utils.resources.ResourceHelper; import info.nightscout.androidaps.utils.resources.ResourceHelper;
import info.nightscout.androidaps.utils.sharedPreferences.SP; import info.nightscout.androidaps.utils.sharedPreferences.SP;
@ -68,8 +66,6 @@ public class RileyLinkBLEScanActivity extends NoSplashAppCompatActivity {
@Inject RxBusWrapper rxBus; @Inject RxBusWrapper rxBus;
@Inject ResourceHelper resourceHelper; @Inject ResourceHelper resourceHelper;
@Inject RileyLinkUtil rileyLinkUtil; @Inject RileyLinkUtil rileyLinkUtil;
// TODO change this. Currently verifyConfiguration uses MDT data not only RL
// @Inject MedtronicPumpPlugin medtronicPumpPlugin;
@Inject ActivePluginProvider activePlugin; @Inject ActivePluginProvider activePlugin;
private static final int PERMISSION_REQUEST_COARSE_LOCATION = 30241; // arbitrary. private static final int PERMISSION_REQUEST_COARSE_LOCATION = 30241; // arbitrary.
@ -119,10 +115,6 @@ public class RileyLinkBLEScanActivity extends NoSplashAppCompatActivity {
sp.putString(RileyLinkConst.Prefs.RileyLinkAddress, bleAddress); sp.putString(RileyLinkConst.Prefs.RileyLinkAddress, bleAddress);
//RileyLinkUtil.getRileyLinkSelectPreference().setSummary(bleAddress);
// TODO refactor this
PumpInterface activePump = activePlugin.getActivePump(); PumpInterface activePump = activePlugin.getActivePump();
if (activePump.manufacturer()== ManufacturerType.Medtronic) { if (activePump.manufacturer()== ManufacturerType.Medtronic) {

View file

@ -362,8 +362,6 @@ public class RFSpy {
break; break;
} }
//this.selectedTargetFrequency = frequency;
} }

View file

@ -7,9 +7,11 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.Rile
*/ */
public class RileyLinkCommunicationException extends Exception { public class RileyLinkCommunicationException extends Exception {
String extendedErrorText; String extendedErrorText;
private RileyLinkBLEError errorCode; private RileyLinkBLEError errorCode;
public RileyLinkCommunicationException(RileyLinkBLEError errorCode, String extendedErrorText) { public RileyLinkCommunicationException(RileyLinkBLEError errorCode, String extendedErrorText) {
super(errorCode.getDescription()); super(errorCode.getDescription());

View file

@ -44,13 +44,6 @@ public class RileyLinkStatusGeneralFragment extends DaggerFragment implements Re
@Inject ResourceHelper resourceHelper; @Inject ResourceHelper resourceHelper;
@Inject MedtronicUtil medtronicUtil; @Inject MedtronicUtil medtronicUtil;
@Inject AAPSLogger aapsLogger; @Inject AAPSLogger aapsLogger;
// TODO fix this is not correct
//@Inject RileyLinkUtil rileyLinkUtil;
//@Inject MedtronicUtil medtronicUtil;
//@Inject MedtronicPumpStatus medtronicPumpStatus;
//@Inject MedtronicPumpPlugin medtronicPumpPlugin;
@Inject RileyLinkServiceData rileyLinkServiceData; @Inject RileyLinkServiceData rileyLinkServiceData;
TextView connectionStatus; TextView connectionStatus;
@ -65,10 +58,6 @@ public class RileyLinkStatusGeneralFragment extends DaggerFragment implements Re
TextView lastDeviceContact; TextView lastDeviceContact;
TextView firmwareVersion; TextView firmwareVersion;
//RileyLinkServiceData rileyLinkServiceData;
//MedtronicPumpStatus medtronicPumpStatus;
//OmnipodPumpStatus omnipodPumpStatus;
boolean first = false; boolean first = false;
@ -139,14 +128,8 @@ public class RileyLinkStatusGeneralFragment extends DaggerFragment implements Re
} }
// TODO add handling for Omnipod pump status
// TODO refactor this Omnipod
PumpPluginAbstract pumpPlugin = (PumpPluginAbstract)activePlugin.getActivePump(); PumpPluginAbstract pumpPlugin = (PumpPluginAbstract)activePlugin.getActivePump();
//if (activePlugin)
if (pumpPlugin.manufacturer()== ManufacturerType.Medtronic) { if (pumpPlugin.manufacturer()== ManufacturerType.Medtronic) {
MedtronicPumpStatus medtronicPumpStatus = (MedtronicPumpStatus)pumpPlugin.getPumpStatusData(); MedtronicPumpStatus medtronicPumpStatus = (MedtronicPumpStatus)pumpPlugin.getPumpStatusData();

View file

@ -19,7 +19,6 @@ import info.nightscout.androidaps.plugins.pump.medtronic.service.RileyLinkMedtro
*/ */
public class ResetRileyLinkConfigurationTask extends PumpTask { public class ResetRileyLinkConfigurationTask extends PumpTask {
private static final String TAG = "ResetRileyLinkTask";
@Inject ActivePluginProvider activePlugin; @Inject ActivePluginProvider activePlugin;
@Inject RxBusWrapper rxBus; @Inject RxBusWrapper rxBus;
@ -35,7 +34,6 @@ public class ResetRileyLinkConfigurationTask extends PumpTask {
@Override @Override
public void run() { public void run() {
// this is intended only for RL supported pump, so we can cast to PumpPluginAbstract
RileyLinkPumpDevice pumpAbstract = (RileyLinkPumpDevice)activePlugin.getActivePump(); RileyLinkPumpDevice pumpAbstract = (RileyLinkPumpDevice)activePlugin.getActivePump();
rxBus.send(new EventRefreshButtonState(false)); rxBus.send(new EventRefreshButtonState(false));

View file

@ -34,12 +34,11 @@ public class WakeAndTuneTask extends PumpTask {
@Override @Override
public void run() { public void run() {
PumpPluginAbstract pump = (PumpPluginAbstract) activePlugin.getActivePump(); RileyLinkPumpDevice pumpDevice = (RileyLinkPumpDevice)activePlugin.getActivePump();
RileyLinkPumpDevice pumpDevice = (RileyLinkPumpDevice)pump;
rxBus.send(new EventRefreshButtonState(false)); rxBus.send(new EventRefreshButtonState(false));
MedtronicPumpPlugin.isBusy = true; pumpDevice.setIsBusy(true);
pumpDevice.doTuneUpDevice(); pumpDevice.doTuneUpDevice();
MedtronicPumpPlugin.isBusy = false; pumpDevice.setIsBusy(false);
rxBus.send(new EventRefreshButtonState(true)); rxBus.send(new EventRefreshButtonState(true));
} }
} }

View file

@ -121,6 +121,7 @@ public class MedtronicPumpStatus extends PumpStatus {
medtronicPumpMap.put("723", PumpType.Medtronic_523_723_Revel); medtronicPumpMap.put("723", PumpType.Medtronic_523_723_Revel);
medtronicPumpMap.put("554", PumpType.Medtronic_554_754_Veo); medtronicPumpMap.put("554", PumpType.Medtronic_554_754_Veo);
medtronicPumpMap.put("754", PumpType.Medtronic_554_754_Veo); medtronicPumpMap.put("754", PumpType.Medtronic_554_754_Veo);
} }
public Map<String, PumpType> getMedtronicPumpMap() { public Map<String, PumpType> getMedtronicPumpMap() {

View file

@ -240,7 +240,6 @@ public class RileyLinkMedtronicService extends RileyLinkService {
} else { } else {
PumpType pumpType = medtronicPumpStatus.getMedtronicPumpMap().get(pumpTypePart); PumpType pumpType = medtronicPumpStatus.getMedtronicPumpMap().get(pumpTypePart);
medtronicPumpStatus.medtronicDeviceType = medtronicPumpStatus.getMedtronicDeviceTypeMap().get(pumpTypePart); medtronicPumpStatus.medtronicDeviceType = medtronicPumpStatus.getMedtronicDeviceTypeMap().get(pumpTypePart);
//medtronicPumpPlugin.getPumpDescription().setPumpDescription(pumpType);
medtronicPumpPlugin.setPumpType(pumpType); medtronicPumpPlugin.setPumpType(pumpType);
if (pumpTypePart.startsWith("7")) if (pumpTypePart.startsWith("7"))

View file

@ -68,7 +68,6 @@ public class MedtronicUtil {
this.medtronicPumpStatus = medtronicPumpStatus; this.medtronicPumpStatus = medtronicPumpStatus;
} }
public LocalTime getTimeFrom30MinInterval(int interval) { public LocalTime getTimeFrom30MinInterval(int interval) {
if (interval % 2 == 0) { if (interval % 2 == 0) {
return new LocalTime(interval / 2, 0); return new LocalTime(interval / 2, 0);