Move ruffyscripter to combo plugin package.

This commit is contained in:
Johannes Mockenhaupt 2018-01-28 22:16:58 +01:00
parent 6c4c662c31
commit 3fde47d283
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
33 changed files with 96 additions and 96 deletions

View file

@ -10,7 +10,7 @@ import android.widget.TextView;
import java.text.DateFormat;
import java.util.List;
import de.jotomo.ruffyscripter.history.PumpAlert;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.PumpAlert;
import info.nightscout.androidaps.R;
public class ComboAlertHistoryDialog extends DialogFragment {

View file

@ -14,8 +14,8 @@ import android.widget.TextView;
import com.squareup.otto.Subscribe;
import de.jotomo.ruffyscripter.PumpState;
import de.jotomo.ruffyscripter.history.Bolus;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Bolus;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.plugins.Common.SubscriberFragment;

View file

@ -11,18 +11,18 @@ import org.slf4j.LoggerFactory;
import java.util.Calendar;
import java.util.Date;
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.plugins.PumpCombo.ruffyscripter.BasalProfile;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.BolusProgressReporter;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.CommandResult;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpWarningCodes;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.RuffyCommands;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.RuffyScripter;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.WarningOrErrorCode;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Bolus;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.PumpHistory;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.PumpHistoryRequest;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Tbr;
import info.nightscout.androidaps.BuildConfig;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;

View file

@ -6,11 +6,11 @@ import android.support.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;
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;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.BasalProfile;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Bolus;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.PumpAlert;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Tdd;
class ComboPump {
boolean initialized = false;

View file

@ -11,7 +11,7 @@ import java.text.DateFormat;
import java.util.List;
import java.util.Locale;
import de.jotomo.ruffyscripter.history.Tdd;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Tdd;
import info.nightscout.androidaps.R;
public class ComboTddHistoryDialog extends DialogFragment {

View file

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

View file

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

View file

@ -1,12 +1,12 @@
package de.jotomo.ruffyscripter;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter;
import android.support.annotation.Nullable;
import java.util.LinkedList;
import java.util.List;
import de.jotomo.ruffyscripter.history.Bolus;
import de.jotomo.ruffyscripter.history.PumpHistory;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Bolus;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.PumpHistory;
public class CommandResult {
/** Whether the command was executed successfully. */

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter;
public class PumpErrorCodes {
public static final int CARTRIDGE_EMPTY = 1;

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter;
/** State displayed on the main screen of the pump. */
public class PumpState {

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter;
public class PumpWarningCodes {
public static final int CARTRIDGE_LOW = 1;

View file

@ -1,6 +1,6 @@
package de.jotomo.ruffyscripter;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter;
import de.jotomo.ruffyscripter.history.PumpHistoryRequest;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.PumpHistoryRequest;
public interface RuffyCommands {
/** Issues a bolus issues updates on progress through via {@link BolusProgressReporter}. */

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter;
import android.content.ComponentName;
import android.content.Context;
@ -28,18 +28,18 @@ import java.util.Date;
import java.util.List;
import java.util.Objects;
import de.jotomo.ruffyscripter.history.PumpHistoryRequest;
import de.jotomo.ruffyscripter.commands.BolusCommand;
import de.jotomo.ruffyscripter.commands.CancelTbrCommand;
import de.jotomo.ruffyscripter.commands.Command;
import de.jotomo.ruffyscripter.commands.CommandException;
import de.jotomo.ruffyscripter.commands.ConfirmAlertCommand;
import de.jotomo.ruffyscripter.commands.ReadBasalProfileCommand;
import de.jotomo.ruffyscripter.commands.ReadHistoryCommand;
import de.jotomo.ruffyscripter.commands.ReadPumpStateCommand;
import de.jotomo.ruffyscripter.commands.ReadReservoirLevelAndLastBolus;
import de.jotomo.ruffyscripter.commands.SetBasalProfileCommand;
import de.jotomo.ruffyscripter.commands.SetTbrCommand;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.PumpHistoryRequest;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands.BolusCommand;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands.CancelTbrCommand;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands.Command;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands.CommandException;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands.ConfirmAlertCommand;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands.ReadBasalProfileCommand;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands.ReadHistoryCommand;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands.ReadPumpStateCommand;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands.ReadReservoirLevelAndLastBolus;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands.SetBasalProfileCommand;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands.SetTbrCommand;
import info.nightscout.androidaps.BuildConfig;
/**
@ -74,7 +74,7 @@ public class RuffyScripter implements RuffyCommands {
@Override
public void fail(String message) throws RemoteException {
// TODO 10-28 19:50:54.059 1426 1826 W RuffyScripter: [Thread-268] WARN [de.jotomo.ruffyscripter.RuffyScripter$1:78]: Ruffy warns: no connection possible
// TODO 10-28 19:50:54.059 1426 1826 W RuffyScripter: [Thread-268] WARN [info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.RuffyScripter$1:78]: Ruffy warns: no connection possible
log.warn("Ruffy warns: " + message);
}

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter;
import android.support.annotation.Nullable;

View file

@ -1,11 +1,11 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands;
import java.util.Collections;
import java.util.List;
import de.jotomo.ruffyscripter.CommandResult;
import de.jotomo.ruffyscripter.PumpWarningCodes;
import de.jotomo.ruffyscripter.RuffyScripter;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.CommandResult;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpWarningCodes;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.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.ruffyscripter.commands;
import android.os.SystemClock;
@ -11,17 +11,17 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
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 info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.BolusProgressReporter;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpWarningCodes;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.WarningOrErrorCode;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Bolus;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.RuffyScripter;
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;
import static info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.BolusProgressReporter.State.DELIVERED;
import static info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.BolusProgressReporter.State.DELIVERING;
import static info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.BolusProgressReporter.State.PROGRAMMING;
import static info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.BolusProgressReporter.State.STOPPED;
import static info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.BolusProgressReporter.State.STOPPING;
public class BolusCommand extends BaseCommand {
private static final Logger log = LoggerFactory.getLogger(BolusCommand.class);

View file

@ -1,11 +1,11 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands;
import org.monkey.d.ruffy.ruffy.driver.display.MenuType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import de.jotomo.ruffyscripter.PumpState;
import de.jotomo.ruffyscripter.PumpWarningCodes;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpWarningCodes;
public class CancelTbrCommand extends BaseCommand {
private static final Logger log = LoggerFactory.getLogger(CancelTbrCommand.class);

View file

@ -1,9 +1,9 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands;
import java.util.List;
import de.jotomo.ruffyscripter.RuffyScripter;
import de.jotomo.ruffyscripter.CommandResult;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.RuffyScripter;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.CommandResult;
/**
* 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.ruffyscripter.commands;
public class CommandException extends RuntimeException {
public CommandException(String message) {

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands;
public class ConfirmAlertCommand extends BaseCommand {
private final int warningCode;

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands;
import org.monkey.d.ruffy.ruffy.driver.display.Menu;
import org.monkey.d.ruffy.ruffy.driver.display.MenuAttribute;
@ -9,8 +9,8 @@ import org.slf4j.LoggerFactory;
import java.util.Arrays;
import de.jotomo.ruffyscripter.BasalProfile;
import de.jotomo.ruffyscripter.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.BasalProfile;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpState;
public class ReadBasalProfileCommand extends BaseCommand {
private static final Logger log = LoggerFactory.getLogger(ReadBasalProfileCommand.class);

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands;
import android.support.annotation.NonNull;
@ -13,12 +13,12 @@ import org.slf4j.LoggerFactory;
import java.util.Calendar;
import java.util.Date;
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;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Bolus;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.PumpAlert;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.PumpHistory;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.PumpHistoryRequest;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Tbr;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Tdd;
// Note: TBRs are added to history only after they've completed running
// TODO remove duplication

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands;
public class ReadPumpStateCommand extends BaseCommand {
@Override

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands;
import android.support.annotation.NonNull;
@ -10,7 +10,7 @@ import org.monkey.d.ruffy.ruffy.driver.display.menu.MenuTime;
import java.util.Date;
import de.jotomo.ruffyscripter.history.Bolus;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Bolus;
public class ReadReservoirLevelAndLastBolus extends BaseCommand {
@Override

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands;
import android.os.SystemClock;
@ -12,8 +12,8 @@ import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
import de.jotomo.ruffyscripter.BasalProfile;
import de.jotomo.ruffyscripter.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.BasalProfile;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpState;
public class SetBasalProfileCommand extends BaseCommand {
private static final Logger log = LoggerFactory.getLogger(SetBasalProfileCommand.class);

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.commands;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.commands;
import android.os.SystemClock;
@ -12,9 +12,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import de.jotomo.ruffyscripter.PumpState;
import de.jotomo.ruffyscripter.PumpWarningCodes;
import de.jotomo.ruffyscripter.WarningOrErrorCode;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpWarningCodes;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.WarningOrErrorCode;
public class SetTbrCommand extends BaseCommand {
private static final Logger log = LoggerFactory.getLogger(SetTbrCommand.class);

View file

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

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.history;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history;
public abstract class HistoryRecord {
public final long timestamp;

View file

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

View file

@ -1,4 +1,4 @@
package de.jotomo.ruffyscripter.history;
package info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history;
import android.support.annotation.NonNull;

View file

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

View file

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

View file

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