Package refactoring.

This commit is contained in:
Johannes Mockenhaupt 2017-10-17 19:45:26 +02:00
parent f33d55b092
commit 4a91b68ed7
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
25 changed files with 77 additions and 77 deletions

View file

@ -17,8 +17,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.plugins.PumpCombo.spi.PumpState; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.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;

View file

@ -29,11 +29,11 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin; import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.Overview.events.EventOverviewBolusProgress; import info.nightscout.androidaps.plugins.Overview.events.EventOverviewBolusProgress;
import info.nightscout.androidaps.plugins.PumpCombo.events.EventComboPumpUpdateGUI; import info.nightscout.androidaps.plugins.PumpCombo.events.EventComboPumpUpdateGUI;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.RuffyScripter;
import info.nightscout.androidaps.plugins.PumpCombo.spi.BolusProgressReporter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.BolusProgressReporter;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
import info.nightscout.androidaps.plugins.PumpCombo.spi.PumpState; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.spi.RuffyCommands; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.RuffyCommands;
import info.nightscout.utils.DateUtil; import info.nightscout.utils.DateUtil;
import info.nightscout.utils.SP; import info.nightscout.utils.SP;

View file

@ -5,8 +5,8 @@ import android.support.annotation.Nullable;
import java.util.Date; import java.util.Date;
import info.nightscout.androidaps.plugins.PumpCombo.spi.PumpState; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
class ComboPump { class ComboPump {
@Nullable @Nullable

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter; package info.nightscout.androidaps.plugins.PumpCombo.ruffy;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Context; import android.content.Context;
@ -24,22 +24,22 @@ import java.util.Date;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands.BolusCommand; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands.BolusCommand;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands.CancelTbrCommand; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands.CancelTbrCommand;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands.Command; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands.Command;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands.CommandException; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands.CommandException;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands.GetPumpStateCommand; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands.GetPumpStateCommand;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands.ReadBasalProfileCommand; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands.ReadBasalProfileCommand;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands.ReadHistoryCommand; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands.ReadHistoryCommand;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands.ReadReserverLevelCommand; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands.ReadReserverLevelCommand;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands.SetBasalProfileCommand; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands.SetBasalProfileCommand;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands.SetTbrCommand; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands.SetTbrCommand;
import info.nightscout.androidaps.plugins.PumpCombo.spi.BasalProfile; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.BasalProfile;
import info.nightscout.androidaps.plugins.PumpCombo.spi.BolusProgressReporter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.BolusProgressReporter;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
import info.nightscout.androidaps.plugins.PumpCombo.spi.PumpHistory; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.PumpHistory;
import info.nightscout.androidaps.plugins.PumpCombo.spi.PumpState; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.spi.RuffyCommands; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.RuffyCommands;
// 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

View file

@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.RuffyScripter;
public abstract class BaseCommand implements Command { public abstract class BaseCommand implements Command {
// RS will inject itself here // RS will inject itself here

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands;
import android.os.SystemClock; import android.os.SystemClock;
@ -11,11 +11,11 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.RuffyScripter;
import info.nightscout.androidaps.plugins.PumpCombo.spi.BolusProgressReporter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.BolusProgressReporter;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
import static info.nightscout.androidaps.plugins.PumpCombo.spi.BolusProgressReporter.State.*; import static info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.BolusProgressReporter.State.*;
public class BolusCommand extends BaseCommand { public class BolusCommand extends BaseCommand {
private static final Logger log = LoggerFactory.getLogger(BolusCommand.class); private static final Logger log = LoggerFactory.getLogger(BolusCommand.class);

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.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,9 +7,9 @@ import org.slf4j.LoggerFactory;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.PumpCombo.spi.PumpState; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.PumpState;
import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
// 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?
// Hm, we could just ignore TBRs that run out within the next 60s (0:01 or even 0:02 // Hm, we could just ignore TBRs that run out within the next 60s (0:01 or even 0:02

View file

@ -1,9 +1,9 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.RuffyScripter;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
/** /**
* Interface for all commands to be executed by the pump. * Interface for all commands to be executed by the pump.

View file

@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
public class CommandException extends RuntimeException { public class CommandException extends RuntimeException {
public boolean success = false; public boolean success = false;

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands;
import android.util.Log; import android.util.Log;
@ -10,8 +10,8 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.RuffyScripter;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
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);

View file

@ -1,13 +1,13 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.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 info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
import static info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands.GetPumpStateCommand.Stepper.runStep; import static info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands.GetPumpStateCommand.Stepper.runStep;
public class GetPumpStateCommand extends BaseCommand { public class GetPumpStateCommand extends BaseCommand {
interface Step { interface Step {

View file

@ -1,9 +1,9 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.RuffyScripter;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
public class ReadBasalProfileCommand implements Command { public class ReadBasalProfileCommand implements Command {
@Override @Override

View file

@ -1,10 +1,10 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.PumpCombo.spi.PumpHistory; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.PumpHistory;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.RuffyScripter;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
public class ReadHistoryCommand implements Command { public class ReadHistoryCommand implements Command {
public ReadHistoryCommand(PumpHistory knownHistory) { public ReadHistoryCommand(PumpHistory knownHistory) {

View file

@ -1,9 +1,9 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.RuffyScripter;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
public class ReadReserverLevelCommand implements Command { public class ReadReserverLevelCommand implements Command {
@Override @Override

View file

@ -1,10 +1,10 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.PumpCombo.spi.BasalProfile; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.BasalProfile;
import info.nightscout.androidaps.plugins.PumpCombo.scripter.RuffyScripter; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.RuffyScripter;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
public class SetBasalProfileCommand implements Command { public class SetBasalProfileCommand implements Command {
public SetBasalProfileCommand(BasalProfile basalProfile) { public SetBasalProfileCommand(BasalProfile basalProfile) {

View file

@ -1,8 +1,8 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
public class SetBasalRateProfileCommand extends BaseCommand { public class SetBasalRateProfileCommand extends BaseCommand {
@Override @Override

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.PumpCombo.scripter.internal.commands; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.internal.scripter.commands;
import android.os.SystemClock; import android.os.SystemClock;
@ -12,7 +12,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import info.nightscout.androidaps.plugins.PumpCombo.spi.CommandResult; import info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi.CommandResult;
public class SetTbrCommand extends BaseCommand { public class SetTbrCommand extends BaseCommand {
private static final Logger log = LoggerFactory.getLogger(SetTbrCommand.class); private static final Logger log = LoggerFactory.getLogger(SetTbrCommand.class);

View file

@ -0,0 +1,4 @@
package info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi;
public class BasalProfile {
}

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.PumpCombo.spi; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi;
public interface BolusProgressReporter { public interface BolusProgressReporter {
enum State { enum State {

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.PumpCombo.spi; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi;
import java.util.Date; import java.util.Date;

View file

@ -0,0 +1,4 @@
package info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi;
public class PumpHistory {
}

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.PumpCombo.spi; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi;
import java.util.Date; import java.util.Date;

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.PumpCombo.spi; package info.nightscout.androidaps.plugins.PumpCombo.ruffy.spi;
import java.util.Date; import java.util.Date;

View file

@ -1,4 +0,0 @@
package info.nightscout.androidaps.plugins.PumpCombo.spi;
public class BasalProfile {
}

View file

@ -1,4 +0,0 @@
package info.nightscout.androidaps.plugins.PumpCombo.spi;
public class PumpHistory {
}