Code cleanup

Sat, 17 Nov 2018 23:29:11 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 17 Nov 2018 23:29:11 +0100
changeset 103
895829b91057
parent 102
679ddf512b65
child 104
0c6ad9e0f143

Code cleanup

www/includes/formulas.php file | annotate | diff | comparison | revisions
www/js/profile_setup.js file | annotate | diff | comparison | revisions
--- a/www/includes/formulas.php	Sat Nov 17 21:59:06 2018 +0100
+++ b/www/includes/formulas.php	Sat Nov 17 23:29:11 2018 +0100
@@ -627,8 +627,6 @@
 end;
 
 
-  CalcBitterness;
-
         // Get concentration of ions in diluted brewwater (1) and target water (2) in mmol/l
         Ca1 := W.Calcium.Value / MMCa;
         Ca2 := W2.Calcium.Value / MMCa;
@@ -678,31 +676,6 @@
 
 
 
-function TRecipe.CalcColorWort : double;
-var
-  i: integer;
-  F: TFermentable;
-  c, v: double;
-begin
-  c := 0;
-  v := FBatchSize.Value;
-  if (v > 0) and (High(FFermentables) >= 0) then
-  begin
-    for i := Low(FFermentables) to High(FFermentables) do
-    begin
-      F := TFermentable(FFermentables[i]);
-      c := c + F.Amount.Value * F.Color.Value / v;
-    end;
-    c := c * 8.34436;
-    case FColorMethod of
-      cmMorey: c := 1.49 * Power(c, 0.69);
-      cmMosher: c := 0.3 * c + 4.7;
-      cmDaniels: c := 0.2 * c + 8.4;
-    end;
-  end;
-  Result:= c;
-end;
-
 
 procedure TRecipe.CalcWaterBalance;
 var
--- a/www/js/profile_setup.js	Sat Nov 17 21:59:06 2018 +0100
+++ b/www/js/profile_setup.js	Sat Nov 17 23:29:11 2018 +0100
@@ -95,10 +95,10 @@
 	$("#brewery_name").jqxInput({ theme: theme, width: 640, height: 23 });
 	$("#factor_fwh").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: -50, max: 50, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
 	$("#factor_mashhop").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: -50, max: 50, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
-	$("#factor_pellet").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: -50, max: 50, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
-	$("#factor_plug").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: -50, max: 50, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
-	$("#brix_correction").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 1.00, max: 1.08, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.01 });
-	$("#grain_absorbtion").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 1.00, max: 1.25, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.01 });
+	$("#factor_pellet").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 20, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
+	$("#factor_plug").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0, max: 20, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right'  });
+	$("#brix_correction").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 1.00, max: 1.05, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.01 });
+	$("#grain_absorbtion").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 100, height: 23, min: 0.5, max: 1.1, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.01 });
 	$("#color_method").jqxDropDownList({ theme: theme, source: srcColor, width: 125, height: 23, dropDownHeight: 95 });
 	$("#ibu_method").jqxDropDownList({ theme: theme, source: srcIBU, width: 125, height: 23, dropDownHeight: 95 });
 	$('#default_water').jqxDropDownList({

mercurial