277 double sr = 0.95; // Mash and sparge efficiency |
277 double sr = 0.95; // Mash and sparge efficiency |
278 color = round((4.46 * bv * sr) / recipe->batch_size * colorh); |
278 color = round((4.46 * bv * sr) / recipe->batch_size * colorh); |
279 } else { |
279 } else { |
280 double cw = colort / recipe->batch_size * 8.34436; |
280 double cw = colort / recipe->batch_size * 8.34436; |
281 color = Utils::kw_to_ebc(recipe->color_method, cw); |
281 color = Utils::kw_to_ebc(recipe->color_method, cw); |
|
282 //qDebug() << " oud EBC" << color << "new EBC" << Utils::kw_to_newebc(recipe->color_method, cw) << "SRM" << Utils::kw_to_srm(recipe->color_method, cw); |
282 } |
283 } |
283 qDebug() << " color" << ui->est_colorEdit->value() << color << recipe->est_color; |
284 qDebug() << " color" << ui->est_colorEdit->value() << color << recipe->est_color; |
284 recipe->est_color = color; |
285 recipe->est_color = color; |
285 ui->est_colorEdit->setValue(color); |
286 ui->est_colorEdit->setValue(color); |
286 ui->est_colorEdit->setStyleSheet(Utils::ebc_to_style(color)); |
287 ui->est_colorEdit->setStyleSheet(Utils::ebc_to_style(color)); |