Provide fake current basal rate.
This commit is contained in:
parent
3b50a5ae70
commit
6842abd157
1 changed files with 4 additions and 13 deletions
|
@ -57,8 +57,6 @@ public class ComboPlugin implements PluginBase, PumpInterface {
|
||||||
OPERATION_NOT_SUPPORTED.comment = "Requested operation not supported by pump";
|
OPERATION_NOT_SUPPORTED.comment = "Requested operation not supported by pump";
|
||||||
}
|
}
|
||||||
|
|
||||||
private double fakeBasalRate = 0.5d;
|
|
||||||
|
|
||||||
public ComboPlugin() {
|
public ComboPlugin() {
|
||||||
definePumpCapabilities();
|
definePumpCapabilities();
|
||||||
bindRuffyService();
|
bindRuffyService();
|
||||||
|
@ -121,7 +119,7 @@ public class ComboPlugin implements PluginBase, PumpInterface {
|
||||||
|
|
||||||
pumpDescription.isSetBasalProfileCapable = false; // TODO
|
pumpDescription.isSetBasalProfileCapable = false; // TODO
|
||||||
pumpDescription.basalStep = 0.01d;
|
pumpDescription.basalStep = 0.01d;
|
||||||
pumpDescription.basalMinimumRate = 0.01d;
|
pumpDescription.basalMinimumRate = 0.0d;
|
||||||
|
|
||||||
pumpDescription.isRefillingCapable = false;
|
pumpDescription.isRefillingCapable = false;
|
||||||
}
|
}
|
||||||
|
@ -235,8 +233,9 @@ public class ComboPlugin implements PluginBase, PumpInterface {
|
||||||
// TODO
|
// TODO
|
||||||
@Override
|
@Override
|
||||||
public double getBaseBasalRate() {
|
public double getBaseBasalRate() {
|
||||||
// TODO this is simple to read, w/o causing vibirations, it's BASAL_RATE in the main menu
|
// TODO this is simple to read, w/o causing vibrations, it's BASAL_RATE in the main menu
|
||||||
return fakeBasalRate;
|
// and/or read this from a cached basal rate profile
|
||||||
|
return 0.5d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -282,10 +281,6 @@ public class ComboPlugin implements PluginBase, PumpInterface {
|
||||||
pumpEnactResult.comment = commandResult.message;
|
pumpEnactResult.comment = commandResult.message;
|
||||||
pumpEnactResult.isPercent = true;
|
pumpEnactResult.isPercent = true;
|
||||||
pumpEnactResult.percent = percent;
|
pumpEnactResult.percent = percent;
|
||||||
|
|
||||||
//TODO
|
|
||||||
fakeBasalRate = fakeBasalRate * percent / 100;
|
|
||||||
|
|
||||||
return pumpEnactResult;
|
return pumpEnactResult;
|
||||||
} finally {
|
} finally {
|
||||||
ruffyScripter.disconnect();
|
ruffyScripter.disconnect();
|
||||||
|
@ -310,10 +305,6 @@ public class ComboPlugin implements PluginBase, PumpInterface {
|
||||||
pumpEnactResult.enacted = commandResult.enacted;
|
pumpEnactResult.enacted = commandResult.enacted;
|
||||||
pumpEnactResult.comment = commandResult.message;
|
pumpEnactResult.comment = commandResult.message;
|
||||||
pumpEnactResult.isTempCancel = true;
|
pumpEnactResult.isTempCancel = true;
|
||||||
|
|
||||||
//TODO
|
|
||||||
fakeBasalRate = 0.5d;
|
|
||||||
|
|
||||||
return pumpEnactResult;
|
return pumpEnactResult;
|
||||||
} finally {
|
} finally {
|
||||||
ruffyScripter.disconnect();
|
ruffyScripter.disconnect();
|
||||||
|
|
Loading…
Reference in a new issue