# HG changeset patch # User Michiel Broek # Date 1651054536 -7200 # Node ID 4bc92122d001c80e294ecbd77ef609ec4e30df5d # Parent 5093db5665c60efba2815ad4ca20a33246069911 Added kw_to_newebc function to debug EBC differences. diff -r 5093db5665c6 -r 4bc92122d001 src/EditRecipeTab2.cpp --- a/src/EditRecipeTab2.cpp Wed Apr 27 11:26:10 2022 +0200 +++ b/src/EditRecipeTab2.cpp Wed Apr 27 12:15:36 2022 +0200 @@ -279,6 +279,7 @@ } else { double cw = colort / recipe->batch_size * 8.34436; color = Utils::kw_to_ebc(recipe->color_method, cw); + //qDebug() << " oud EBC" << color << "new EBC" << Utils::kw_to_newebc(recipe->color_method, cw) << "SRM" << Utils::kw_to_srm(recipe->color_method, cw); } qDebug() << " color" << ui->est_colorEdit->value() << color << recipe->est_color; recipe->est_color = color; diff -r 5093db5665c6 -r 4bc92122d001 src/Utils.cpp --- a/src/Utils.cpp Wed Apr 27 11:26:10 2022 +0200 +++ b/src/Utils.cpp Wed Apr 27 12:15:36 2022 +0200 @@ -324,6 +324,12 @@ } +double Utils::kw_to_newebc(int colormethod, double c) +{ + return 1.97 * kw_to_srm(colormethod, c); +} + + double Utils::abvol(double og, double fg) { if (((og - fg) < 0) || (fg < 0.9)) diff -r 5093db5665c6 -r 4bc92122d001 src/Utils.h --- a/src/Utils.h Wed Apr 27 11:26:10 2022 +0200 +++ b/src/Utils.h Wed Apr 27 12:15:36 2022 +0200 @@ -30,6 +30,7 @@ double estimate_fg(double psugar, double pcara, double wgratio, double mashtime, double mashtemp, double svg, double og); double kw_to_srm(int colormethod, double c); double kw_to_ebc(int colormethod, double c); + double kw_to_newebc(int colormethod, double c); double abvol(double og, double fg); double toIBU(int Use, int Form, double SG, double Volume, double Amount, double Boiltime, double Alpha, int Method, double Whirlpool9, double Whirlpool7, double Whirlpool6);