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