diff -r d43b393a4461 -r f3451031d6c6 main/recipes.c --- a/main/recipes.c Thu Oct 25 20:22:18 2018 +0200 +++ b/main/recipes.c Thu Oct 25 21:10:29 2018 +0200 @@ -47,7 +47,7 @@ */ void Addition_Add(char *Name, uint8_t Type, uint16_t Time) { - printf("Addition_Add(%s, %d, %d)\n", Name, Type, Time); +// printf("Addition_Add(%s, %d, %d)\n", Name, Type, Time); if (! recipe.Additions) { // No entries yet, add the first one. sprintf(recipe.Addition[recipe.Additions].Name, "%s", Name); @@ -69,8 +69,8 @@ // A new entry and we already have some. Add it and keep the list sorted. for (int i = 0; i < recipe.Additions; i++) { if (Time > recipe.Addition[i].Time) { - printf("Insert at %d\n", i); - // Nake room +// printf("Insert at %d\n", i); + // Make room for (int j = i; j < recipe.Additions; j++) { sprintf(recipe.Addition[j+1].Name, "%s", recipe.Addition[j].Name); recipe.Addition[j+1].Type = recipe.Addition[j].Type; @@ -361,8 +361,10 @@ * Because we inserted the first infusion step and the next (original first) * step is infusion, change that one into temperature. */ - if (recipe.MashStep[1].Type == MASHTYPE_INFUSION) + if (recipe.MashStep[1].Type == MASHTYPE_INFUSION) { recipe.MashStep[1].Type = MASHTYPE_TEMPERATURE; + recipe.MashStep[1].Infusion_temp = recipe.MashStep[1].Infusion_amount = 0.0; + } if (! recipe.MashStep[7].Resttime) { // Move last mash step to position 7. @@ -388,7 +390,7 @@ } } -#if 1 +#if 0 printf("Recipe: %s\n", recipe.Name); printf("Code : %s\n", recipe.Code); printf("Boil time %d minutes\n", recipe.BoilTime);