Move RuffyScripter to PumpCombo package.
(cherry picked from commit 7875ac0)
This commit is contained in:
parent
c8c445c608
commit
516a8c044b
18 changed files with 47 additions and 47 deletions
|
@ -17,9 +17,9 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
import de.jotomo.ruffyscripter.PumpState;
|
||||
import de.jotomo.ruffyscripter.commands.Command;
|
||||
import de.jotomo.ruffyscripter.commands.CommandResult;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.PumpState;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.Command;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.CommandResult;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.events.EventComboPumpUpdateGUI;
|
||||
|
|
|
@ -23,15 +23,15 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import de.jotomo.ruffyscripter.PumpState;
|
||||
import de.jotomo.ruffyscripter.RuffyScripter;
|
||||
import de.jotomo.ruffyscripter.commands.BolusCommand;
|
||||
import de.jotomo.ruffyscripter.commands.CancelTbrCommand;
|
||||
import de.jotomo.ruffyscripter.commands.CancellableBolusCommand;
|
||||
import de.jotomo.ruffyscripter.commands.Command;
|
||||
import de.jotomo.ruffyscripter.commands.CommandResult;
|
||||
import de.jotomo.ruffyscripter.commands.GetPumpStateCommand;
|
||||
import de.jotomo.ruffyscripter.commands.SetTbrCommand;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.PumpState;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.BolusCommand;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.CancelTbrCommand;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.CancellableBolusCommand;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.Command;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.CommandResult;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.GetPumpStateCommand;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.SetTbrCommand;
|
||||
import info.nightscout.androidaps.BuildConfig;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
|
|
|
@ -5,9 +5,9 @@ import android.support.annotation.Nullable;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import de.jotomo.ruffyscripter.PumpState;
|
||||
import de.jotomo.ruffyscripter.commands.Command;
|
||||
import de.jotomo.ruffyscripter.commands.CommandResult;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.PumpState;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.Command;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.CommandResult;
|
||||
|
||||
class ComboPump {
|
||||
@NonNull
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package de.jotomo.ruffyscripter;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter;
|
||||
|
||||
/**
|
||||
* The history data read from "My data"
|
|
@ -1,4 +1,4 @@
|
|||
package de.jotomo.ruffyscripter;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter;
|
||||
|
||||
import java.util.Date;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package de.jotomo.ruffyscripter;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemClock;
|
||||
|
@ -16,10 +16,10 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import de.jotomo.ruffyscripter.commands.Command;
|
||||
import de.jotomo.ruffyscripter.commands.CommandException;
|
||||
import de.jotomo.ruffyscripter.commands.CommandResult;
|
||||
import de.jotomo.ruffyscripter.commands.GetPumpStateCommand;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.Command;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.CommandException;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.CommandResult;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.GetPumpStateCommand;
|
||||
|
||||
// TODO regularly read "My data" history (boluses, TBR) to double check all commands ran successfully.
|
||||
// Automatically compare against AAPS db, or log all requests in the PumpInterface (maybe Milos
|
|
@ -1,11 +1,11 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import android.os.SystemClock;
|
||||
|
||||
import org.monkey.d.ruffy.ruffy.driver.display.MenuAttribute;
|
||||
import org.monkey.d.ruffy.ruffy.driver.display.MenuType;
|
||||
|
||||
import de.jotomo.ruffyscripter.RuffyScripter;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter;
|
||||
|
||||
public abstract class BaseCommand implements Command {
|
||||
// RS will inject itself here
|
|
@ -1,4 +1,4 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import android.os.SystemClock;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import org.monkey.d.ruffy.ruffy.driver.display.MenuType;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -7,7 +7,7 @@ import org.slf4j.LoggerFactory;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import de.jotomo.ruffyscripter.PumpState;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.PumpState;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
|
||||
// TODO robustness: can a TBR run out, whilst we're trying to cancel it?
|
|
@ -1,4 +1,4 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import android.os.SystemClock;
|
||||
|
||||
|
@ -11,13 +11,13 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import de.jotomo.ruffyscripter.PumpState;
|
||||
import de.jotomo.ruffyscripter.RuffyScripter;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.PumpState;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter;
|
||||
|
||||
import static de.jotomo.ruffyscripter.commands.CancellableBolusCommand.ProgressReportCallback.State.DELIVERED;
|
||||
import static de.jotomo.ruffyscripter.commands.CancellableBolusCommand.ProgressReportCallback.State.DELIVERING;
|
||||
import static de.jotomo.ruffyscripter.commands.CancellableBolusCommand.ProgressReportCallback.State.STOPPED;
|
||||
import static de.jotomo.ruffyscripter.commands.CancellableBolusCommand.ProgressReportCallback.State.STOPPING;
|
||||
import static info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.CancellableBolusCommand.ProgressReportCallback.State.DELIVERED;
|
||||
import static info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.CancellableBolusCommand.ProgressReportCallback.State.DELIVERING;
|
||||
import static info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.CancellableBolusCommand.ProgressReportCallback.State.STOPPED;
|
||||
import static info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.CancellableBolusCommand.ProgressReportCallback.State.STOPPING;
|
||||
|
||||
public class CancellableBolusCommand extends BolusCommand {
|
||||
private static final Logger log = LoggerFactory.getLogger(CancellableBolusCommand.class);
|
|
@ -1,8 +1,8 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.jotomo.ruffyscripter.RuffyScripter;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter;
|
||||
|
||||
/**
|
||||
* Interface for all commands to be executed by the pump.
|
|
@ -1,4 +1,4 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
public class CommandException extends RuntimeException {
|
||||
public boolean success = false;
|
|
@ -1,9 +1,9 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import de.jotomo.ruffyscripter.History;
|
||||
import de.jotomo.ruffyscripter.PumpState;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.History;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.PumpState;
|
||||
|
||||
public class CommandResult {
|
||||
public boolean success;
|
|
@ -1,4 +1,4 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import de.jotomo.ruffyscripter.RuffyScripter;
|
||||
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter;
|
||||
|
||||
public class GetBasalRateProfileCommand extends BaseCommand {
|
||||
private static final Logger log = LoggerFactory.getLogger(GetBasalRateProfileCommand.class);
|
|
@ -1,11 +1,11 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import org.monkey.d.ruffy.ruffy.driver.display.MenuType;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static de.jotomo.ruffyscripter.commands.GetPumpStateCommand.Stepper.runStep;
|
||||
import static info.nightscout.androidaps.plugins.PumpCombo.scripter.commands.GetPumpStateCommand.Stepper.runStep;
|
||||
|
||||
public class GetPumpStateCommand extends BaseCommand {
|
||||
interface Step {
|
|
@ -1,4 +1,4 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package de.jotomo.ruffyscripter.commands;
|
||||
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
|
||||
|
||||
import android.os.SystemClock;
|
||||
|
Loading…
Reference in a new issue