diff -r 08c92cb740b9 -r 5b6bb99bc52a www/js/global.js --- a/www/js/global.js Sat Nov 17 19:44:39 2018 +0100 +++ b/www/js/global.js Sat Nov 17 20:40:23 2018 +0100 @@ -126,7 +126,8 @@ /* * Berekeningen uit https://www.hobbybrouwen.nl/forum/index.php/topic,6079.msg69464.html#msg69464 */ -function toIBU(Use, Form, SG, Volume, Amount, Boiltime, Alpha, Method) { +function toIBU(Use, Form, SG, Volume, Amount, Boiltime, Alpha, Method) +{ var gravity = parseFloat(SG); var liters = parseFloat(Volume); var alpha = parseFloat(Alpha)/100; @@ -139,16 +140,16 @@ if ((Use == "Dry Hop") || (Use == "Dry hop") || (Use == "Whirlpool") || (Use == "Aroma")) { fmoment = 0.0; } else if (Use == "Mash") { - fmoment += /* Settings.MashHopFactor.Value = -30% */ -30 / 100; // Brouwhulp + fmoment += my_factor_mashhop / 100; // Brouwhulp } else if ((Use == "First Wort") || (Use == "First wort")) { - fmoment += /* Settings.FWHFactor.Value = 10% */ 10 / 100; // Brouwhulp, Louis, Ozzie + fmoment += my_factor_fwh / 100; // Brouwhulp, Louis, Ozzie } if (Form == "Pellet") { - pfactor += /* Settings.PelletFactor.Value = 10% */ 10 / 100; + pfactor += my_factor_pellet / 100; } if (Form == "Plug" ) { - pfactor += /* Settings.PlugFactor.Value = 2% */ 2 / 100; + pfactor += my_factor_plug / 100; } if (Method == "Tinseth") { @@ -183,7 +184,7 @@ ibu = Math.round((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor)) * 10) / 10; } - console.log("toIBU("+Use+"," + Form + "," + SG + "," + Volume + "," + Amount + "," + Boiltime + "," + Alpha + "," + Method + ") :" + ibu); + console.log("toIBU("+Use+","+Form+","+SG+","+Volume+","+Amount+","+Boiltime+","+Alpha+","+Method+"):"+ibu+" fm:"+fmoment+" pf:"+pfactor); return ibu; }