diff -r 8b56f1b4e7ec -r 4091d4fe217f thermferm/rdconfig.c --- a/thermferm/rdconfig.c Wed Jul 25 14:18:39 2018 +0200 +++ b/thermferm/rdconfig.c Wed Jul 25 20:08:13 2018 +0200 @@ -914,6 +914,10 @@ syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteElement"); return 1; } + if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "ROOM_HUMIDITY", "%.1f", simulator->room_humidity)) < 0) { + syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteElement"); + return 1; + } if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "AIR_TEMPERATURE", "%f", simulator->air_temperature)) < 0) { syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteElement"); return 1; @@ -922,6 +926,10 @@ syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteElement"); return 1; } + if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "CHILLER_TEMPERATURE", "%f", simulator->chiller_temperature)) < 0) { + syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteElement"); + return 1; + } if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "COOLER_TEMP", "%f", simulator->cooler_temp)) < 0) { syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteElement"); return 1; @@ -1935,6 +1943,8 @@ simulator->uuid = simulator->name = NULL; simulator->volume_air = simulator->volume_beer = 0; simulator->room_temperature = simulator->air_temperature = simulator->beer_temperature = simulator->s_cool_temp = simulator->s_heat_temp = 20.0; + simulator->chiller_temperature = 1.5; + simulator->room_humidity = 49.2; simulator->cooler_temp = simulator->cooler_size = simulator->heater_temp = simulator->heater_size = simulator->frigo_isolation = 0.0; simulator->cooler_time = simulator->heater_time = simulator->cooler_state = simulator->heater_state = 0; simulator->s_yeast_started = simulator->s_cool_changed = simulator->s_heat_changed = (time_t)0; @@ -1975,6 +1985,12 @@ simulator->room_temperature = fval; xmlFree(key); } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"ROOM_GUMIDITY"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%f", &fval) == 1) + simulator->room_humidity= fval; + xmlFree(key); + } if ((!xmlStrcmp(cur->name, (const xmlChar *)"AIR_TEMPERATURE"))) { key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (sscanf((const char *)key, "%f", &fval) == 1) @@ -1987,6 +2003,12 @@ simulator->beer_temperature = fval; xmlFree(key); } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"CHILLER_TEMPERATURE"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%f", &fval) == 1) + simulator->chiller_temperature = fval; + xmlFree(key); + } if ((!xmlStrcmp(cur->name, (const xmlChar *)"COOLER_TEMP"))) { key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (sscanf((const char *)key, "%f", &fval) == 1)