# HG changeset patch # User Michiel Broek # Date 1556221955 -7200 # Node ID 3ac81572bb28052ffdfaacf8803ee5e003da262b # Parent 9c4bc199be9eba52bc0bc0947be5a258fa5a6ee6 Fixed hop aroma calculation for dryhop additions diff -r 9c4bc199be9e -r 3ac81572bb28 www/js/prod_edit.js --- a/www/js/prod_edit.js Tue Apr 23 19:53:26 2019 +0200 +++ b/www/js/prod_edit.js Thu Apr 25 21:52:35 2019 +0200 @@ -372,7 +372,9 @@ function hopAromaContribution(bt, vol, use, amount) { var result = 0; - if (bt > 20) { + if (use == 5) { // Dry hop + result = 1.33; + } else if (bt > 20) { result = 0; } else if (bt > 7.5) { result = 10.03 / (4 * Math.sqrt(2 * Math.PI)) * Math.exp(-0.5 * Math.pow((bt - 7.5) /4, 2)); @@ -382,8 +384,6 @@ result = 1.2; } else if (use == 4) { // Whirlpool result = 1.2; - } else if (use == 5) { // Dry hop - result = 1.33; } return (result * amount * 1000) / vol; }