Move RuffyScripter to PumpCombo package.

(cherry picked from commit 7875ac0)
This commit is contained in:
Johannes Mockenhaupt 2017-09-01 19:01:24 +02:00
parent c8c445c608
commit 516a8c044b
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
18 changed files with 47 additions and 47 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter;
package info.nightscout.androidaps.plugins.PumpCombo.scripter;
/**
* The history data read from "My data"

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter;
package info.nightscout.androidaps.plugins.PumpCombo.scripter;
import java.util.Date;

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
import android.os.SystemClock;

View file

@ -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?

View file

@ -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);

View file

@ -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.

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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 {

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
import java.util.List;

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
import java.util.List;

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.scripter.commands;
import android.os.SystemClock;