disable bolus when pump is suspended
This commit is contained in:
parent
f5f7d28cc1
commit
b3d18b2537
|
@ -804,8 +804,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
pumpStatusLayout.setVisibility(View.VISIBLE);
|
pumpStatusLayout.setVisibility(View.VISIBLE);
|
||||||
loopStatusLayout.setVisibility(View.GONE);
|
loopStatusLayout.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
wizardButton.setVisibility(View.VISIBLE);
|
|
||||||
treatmentButton.setVisibility(View.VISIBLE);
|
|
||||||
pumpStatusLayout.setVisibility(View.GONE);
|
pumpStatusLayout.setVisibility(View.GONE);
|
||||||
loopStatusLayout.setVisibility(View.VISIBLE);
|
loopStatusLayout.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
@ -1002,6 +1000,15 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
} else
|
} else
|
||||||
quickWizardButton.setVisibility(View.GONE);
|
quickWizardButton.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
// Bolus and calc button
|
||||||
|
if (pump.isInitialized() && !pump.isSuspended()) {
|
||||||
|
wizardButton.setVisibility(View.VISIBLE);
|
||||||
|
treatmentButton.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
wizardButton.setVisibility(View.GONE);
|
||||||
|
treatmentButton.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
String units = profile.getUnits();
|
String units = profile.getUnits();
|
||||||
|
|
||||||
Double lowLine = SP.getDouble("low_mark", 0d);
|
Double lowLine = SP.getDouble("low_mark", 0d);
|
||||||
|
|
|
@ -425,6 +425,9 @@ public class SmsCommunicatorPlugin implements PluginBase {
|
||||||
if (new Date().getTime() - lastRemoteBolusTime.getTime() < Constants.remoteBolusMinDistance) {
|
if (new Date().getTime() - lastRemoteBolusTime.getTime() < Constants.remoteBolusMinDistance) {
|
||||||
reply = MainApp.sResources.getString(R.string.smscommunicator_remotebolusnotallowed);
|
reply = MainApp.sResources.getString(R.string.smscommunicator_remotebolusnotallowed);
|
||||||
sendSMS(new Sms(receivedSms.phoneNumber, reply, new Date()));
|
sendSMS(new Sms(receivedSms.phoneNumber, reply, new Date()));
|
||||||
|
} else if (MainApp.getConfigBuilder().isSuspended()) {
|
||||||
|
reply = MainApp.sResources.getString(R.string.pumpsuspended);
|
||||||
|
sendSMS(new Sms(receivedSms.phoneNumber, reply, new Date()));
|
||||||
} else if (splited.length > 1) {
|
} else if (splited.length > 1) {
|
||||||
amount = SafeParse.stringToDouble(splited[1]);
|
amount = SafeParse.stringToDouble(splited[1]);
|
||||||
amount = MainApp.getConfigBuilder().applyBolusConstraints(amount);
|
amount = MainApp.getConfigBuilder().applyBolusConstraints(amount);
|
||||||
|
|
|
@ -197,7 +197,6 @@
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="2dip"
|
android:layout_height="2dip"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_paddingBottom="5dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
android:layout_marginBottom="5dp"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
|
|
Loading…
Reference in a new issue