diff -r d694abd9d809 -r 7032693272f1 thermferm/rdconfig.c --- a/thermferm/rdconfig.c Thu Feb 07 14:59:47 2019 +0100 +++ b/thermferm/rdconfig.c Wed Feb 27 17:38:06 2019 +0100 @@ -328,6 +328,8 @@ xmlTextWriterWriteFormatElement(writer, BAD_CAST "FRIDGE_SET_HI", "%.1f", tmp3->fridge_set_hi); xmlTextWriterWriteFormatElement(writer, BAD_CAST "TEMP_SET_MIN", "%.1f", tmp3->temp_set_min); xmlTextWriterWriteFormatElement(writer, BAD_CAST "TEMP_SET_MAX", "%.1f", tmp3->temp_set_max); + xmlTextWriterWriteFormatElement(writer, BAD_CAST "YEAST_LO", "%.1f", tmp3->yeast_lo); + xmlTextWriterWriteFormatElement(writer, BAD_CAST "YEAST_HI", "%.1f", tmp3->yeast_hi); if (tmp3->profile_uuid) { xmlTextWriterWriteFormatElement(writer, BAD_CAST "PROFILE_UUID", "%s", tmp3->profile_uuid); @@ -586,6 +588,8 @@ unit->heater_usage = unit->cooler_usage = unit->fan_usage = unit->light_usage = 0; unit->temp_set_min = 1.0; unit->temp_set_max = 30.0; + unit->yeast_lo = 12.0; + unit->yeast_hi = 24.0; unit->prof_started = unit->prof_paused = unit->prof_primary_done = (time_t)0; unit->prof_percent = 0; unit->PID_cool = (pid_var *)malloc(sizeof(pid_var)); @@ -849,24 +853,18 @@ unit->temp_set_max = val; xmlFree(key); } -// if ((!xmlStrcmp(cur->name, (const xmlChar *)"PID_KP"))) { -// key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); -// if (sscanf((const char *)key, "%f", &val) == 1) -// unit->PID_cool->pGain = unit->PID_heat->pGain = val; /* Upgrade config */ -// xmlFree(key); -// } -// if ((!xmlStrcmp(cur->name, (const xmlChar *)"PID_KD"))) { -// key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); -// if (sscanf((const char *)key, "%f", &val) == 1) -// unit->PID_cool->dGain = unit->PID_heat->dGain = val; /* Upgrade config */ -// xmlFree(key); -// } -// if ((!xmlStrcmp(cur->name, (const xmlChar *)"PID_KI"))) { -// key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); -// if (sscanf((const char *)key, "%f", &val) == 1) -// unit->PID_cool->iGain = unit->PID_heat->iGain = val; /* Upgrade config */ -// xmlFree(key); -// } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"YEAST_LO"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%f", &val) == 1) + unit->yeast_lo = val; + xmlFree(key); + } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"YEAST_HI"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%f", &val) == 1) + unit->yeast_hi = val; + xmlFree(key); + } if ((!xmlStrcmp(cur->name, (const xmlChar *)"PIDC_IMAX"))) { key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (sscanf((const char *)key, "%f", &val) == 1)