fix conflicts
This commit is contained in:
commit
b30d79c4cb
|
@ -119,6 +119,7 @@
|
|||
android:exported="false" />
|
||||
<service
|
||||
android:name=".plugins.PumpDanaR.services.DanaRExecutionService"
|
||||
|
||||
android:enabled="true"
|
||||
android:exported="false" />
|
||||
<service
|
||||
|
|
|
@ -61,6 +61,9 @@ public class ActionsFragment extends Fragment implements View.OnClickListener {
|
|||
tempBasal.setOnClickListener(this);
|
||||
fill.setOnClickListener(this);
|
||||
|
||||
view.findViewById(R.id.actions_50_30).setOnClickListener(this);
|
||||
view.findViewById(R.id.actions_400_15).setOnClickListener(this);
|
||||
|
||||
updateGUIIfVisible();
|
||||
return view;
|
||||
}
|
||||
|
@ -148,6 +151,10 @@ public class ActionsFragment extends Fragment implements View.OnClickListener {
|
|||
FillDialog fillDialog = new FillDialog();
|
||||
fillDialog.show(manager, "FillDialog");
|
||||
break;
|
||||
case R.id.actions_50_30:
|
||||
break;
|
||||
case R.id.actions_400_15:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -464,8 +464,7 @@ public class DanaRv2Plugin implements PluginBase, PumpInterface, ConstraintsInte
|
|||
}
|
||||
int durationInHours = Math.max(durationInMinutes / 60, 1);
|
||||
boolean connectionOK = false;
|
||||
if (percent < 100) connectionOK = sExecutionService.tempBasal(percent, durationInHours);
|
||||
else connectionOK =sExecutionService.highTempBasal(percent);
|
||||
connectionOK = sExecutionService.tempBasal(percent, durationInHours);
|
||||
if (connectionOK && getDanaRPump().isTempBasalInProgress && getDanaRPump().tempBasalPercent == percent) {
|
||||
result.enacted = true;
|
||||
result.success = true;
|
||||
|
@ -485,6 +484,28 @@ public class DanaRv2Plugin implements PluginBase, PumpInterface, ConstraintsInte
|
|||
return result;
|
||||
}
|
||||
|
||||
public PumpEnactResult setHighTempBasalPercent(Integer percent) {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
boolean connectionOK = sExecutionService.highTempBasal(percent);
|
||||
if (connectionOK && getDanaRPump().isTempBasalInProgress && getDanaRPump().tempBasalPercent == percent) {
|
||||
result.enacted = true;
|
||||
result.success = true;
|
||||
result.comment = MainApp.instance().getString(R.string.virtualpump_resultok);
|
||||
result.isTempCancel = false;
|
||||
result.duration = getDanaRPump().tempBasalRemainingMin;
|
||||
result.percent = getDanaRPump().tempBasalPercent;
|
||||
result.isPercent = true;
|
||||
if (Config.logPumpActions)
|
||||
log.debug("setHighTempBasalPercent: OK");
|
||||
return result;
|
||||
}
|
||||
result.enacted = false;
|
||||
result.success = false;
|
||||
result.comment = MainApp.instance().getString(R.string.danar_valuenotsetproperly);
|
||||
log.error("setHighTempBasalPercent: Failed to set temp basal");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setExtendedBolus(Double insulin, Integer durationInMinutes) {
|
||||
ConfigBuilderPlugin configBuilderPlugin = MainApp.getConfigBuilder();
|
||||
|
|
|
@ -78,6 +78,30 @@
|
|||
android:text="@string/primefill"
|
||||
android:textColor="@color/colorTreatmentButton" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/actions_400_15"
|
||||
style="?android:attr/buttonStyle"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="NEW Temp 400% 15min" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/actions_50_30"
|
||||
style="?android:attr/buttonStyle"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="NEW Temp 50% 30min" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
|
Loading…
Reference in a new issue