# HG changeset patch # User Michiel Broek # Date 1583315301 -3600 # Node ID 39902353b159b9d83f1e96f265d08322859b8ce8 # Parent 06322bcfecdfd54cf7701a5dbfd9dd8940204327 Workaround for hang during startup. Changed order of displayed fields on the yeast tab. Tooltip text changes. More decimals on the checklist for misc ingredients. More decimals for the starter on product print. diff -r 06322bcfecdf -r 39902353b159 www/js/global.js --- a/www/js/global.js Tue Mar 03 20:38:37 2020 +0100 +++ b/www/js/global.js Wed Mar 04 10:48:21 2020 +0100 @@ -418,6 +418,7 @@ Show3wat = { inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 3, readOnly: true }, Smal0dec = { inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }, Smal1dec = { inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }, +Smal2dec = { inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 2, readOnly: true }, Show0dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 0 }, Show1dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 1 }, Show2dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 2 }, diff -r 06322bcfecdf -r 39902353b159 www/js/prod_edit.js --- a/www/js/prod_edit.js Tue Mar 03 20:38:37 2020 +0100 +++ b/www/js/prod_edit.js Wed Mar 04 10:48:21 2020 +0100 @@ -2795,33 +2795,36 @@ var rows, i, C1, ebc, x, Result = ZRA(pHZ) * parseFloat($('#wg_amount').jqxNumberInput('decimal')); // proton deficit for the grist - rows = $('#fermentableGrid').jqxGrid('getrows'); - for (i = 0; i < rows.length; i++) { - row = rows[i]; - if (row.f_added == 0 && row.f_graintype != 6) { // Added == Mash && graintype != No Malt - // Check if acid is required - C1 = 0; - if ((row.f_di_ph != 5.7) && ((row.f_acid_to_ph_57 < - 0.1) || (row.f_acid_to_ph_57 > 0.1))) { - C1 = row.f_acid_to_ph_57 / (row.f_di_ph - 5.7); - } else { - // If the acid_to_ph_5.7 is unknown from the maltster, guess the required acid. - ebc = row.f_color; - switch (row.f_graintype) { - case 0: // Base, Special, Kilned - case 3: - case 5: C1 = 0.014 * ebc - 34.192; - break; - case 2: C1 = -0.0597 * ebc - 32.457; // Crystal - break; - case 1: C1 = 0.0107 * ebc - 54.768; // Roast - break; - case 4: C1 = -149; // Sour malt - break; + if ((rows = $('#fermentableGrid').jqxGrid('getrows'))) { + for (i = 0; i < rows.length; i++) { + row = rows[i]; + if (row.f_added == 0 && row.f_graintype != 6) { // Added == Mash && graintype != No Malt + // Check if acid is required + C1 = 0; + if ((row.f_di_ph != 5.7) && ((row.f_acid_to_ph_57 < - 0.1) || (row.f_acid_to_ph_57 > 0.1))) { + C1 = row.f_acid_to_ph_57 / (row.f_di_ph - 5.7); + } else { + // If the acid_to_ph_5.7 is unknown from the maltster, guess the required acid. + ebc = row.f_color; + switch (row.f_graintype) { + case 0: // Base, Special, Kilned + case 3: + case 5: C1 = 0.014 * ebc - 34.192; + break; + case 2: C1 = -0.0597 * ebc - 32.457; // Crystal + break; + case 1: C1 = 0.0107 * ebc - 54.768; // Roast + break; + case 4: C1 = -149; // Sour malt + break; + } } + x = C1 * (pHZ - row.f_di_ph); // AcidRequired(ZpH) + Result += x * row.f_amount; } - x = C1 * (pHZ - row.f_di_ph); // AcidRequired(ZpH) - Result += x * row.f_amount; } + } else { + console.log('ProtonDeficit(' + pHZ + ') invalid grist'); } return Result; } @@ -5268,13 +5271,13 @@ // Tab 6, Yeasts $('#est_fg2').jqxTooltip({ content: 'Het verwachte eind SG. Dit wordt automatisch berekend.' }); $('#est_fg2').jqxNumberInput(Show3dec); - $('#est_abv2').jqxTooltip({ content: 'Alcohol volume %. Dit wordt automatisch berekend.' }); - $('#est_abv2').jqxNumberInput(Smal1dec); - $('#yeast_cells').jqxTooltip({ content: 'Het aantal beschikbare gistcellen zonder eventuele starter.' }); + $('#est_abv2').jqxTooltip({ content: 'Verwacht alcohol volume %. Dit wordt automatisch berekend.' }); + $('#est_abv2').jqxNumberInput(Show2dec); + $('#yeast_cells').jqxTooltip({ content: 'Het aantal miljard beschikbare gistcellen zonder eventuele starter.' }); $('#yeast_cells').jqxNumberInput(Show1dec); - $('#need_cells').jqxTooltip({ content: 'Het aantal nodige cellen is afhankelijk van het biertype.' }); + $('#need_cells').jqxTooltip({ content: 'Het aantal miljard nodige cellen is afhankelijk van het begin SG, biertype en volume.' }); $('#need_cells').jqxNumberInput(Show1dec); - $('#plato_cells').jqxTooltip({ content: 'De berekende hoeveelheid gistcellen in miljard per ml per graad Plato. Dit is de zogenaamde pitchrate.' }); + $('#plato_cells').jqxTooltip({ content: 'De berekende pitchrate in miljard cellen per ml per graad Plato.' }); $('#plato_cells').jqxNumberInput(Show2dec); $('#yeast_prod_date').jqxTooltip({ content: 'Bij korrelgisten is meestal "best voor" datum op het zakje gedrukt.
Gebruik die datum maar dan twee jaar eerder als productie datum.
Bij White Labs is de productie datum vier maanden voor de "Best by" datum die geprint op het buisje.
Bij Wyeast is dit de "manufacture date" die op het pak geprint is.
Voor schuine buis, slurry, opkweek en gedroogd is dit de datum dat je de gist geoogst hebt.' }); $('#yeast_prod_date').jqxDateTimeInput(Dateopts); @@ -5453,7 +5456,7 @@ $('#starter_sg').jqxTooltip({ content: 'Het ideale starter SG moet tussen de 1.030 en 1.040 zijn. Optimaal is 1.037.' }); $('#starter_sg').jqxNumberInput(SGopts); $('#starter_viability').jqxTooltip({ content: 'De gist conditie.' }); - $('#starter_viability').jqxNumberInput(Smal0dec); + $('#starter_viability').jqxNumberInput(Show0dec); $('#starter_try').jqxButton({ template: 'primary', width: '100px', height: 23, theme: theme }); diff -r 06322bcfecdf -r 39902353b159 www/prod_checklist.php --- a/www/prod_checklist.php Tue Mar 03 20:38:37 2020 +0100 +++ b/www/prod_checklist.php Wed Mar 04 10:48:21 2020 +0100 @@ -261,7 +261,7 @@ } foreach($hops as $item2) { if (($item2['h_useat'] == 2 || $item2['h_useat'] == 3) && ($item2['h_time'] == $i)) { - $s = sprintf("%.1f",$item2['h_amount']*1000*$factor).' gr `'; + $s = sprintf("%.2f",$item2['h_amount']*1000*$factor).' gr `'; $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` bij '; if ($i > 0) $s .= $i.' minuten voor einde koken'; @@ -273,7 +273,7 @@ foreach($miscs as $item3) { if ($item3['m_use_use'] == 2 && $item3['m_time'] == $i) { $unit = ($item3['m_amount_is_weight']) ? " gr ":" ml "; - $s = sprintf("%.1f",$item3['m_amount']*1000*$factor).$unit.'`'; + $s = sprintf("%.2f",$item3['m_amount']*1000*$factor).$unit.'`'; $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` bij '; if ($i > 0) $s .= $i.' minuten voor einde koken'; diff -r 06322bcfecdf -r 39902353b159 www/prod_edit.php --- a/www/prod_edit.php Tue Mar 03 20:38:37 2020 +0100 +++ b/www/prod_edit.php Wed Mar 04 10:48:21 2020 +0100 @@ -260,12 +260,12 @@ - - +
Verwacht eind SG:
+
- - + + @@ -273,7 +273,7 @@ - + @@ -282,7 +282,7 @@ - + @@ -302,48 +302,48 @@ - +
- + -
Giststarter stappen
Giststarter stappen
Stap Methode VolumeNieuwe cellen Totaal cellen Groei factor
1
Niet nodig
2
Niet nodig
44
Niet nodig
+
Verwacht ABV %: -
- - - Aantal cellen miljard: -
+
Gist productie datum:
+ Gist conditie %: +
+ + + Gistcellen miljard: +
+ + Cellen nodig miljard:
- Cellen/ml °P: + Pitch cellen/ml °P:
- - - Gist conditie %: -
Starter type:
Starter SG:
- +  
diff -r 06322bcfecdf -r 39902353b159 www/prod_print.php --- a/www/prod_print.php Tue Mar 03 20:38:37 2020 +0100 +++ b/www/prod_print.php Wed Mar 04 10:48:21 2020 +0100 @@ -369,7 +369,7 @@ $this->Cell($vul,5,$st." staps giststarter",0,0,'L',true); $this->Cell(40,5,'',0,0,'R',true); $this->Cell(30,5,"Vooraf",0,0,'L',true); - $this->Cell(20,5,sprintf("%.2f",$sv)." L",0,0,'R',true); + $this->Cell(20,5,sprintf("%.3f",$sv)." L",0,0,'R',true); $this->Cell(20,5,'',0,0,'R',true); $this->Ln(); }