Merge pull request #708 from jotomo/watch-carb-only-request
Watch: don't bother pump with carbs if pump doesn't support it.
This commit is contained in:
commit
b18c16ce3b
|
@ -97,6 +97,8 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
|
|||
pumpDescription.basalMinimumRate = 0.01d;
|
||||
|
||||
pumpDescription.isRefillingCapable = false;
|
||||
|
||||
pumpDescription.storesCarbInfo = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package info.nightscout.androidaps.plugins.Wear;
|
||||
|
||||
import android.Manifest;
|
||||
import android.os.HandlerThread;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
|
@ -644,6 +645,7 @@ public class ActionStringHandler {
|
|||
detailedBolusInfo.insulin = amount;
|
||||
detailedBolusInfo.carbs = carbs;
|
||||
detailedBolusInfo.source = Source.USER;
|
||||
if (detailedBolusInfo.insulin > 0 || ConfigBuilderPlugin.getActivePump().getPumpDescription().storesCarbInfo) {
|
||||
ConfigBuilderPlugin.getCommandQueue().bolus(detailedBolusInfo, new Callback() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -654,6 +656,9 @@ public class ActionStringHandler {
|
|||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
MainApp.getConfigBuilder().addToHistoryTreatment(detailedBolusInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized static void sendError(String errormessage) {
|
||||
|
|
Loading…
Reference in a new issue