main/recipes.c

changeset 116
bafc2d6a0790
parent 114
1413c4c5cd8c
child 121
30aca5888d2b
--- a/main/recipes.c	Thu Jul 29 22:38:30 2021 +0200
+++ b/main/recipes.c	Fri Jul 30 16:45:53 2021 +0200
@@ -311,7 +311,7 @@
 	 */
 	if (_xml_add_type == MASHTYPE_TEMPERATURE && recipe.Mashsteps == 0) {
 	    _xml_add_type = MASHTYPE_INFUSION;
-	    _xml_add_infusion = _xml_add_temp + 1.25;
+//	    _xml_add_infusion = _xml_add_temp + 1.25;
 	    recipe.MashStep[recipe.Mashsteps].Ramp_time = 1;
 	}
 	recipe.MashStep[recipe.Mashsteps].Type = _xml_add_type;
@@ -319,7 +319,11 @@
 	    recipe.MashStep[recipe.Mashsteps].Ramp_time = (uint16_t)(_xml_add_temp - recipe.MashStep[recipe.Mashsteps - 1].End_temp) + 1;
 	}
 	if (_xml_add_type == MASHTYPE_INFUSION) {
-	    recipe.MashStep[recipe.Mashsteps].Infuse_temp = _xml_add_infusion;
+	    if (recipe.Mashsteps == 0 && _xml_add_infusion < _xml_add_temp) {
+		recipe.MashStep[recipe.Mashsteps].Infuse_temp = _xml_add_temp + 1.25;
+	    } else {
+	    	recipe.MashStep[recipe.Mashsteps].Infuse_temp = _xml_add_infusion;
+	    }
 	    recipe.MashStep[recipe.Mashsteps].Infuse_amount = _xml_add_amount;
 	} else if (_xml_add_type == MASHTYPE_DECOCTION) {
 	    recipe.MashStep[recipe.Mashsteps].Infuse_temp = 98.0;

mercurial