diff -r 7a29f835e20a -r d694abd9d809 thermferm/rdconfig.c --- a/thermferm/rdconfig.c Mon Jan 21 17:11:50 2019 +0100 +++ b/thermferm/rdconfig.c Thu Feb 07 14:59:47 2019 +0100 @@ -322,8 +322,10 @@ } xmlTextWriterWriteFormatElement(writer, BAD_CAST "MODE", "%s", UNITMODE[tmp3->mode] ); xmlTextWriterWriteFormatElement(writer, BAD_CAST "STAGE", "%s", UNITSTAGE[tmp3->stage] ); - xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_SET", "%.1f", tmp3->beer_set); - xmlTextWriterWriteFormatElement(writer, BAD_CAST "FRIDGE_SET", "%.1f", tmp3->fridge_set); + xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_SET_LO", "%.1f", tmp3->beer_set_lo); + xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_SET_HI", "%.1f", tmp3->beer_set_hi); + xmlTextWriterWriteFormatElement(writer, BAD_CAST "FRIDGE_SET_LO", "%.1f", tmp3->fridge_set_lo); + 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); @@ -569,8 +571,8 @@ unit->cooler_address = unit->fan_address = unit->door_address = \ unit->light_address = unit->psu_address = unit->profile_uuid = unit->profile_name = NULL; unit->volume = unit->prof_peak_abs = unit->prof_peak_rel = 0.0; - unit->air_temperature = unit->beer_temperature = unit->chiller_temperature = unit->beer_set = \ - unit->fridge_set = unit->profile_inittemp_lo = unit->profile_inittemp_hi = 20.0; + unit->air_temperature = unit->beer_temperature = unit->chiller_temperature = unit->beer_set_lo = unit->beer_set_hi = \ + unit->fridge_set_lo = unit->fridge_set_hi = unit->profile_inittemp_lo = unit->profile_inittemp_hi = 20.0; unit->air_state = unit->beer_state = unit->chiller_state = 1; // missing unit->heater_state = unit->cooler_state = unit->fan_state = unit->door_state = \ unit->light_state = unit->psu_state = unit->mode = unit->prof_state = unit->stage = 0; @@ -799,16 +801,40 @@ } xmlFree(key); } - if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_SET"))) { + if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_SET"))) { // Remove in 2020. + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%f", &val) == 1) + unit->beer_set_lo = unit->beer_set_hi = val; + xmlFree(key); + } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_SET_LO"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%f", &val) == 1) + unit->beer_set_lo = val; + xmlFree(key); + } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_SET_HI"))) { key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (sscanf((const char *)key, "%f", &val) == 1) - unit->beer_set = val; + unit->beer_set_hi = val; + xmlFree(key); + } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"FRIDGE_SET"))) { // Remove in 2020 + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%f", &val) == 1) + unit->fridge_set_lo = unit->fridge_set_hi = val; xmlFree(key); } - if ((!xmlStrcmp(cur->name, (const xmlChar *)"FRIDGE_SET"))) { + if ((!xmlStrcmp(cur->name, (const xmlChar *)"FRIDGE_SET_LO"))) { key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (sscanf((const char *)key, "%f", &val) == 1) - unit->fridge_set = val; + unit->fridge_set_lo = val; + xmlFree(key); + } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"FRIDGE_SET_HI"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%f", &val) == 1) + unit->fridge_set_hi = val; xmlFree(key); } if ((!xmlStrcmp(cur->name, (const xmlChar *)"TEMP_SET_MIN"))) {