diff --git a/app/src/main/java/de/jotomo/ruffy/spi/BasalProfile.java b/app/src/main/java/de/jotomo/ruffyscripter/BasalProfile.java similarity index 96% rename from app/src/main/java/de/jotomo/ruffy/spi/BasalProfile.java rename to app/src/main/java/de/jotomo/ruffyscripter/BasalProfile.java index 1765ff78f4..5496357eae 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/BasalProfile.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/BasalProfile.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi; +package de.jotomo.ruffyscripter; import java.util.Arrays; diff --git a/app/src/main/java/de/jotomo/ruffy/spi/BolusProgressReporter.java b/app/src/main/java/de/jotomo/ruffyscripter/BolusProgressReporter.java similarity index 88% rename from app/src/main/java/de/jotomo/ruffy/spi/BolusProgressReporter.java rename to app/src/main/java/de/jotomo/ruffyscripter/BolusProgressReporter.java index 274342010a..4422bd0ed0 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/BolusProgressReporter.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/BolusProgressReporter.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi; +package de.jotomo.ruffyscripter; public interface BolusProgressReporter { enum State { diff --git a/app/src/main/java/de/jotomo/ruffy/spi/CommandResult.java b/app/src/main/java/de/jotomo/ruffyscripter/CommandResult.java similarity index 93% rename from app/src/main/java/de/jotomo/ruffy/spi/CommandResult.java rename to app/src/main/java/de/jotomo/ruffyscripter/CommandResult.java index 2ab5695002..5b1dd6c817 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/CommandResult.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/CommandResult.java @@ -1,12 +1,12 @@ -package de.jotomo.ruffy.spi; +package de.jotomo.ruffyscripter; import android.support.annotation.Nullable; import java.util.LinkedList; import java.util.List; -import de.jotomo.ruffy.spi.history.Bolus; -import de.jotomo.ruffy.spi.history.PumpHistory; +import de.jotomo.ruffyscripter.history.Bolus; +import de.jotomo.ruffyscripter.history.PumpHistory; public class CommandResult { /** Whether the command was executed successfully. */ diff --git a/app/src/main/java/de/jotomo/ruffy/spi/PumpErrorCodes.java b/app/src/main/java/de/jotomo/ruffyscripter/PumpErrorCodes.java similarity index 95% rename from app/src/main/java/de/jotomo/ruffy/spi/PumpErrorCodes.java rename to app/src/main/java/de/jotomo/ruffyscripter/PumpErrorCodes.java index 28bfe0bd74..28b7ff5f08 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/PumpErrorCodes.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/PumpErrorCodes.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi; +package de.jotomo.ruffyscripter; public class PumpErrorCodes { public static final int CARTRIDGE_EMPTY = 1; diff --git a/app/src/main/java/de/jotomo/ruffy/spi/PumpState.java b/app/src/main/java/de/jotomo/ruffyscripter/PumpState.java similarity index 99% rename from app/src/main/java/de/jotomo/ruffy/spi/PumpState.java rename to app/src/main/java/de/jotomo/ruffyscripter/PumpState.java index 917c563e77..f1cb848e67 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/PumpState.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/PumpState.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi; +package de.jotomo.ruffyscripter; /** State displayed on the main screen of the pump. */ public class PumpState { diff --git a/app/src/main/java/de/jotomo/ruffy/spi/PumpWarningCodes.java b/app/src/main/java/de/jotomo/ruffyscripter/PumpWarningCodes.java similarity index 93% rename from app/src/main/java/de/jotomo/ruffy/spi/PumpWarningCodes.java rename to app/src/main/java/de/jotomo/ruffyscripter/PumpWarningCodes.java index c081d8ad9f..c846fc3cfc 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/PumpWarningCodes.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/PumpWarningCodes.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi; +package de.jotomo.ruffyscripter; public class PumpWarningCodes { public static final int CARTRIDGE_LOW = 1; diff --git a/app/src/main/java/de/jotomo/ruffy/spi/RuffyCommands.java b/app/src/main/java/de/jotomo/ruffyscripter/RuffyCommands.java similarity index 94% rename from app/src/main/java/de/jotomo/ruffy/spi/RuffyCommands.java rename to app/src/main/java/de/jotomo/ruffyscripter/RuffyCommands.java index 8e43771ac1..7e239f1c0c 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/RuffyCommands.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/RuffyCommands.java @@ -1,6 +1,6 @@ -package de.jotomo.ruffy.spi; +package de.jotomo.ruffyscripter; -import de.jotomo.ruffy.spi.history.PumpHistoryRequest; +import de.jotomo.ruffyscripter.history.PumpHistoryRequest; public interface RuffyCommands { /** Issues a bolus issues updates on progress through via {@link BolusProgressReporter}. */ diff --git a/app/src/main/java/de/jotomo/ruffyscripter/RuffyCommandsV1Impl.java b/app/src/main/java/de/jotomo/ruffyscripter/RuffyCommandsV1Impl.java deleted file mode 100644 index bd95aef8da..0000000000 --- a/app/src/main/java/de/jotomo/ruffyscripter/RuffyCommandsV1Impl.java +++ /dev/null @@ -1,127 +0,0 @@ -package de.jotomo.ruffyscripter; - -import android.content.Context; -import android.support.annotation.NonNull; - -import java.util.Date; - -import de.jotomo.ruffy.spi.BasalProfile; -import de.jotomo.ruffy.spi.BolusProgressReporter; -import de.jotomo.ruffy.spi.CommandResult; -import de.jotomo.ruffy.spi.RuffyCommands; -import de.jotomo.ruffy.spi.history.PumpHistory; -import de.jotomo.ruffy.spi.history.PumpHistoryRequest; - - -public class RuffyCommandsV1Impl implements RuffyCommands { - private static RuffyCommandsV1Impl instance; - private static RuffyCommands delegate; - - @NonNull - public static RuffyCommands getInstance(Context context) { - if (instance == null) { - instance = new RuffyCommandsV1Impl(); - delegate = new RuffyScripter(context); - } - return instance; - } - - private RuffyCommandsV1Impl() {} - - /** Not supported by RuffyScripter */ - @Override - public CommandResult getDateAndTime() { - return new CommandResult().success(false); - } - - @Override - public CommandResult readReservoirLevelAndLastBolus() { - return delegate.readReservoirLevelAndLastBolus(); - } - - @Override - public CommandResult confirmAlert(int warningCode) { - return delegate.confirmAlert(warningCode); - } - - @Override - public CommandResult deliverBolus(double amount, BolusProgressReporter bolusProgressReporter) { - return delegate.deliverBolus(amount, bolusProgressReporter); - } - - @Override - public void cancelBolus() { - delegate.cancelBolus(); - } - - @Override - public CommandResult setTbr(int percent, int duration) { - return delegate.setTbr(percent, duration); - } - - @Override - public CommandResult cancelTbr() { - return delegate.cancelTbr(); - } - - @Override - public boolean isPumpAvailable() { - return delegate.isPumpAvailable(); - } - - @Override - public boolean isPumpBusy() { - return delegate.isPumpBusy(); - } - - @Override - public boolean isConnected() { - return delegate.isConnected(); - } - - @Override - public void disconnect() { - delegate.disconnect(); - } - - @Override - public CommandResult readPumpState() { - return delegate.readPumpState(); - } - - @Override - public CommandResult readHistory(PumpHistoryRequest request) { - return delegate.readHistory(request); - } - - @Override - public CommandResult readBasalProfile() { - return delegate.readBasalProfile(); - } - - @Override - public CommandResult setBasalProfile(BasalProfile basalProfile) { - return delegate.setBasalProfile(basalProfile); - } - - /** Not supported by RuffyScripter */ - @Override - public CommandResult setDateAndTime() { - return new CommandResult().success(false); - } - - @Override - public void requestPairing() { - delegate.requestPairing(); - } - - @Override - public void sendAuthKey(String key) { - delegate.sendAuthKey(key); - } - - @Override - public void unpair() { - delegate.unpair(); - } -} diff --git a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java index d0034768d1..e2a88481a1 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java @@ -28,13 +28,7 @@ import java.util.Date; import java.util.List; import java.util.Objects; -import de.jotomo.ruffy.spi.BasalProfile; -import de.jotomo.ruffy.spi.BolusProgressReporter; -import de.jotomo.ruffy.spi.CommandResult; -import de.jotomo.ruffy.spi.PumpState; -import de.jotomo.ruffy.spi.RuffyCommands; -import de.jotomo.ruffy.spi.WarningOrErrorCode; -import de.jotomo.ruffy.spi.history.PumpHistoryRequest; +import de.jotomo.ruffyscripter.history.PumpHistoryRequest; import de.jotomo.ruffyscripter.commands.BolusCommand; import de.jotomo.ruffyscripter.commands.CancelTbrCommand; import de.jotomo.ruffyscripter.commands.Command; @@ -127,7 +121,7 @@ public class RuffyScripter implements RuffyCommands { } }; - RuffyScripter(Context context) { + public RuffyScripter(Context context) { boolean boundSucceeded = false; try { diff --git a/app/src/main/java/de/jotomo/ruffy/spi/WarningOrErrorCode.java b/app/src/main/java/de/jotomo/ruffyscripter/WarningOrErrorCode.java similarity index 95% rename from app/src/main/java/de/jotomo/ruffy/spi/WarningOrErrorCode.java rename to app/src/main/java/de/jotomo/ruffyscripter/WarningOrErrorCode.java index 9bc1754e9f..0961d79a29 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/WarningOrErrorCode.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/WarningOrErrorCode.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi; +package de.jotomo.ruffyscripter; import android.support.annotation.Nullable; diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/BaseCommand.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/BaseCommand.java index 6d2a887cc5..0ef54cd955 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/BaseCommand.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/BaseCommand.java @@ -3,7 +3,8 @@ package de.jotomo.ruffyscripter.commands; import java.util.Collections; import java.util.List; -import de.jotomo.ruffy.spi.CommandResult; +import de.jotomo.ruffyscripter.CommandResult; +import de.jotomo.ruffyscripter.PumpWarningCodes; import de.jotomo.ruffyscripter.RuffyScripter; public abstract class BaseCommand implements Command { @@ -29,7 +30,7 @@ public abstract class BaseCommand implements Command { /** * A warning id (or null) caused by a disconnect we can safely confirm on reconnect, * knowing it's not severe as it was caused by this command. - * @see de.jotomo.ruffy.spi.PumpWarningCodes + * @see PumpWarningCodes */ @Override public Integer getReconnectWarningId() { diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/BolusCommand.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/BolusCommand.java index 379e977bf8..7a07b3e474 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/BolusCommand.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/BolusCommand.java @@ -11,17 +11,17 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; -import de.jotomo.ruffy.spi.BolusProgressReporter; -import de.jotomo.ruffy.spi.PumpWarningCodes; -import de.jotomo.ruffy.spi.WarningOrErrorCode; -import de.jotomo.ruffy.spi.history.Bolus; +import de.jotomo.ruffyscripter.BolusProgressReporter; +import de.jotomo.ruffyscripter.PumpWarningCodes; +import de.jotomo.ruffyscripter.WarningOrErrorCode; +import de.jotomo.ruffyscripter.history.Bolus; import de.jotomo.ruffyscripter.RuffyScripter; -import static de.jotomo.ruffy.spi.BolusProgressReporter.State.DELIVERED; -import static de.jotomo.ruffy.spi.BolusProgressReporter.State.DELIVERING; -import static de.jotomo.ruffy.spi.BolusProgressReporter.State.PROGRAMMING; -import static de.jotomo.ruffy.spi.BolusProgressReporter.State.STOPPED; -import static de.jotomo.ruffy.spi.BolusProgressReporter.State.STOPPING; +import static de.jotomo.ruffyscripter.BolusProgressReporter.State.DELIVERED; +import static de.jotomo.ruffyscripter.BolusProgressReporter.State.DELIVERING; +import static de.jotomo.ruffyscripter.BolusProgressReporter.State.PROGRAMMING; +import static de.jotomo.ruffyscripter.BolusProgressReporter.State.STOPPED; +import static de.jotomo.ruffyscripter.BolusProgressReporter.State.STOPPING; public class BolusCommand extends BaseCommand { private static final Logger log = LoggerFactory.getLogger(BolusCommand.class); diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java index 4c4f9f5a02..15808461ec 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/CancelTbrCommand.java @@ -4,8 +4,8 @@ import org.monkey.d.ruffy.ruffy.driver.display.MenuType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import de.jotomo.ruffy.spi.PumpState; -import de.jotomo.ruffy.spi.PumpWarningCodes; +import de.jotomo.ruffyscripter.PumpState; +import de.jotomo.ruffyscripter.PumpWarningCodes; public class CancelTbrCommand extends BaseCommand { private static final Logger log = LoggerFactory.getLogger(CancelTbrCommand.class); diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/Command.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/Command.java index 9e95bee481..d89a9734ac 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/Command.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/Command.java @@ -3,7 +3,7 @@ package de.jotomo.ruffyscripter.commands; import java.util.List; import de.jotomo.ruffyscripter.RuffyScripter; -import de.jotomo.ruffy.spi.CommandResult; +import de.jotomo.ruffyscripter.CommandResult; /** * Interface for all commands to be executed by the pump. diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadBasalProfileCommand.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadBasalProfileCommand.java index 1cd3f1df32..87cb631694 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadBasalProfileCommand.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadBasalProfileCommand.java @@ -9,8 +9,8 @@ import org.slf4j.LoggerFactory; import java.util.Arrays; -import de.jotomo.ruffy.spi.BasalProfile; -import de.jotomo.ruffy.spi.PumpState; +import de.jotomo.ruffyscripter.BasalProfile; +import de.jotomo.ruffyscripter.PumpState; public class ReadBasalProfileCommand extends BaseCommand { private static final Logger log = LoggerFactory.getLogger(ReadBasalProfileCommand.class); diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadHistoryCommand.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadHistoryCommand.java index 8ba6c18d81..9b8aec8391 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadHistoryCommand.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadHistoryCommand.java @@ -13,12 +13,12 @@ import org.slf4j.LoggerFactory; import java.util.Calendar; import java.util.Date; -import de.jotomo.ruffy.spi.history.Bolus; -import de.jotomo.ruffy.spi.history.PumpAlert; -import de.jotomo.ruffy.spi.history.PumpHistory; -import de.jotomo.ruffy.spi.history.PumpHistoryRequest; -import de.jotomo.ruffy.spi.history.Tbr; -import de.jotomo.ruffy.spi.history.Tdd; +import de.jotomo.ruffyscripter.history.Bolus; +import de.jotomo.ruffyscripter.history.PumpAlert; +import de.jotomo.ruffyscripter.history.PumpHistory; +import de.jotomo.ruffyscripter.history.PumpHistoryRequest; +import de.jotomo.ruffyscripter.history.Tbr; +import de.jotomo.ruffyscripter.history.Tdd; // Note: TBRs are added to history only after they've completed running // TODO remove duplication diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadReservoirLevelAndLastBolus.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadReservoirLevelAndLastBolus.java index 1aefd38fab..00246f3809 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadReservoirLevelAndLastBolus.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/ReadReservoirLevelAndLastBolus.java @@ -10,7 +10,7 @@ import org.monkey.d.ruffy.ruffy.driver.display.menu.MenuTime; import java.util.Date; -import de.jotomo.ruffy.spi.history.Bolus; +import de.jotomo.ruffyscripter.history.Bolus; public class ReadReservoirLevelAndLastBolus extends BaseCommand { @Override diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/SetBasalProfileCommand.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/SetBasalProfileCommand.java index f6ffd2216d..ae1cb4e4e3 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/SetBasalProfileCommand.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/SetBasalProfileCommand.java @@ -12,8 +12,8 @@ import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; -import de.jotomo.ruffy.spi.BasalProfile; -import de.jotomo.ruffy.spi.PumpState; +import de.jotomo.ruffyscripter.BasalProfile; +import de.jotomo.ruffyscripter.PumpState; public class SetBasalProfileCommand extends BaseCommand { private static final Logger log = LoggerFactory.getLogger(SetBasalProfileCommand.class); diff --git a/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java b/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java index f3bfb87313..4a47679ac4 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/commands/SetTbrCommand.java @@ -12,9 +12,9 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; -import de.jotomo.ruffy.spi.PumpState; -import de.jotomo.ruffy.spi.PumpWarningCodes; -import de.jotomo.ruffy.spi.WarningOrErrorCode; +import de.jotomo.ruffyscripter.PumpState; +import de.jotomo.ruffyscripter.PumpWarningCodes; +import de.jotomo.ruffyscripter.WarningOrErrorCode; public class SetTbrCommand extends BaseCommand { private static final Logger log = LoggerFactory.getLogger(SetTbrCommand.class); diff --git a/app/src/main/java/de/jotomo/ruffy/spi/history/Bolus.java b/app/src/main/java/de/jotomo/ruffyscripter/history/Bolus.java similarity index 96% rename from app/src/main/java/de/jotomo/ruffy/spi/history/Bolus.java rename to app/src/main/java/de/jotomo/ruffyscripter/history/Bolus.java index 450cc2390e..1e2eebf040 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/history/Bolus.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/history/Bolus.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi.history; +package de.jotomo.ruffyscripter.history; import java.util.Date; diff --git a/app/src/main/java/de/jotomo/ruffy/spi/history/HistoryRecord.java b/app/src/main/java/de/jotomo/ruffyscripter/history/HistoryRecord.java similarity index 79% rename from app/src/main/java/de/jotomo/ruffy/spi/history/HistoryRecord.java rename to app/src/main/java/de/jotomo/ruffyscripter/history/HistoryRecord.java index 32f3d330c4..64ddb21f24 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/history/HistoryRecord.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/history/HistoryRecord.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi.history; +package de.jotomo.ruffyscripter.history; public abstract class HistoryRecord { public final long timestamp; diff --git a/app/src/main/java/de/jotomo/ruffy/spi/history/PumpAlert.java b/app/src/main/java/de/jotomo/ruffyscripter/history/PumpAlert.java similarity index 97% rename from app/src/main/java/de/jotomo/ruffy/spi/history/PumpAlert.java rename to app/src/main/java/de/jotomo/ruffyscripter/history/PumpAlert.java index 39ff2df69c..d770579209 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/history/PumpAlert.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/history/PumpAlert.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi.history; +package de.jotomo.ruffyscripter.history; import java.util.Date; diff --git a/app/src/main/java/de/jotomo/ruffy/spi/history/PumpHistory.java b/app/src/main/java/de/jotomo/ruffyscripter/history/PumpHistory.java similarity index 97% rename from app/src/main/java/de/jotomo/ruffy/spi/history/PumpHistory.java rename to app/src/main/java/de/jotomo/ruffyscripter/history/PumpHistory.java index 4c7a7a5d47..b5c8284f74 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/history/PumpHistory.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/history/PumpHistory.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi.history; +package de.jotomo.ruffyscripter.history; import android.support.annotation.NonNull; diff --git a/app/src/main/java/de/jotomo/ruffy/spi/history/PumpHistoryRequest.java b/app/src/main/java/de/jotomo/ruffyscripter/history/PumpHistoryRequest.java similarity index 97% rename from app/src/main/java/de/jotomo/ruffy/spi/history/PumpHistoryRequest.java rename to app/src/main/java/de/jotomo/ruffyscripter/history/PumpHistoryRequest.java index 9d89241399..2719059e32 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/history/PumpHistoryRequest.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/history/PumpHistoryRequest.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi.history; +package de.jotomo.ruffyscripter.history; import java.util.Date; diff --git a/app/src/main/java/de/jotomo/ruffy/spi/history/Tbr.java b/app/src/main/java/de/jotomo/ruffyscripter/history/Tbr.java similarity index 96% rename from app/src/main/java/de/jotomo/ruffy/spi/history/Tbr.java rename to app/src/main/java/de/jotomo/ruffyscripter/history/Tbr.java index 97936dcaef..2d7c7c3f65 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/history/Tbr.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/history/Tbr.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi.history; +package de.jotomo.ruffyscripter.history; import java.util.Date; diff --git a/app/src/main/java/de/jotomo/ruffy/spi/history/Tdd.java b/app/src/main/java/de/jotomo/ruffyscripter/history/Tdd.java similarity index 96% rename from app/src/main/java/de/jotomo/ruffy/spi/history/Tdd.java rename to app/src/main/java/de/jotomo/ruffyscripter/history/Tdd.java index 58c3ac4c4d..0e20de59f4 100644 --- a/app/src/main/java/de/jotomo/ruffy/spi/history/Tdd.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/history/Tdd.java @@ -1,4 +1,4 @@ -package de.jotomo.ruffy.spi.history; +package de.jotomo.ruffyscripter.history; import java.util.Date; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboAlertHistoryDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboAlertHistoryDialog.java index 9b4b2f98d8..8873804bbc 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboAlertHistoryDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboAlertHistoryDialog.java @@ -10,7 +10,7 @@ import android.widget.TextView; import java.text.DateFormat; import java.util.List; -import de.jotomo.ruffy.spi.history.PumpAlert; +import de.jotomo.ruffyscripter.history.PumpAlert; import info.nightscout.androidaps.R; public class ComboAlertHistoryDialog extends DialogFragment { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java index e5989e4ecd..3e09d76fd9 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java @@ -14,8 +14,8 @@ import android.widget.TextView; import com.squareup.otto.Subscribe; -import de.jotomo.ruffy.spi.PumpState; -import de.jotomo.ruffy.spi.history.Bolus; +import de.jotomo.ruffyscripter.PumpState; +import de.jotomo.ruffyscripter.history.Bolus; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; import info.nightscout.androidaps.plugins.Common.SubscriberFragment; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java index 106264cc32..65a38b42e4 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java @@ -11,18 +11,18 @@ import org.slf4j.LoggerFactory; import java.util.Calendar; import java.util.Date; -import de.jotomo.ruffy.spi.BasalProfile; -import de.jotomo.ruffy.spi.BolusProgressReporter; -import de.jotomo.ruffy.spi.CommandResult; -import de.jotomo.ruffy.spi.PumpState; -import de.jotomo.ruffy.spi.PumpWarningCodes; -import de.jotomo.ruffy.spi.RuffyCommands; -import de.jotomo.ruffy.spi.WarningOrErrorCode; -import de.jotomo.ruffy.spi.history.Bolus; -import de.jotomo.ruffy.spi.history.PumpHistory; -import de.jotomo.ruffy.spi.history.PumpHistoryRequest; -import de.jotomo.ruffy.spi.history.Tbr; -import de.jotomo.ruffyscripter.RuffyCommandsV1Impl; +import de.jotomo.ruffyscripter.BasalProfile; +import de.jotomo.ruffyscripter.BolusProgressReporter; +import de.jotomo.ruffyscripter.CommandResult; +import de.jotomo.ruffyscripter.PumpState; +import de.jotomo.ruffyscripter.PumpWarningCodes; +import de.jotomo.ruffyscripter.RuffyCommands; +import de.jotomo.ruffyscripter.RuffyScripter; +import de.jotomo.ruffyscripter.WarningOrErrorCode; +import de.jotomo.ruffyscripter.history.Bolus; +import de.jotomo.ruffyscripter.history.PumpHistory; +import de.jotomo.ruffyscripter.history.PumpHistoryRequest; +import de.jotomo.ruffyscripter.history.Tbr; import info.nightscout.androidaps.BuildConfig; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; @@ -113,7 +113,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf .success(false).enacted(false).comment(MainApp.sResources.getString(R.string.combo_pump_unsupported_operation)); private ComboPlugin() { - ruffyScripter = RuffyCommandsV1Impl.getInstance(MainApp.instance()); + ruffyScripter = new RuffyScripter(MainApp.instance().getApplicationContext()); } public ComboPump getPump() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPump.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPump.java index 3aa4137b8b..7c903533b6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPump.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPump.java @@ -6,11 +6,11 @@ import android.support.annotation.Nullable; import java.util.ArrayList; import java.util.List; -import de.jotomo.ruffy.spi.BasalProfile; -import de.jotomo.ruffy.spi.PumpState; -import de.jotomo.ruffy.spi.history.Bolus; -import de.jotomo.ruffy.spi.history.PumpAlert; -import de.jotomo.ruffy.spi.history.Tdd; +import de.jotomo.ruffyscripter.BasalProfile; +import de.jotomo.ruffyscripter.PumpState; +import de.jotomo.ruffyscripter.history.Bolus; +import de.jotomo.ruffyscripter.history.PumpAlert; +import de.jotomo.ruffyscripter.history.Tdd; class ComboPump { boolean initialized = false; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboTddHistoryDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboTddHistoryDialog.java index 71ab8f2515..741691f4e4 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboTddHistoryDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboTddHistoryDialog.java @@ -11,7 +11,7 @@ import java.text.DateFormat; import java.util.List; import java.util.Locale; -import de.jotomo.ruffy.spi.history.Tdd; +import de.jotomo.ruffyscripter.history.Tdd; import info.nightscout.androidaps.R; public class ComboTddHistoryDialog extends DialogFragment {