Merge pull request #573 from MilosKozak/combo-bolus-fix
combo-bolus-fix
This commit is contained in:
commit
cc1cd675c7
1 changed files with 1 additions and 1 deletions
|
@ -533,7 +533,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
||||||
if (options.eventType == R.id.careportal_combobolus) {
|
if (options.eventType == R.id.careportal_combobolus) {
|
||||||
Double enteredInsulin = SafeParse.stringToDouble(editInsulin.getText());
|
Double enteredInsulin = SafeParse.stringToDouble(editInsulin.getText());
|
||||||
data.put("enteredinsulin", enteredInsulin);
|
data.put("enteredinsulin", enteredInsulin);
|
||||||
data.put("insulin", enteredInsulin * SafeParse.stringToDouble(editInsulin.getText()) / 100);
|
data.put("insulin", enteredInsulin * SafeParse.stringToDouble(editSplit.getText()) / 100);
|
||||||
data.put("relative", enteredInsulin * (100 - SafeParse.stringToDouble(editSplit.getText())) / 100 / SafeParse.stringToDouble(editDuration.getText()) * 60);
|
data.put("relative", enteredInsulin * (100 - SafeParse.stringToDouble(editSplit.getText())) / 100 / SafeParse.stringToDouble(editDuration.getText()) * 60);
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
|
|
Loading…
Reference in a new issue