thermferm/rdconfig.c

changeset 579
7032693272f1
parent 578
d694abd9d809
child 582
ba340e00aab2
equal deleted inserted replaced
578:d694abd9d809 579:7032693272f1
326 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_SET_HI", "%.1f", tmp3->beer_set_hi); 326 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_SET_HI", "%.1f", tmp3->beer_set_hi);
327 xmlTextWriterWriteFormatElement(writer, BAD_CAST "FRIDGE_SET_LO", "%.1f", tmp3->fridge_set_lo); 327 xmlTextWriterWriteFormatElement(writer, BAD_CAST "FRIDGE_SET_LO", "%.1f", tmp3->fridge_set_lo);
328 xmlTextWriterWriteFormatElement(writer, BAD_CAST "FRIDGE_SET_HI", "%.1f", tmp3->fridge_set_hi); 328 xmlTextWriterWriteFormatElement(writer, BAD_CAST "FRIDGE_SET_HI", "%.1f", tmp3->fridge_set_hi);
329 xmlTextWriterWriteFormatElement(writer, BAD_CAST "TEMP_SET_MIN", "%.1f", tmp3->temp_set_min); 329 xmlTextWriterWriteFormatElement(writer, BAD_CAST "TEMP_SET_MIN", "%.1f", tmp3->temp_set_min);
330 xmlTextWriterWriteFormatElement(writer, BAD_CAST "TEMP_SET_MAX", "%.1f", tmp3->temp_set_max); 330 xmlTextWriterWriteFormatElement(writer, BAD_CAST "TEMP_SET_MAX", "%.1f", tmp3->temp_set_max);
331 xmlTextWriterWriteFormatElement(writer, BAD_CAST "YEAST_LO", "%.1f", tmp3->yeast_lo);
332 xmlTextWriterWriteFormatElement(writer, BAD_CAST "YEAST_HI", "%.1f", tmp3->yeast_hi);
331 333
332 if (tmp3->profile_uuid) { 334 if (tmp3->profile_uuid) {
333 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PROFILE_UUID", "%s", tmp3->profile_uuid); 335 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PROFILE_UUID", "%s", tmp3->profile_uuid);
334 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PROFILE_NAME", "%s", tmp3->profile_name); 336 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PROFILE_NAME", "%s", tmp3->profile_name);
335 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PROFILE_INITTEMP_LO", "%.1f", tmp3->profile_inittemp_lo); 337 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PROFILE_INITTEMP_LO", "%.1f", tmp3->profile_inittemp_lo);
584 unit->light_delay = 1; /* 15 seconds delay */ 586 unit->light_delay = 1; /* 15 seconds delay */
585 unit->heater_wait = unit->cooler_wait = unit->fan_wait = unit->light_wait = 0; 587 unit->heater_wait = unit->cooler_wait = unit->fan_wait = unit->light_wait = 0;
586 unit->heater_usage = unit->cooler_usage = unit->fan_usage = unit->light_usage = 0; 588 unit->heater_usage = unit->cooler_usage = unit->fan_usage = unit->light_usage = 0;
587 unit->temp_set_min = 1.0; 589 unit->temp_set_min = 1.0;
588 unit->temp_set_max = 30.0; 590 unit->temp_set_max = 30.0;
591 unit->yeast_lo = 12.0;
592 unit->yeast_hi = 24.0;
589 unit->prof_started = unit->prof_paused = unit->prof_primary_done = (time_t)0; 593 unit->prof_started = unit->prof_paused = unit->prof_primary_done = (time_t)0;
590 unit->prof_percent = 0; 594 unit->prof_percent = 0;
591 unit->PID_cool = (pid_var *)malloc(sizeof(pid_var)); 595 unit->PID_cool = (pid_var *)malloc(sizeof(pid_var));
592 unit->PID_heat = (pid_var *)malloc(sizeof(pid_var)); 596 unit->PID_heat = (pid_var *)malloc(sizeof(pid_var));
593 InitPID(unit->PID_cool, PID_TYPE_COOL); 597 InitPID(unit->PID_cool, PID_TYPE_COOL);
847 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 851 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
848 if (sscanf((const char *)key, "%f", &val) == 1) 852 if (sscanf((const char *)key, "%f", &val) == 1)
849 unit->temp_set_max = val; 853 unit->temp_set_max = val;
850 xmlFree(key); 854 xmlFree(key);
851 } 855 }
852 // if ((!xmlStrcmp(cur->name, (const xmlChar *)"PID_KP"))) { 856 if ((!xmlStrcmp(cur->name, (const xmlChar *)"YEAST_LO"))) {
853 // key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 857 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
854 // if (sscanf((const char *)key, "%f", &val) == 1) 858 if (sscanf((const char *)key, "%f", &val) == 1)
855 // unit->PID_cool->pGain = unit->PID_heat->pGain = val; /* Upgrade config */ 859 unit->yeast_lo = val;
856 // xmlFree(key); 860 xmlFree(key);
857 // } 861 }
858 // if ((!xmlStrcmp(cur->name, (const xmlChar *)"PID_KD"))) { 862 if ((!xmlStrcmp(cur->name, (const xmlChar *)"YEAST_HI"))) {
859 // key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 863 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
860 // if (sscanf((const char *)key, "%f", &val) == 1) 864 if (sscanf((const char *)key, "%f", &val) == 1)
861 // unit->PID_cool->dGain = unit->PID_heat->dGain = val; /* Upgrade config */ 865 unit->yeast_hi = val;
862 // xmlFree(key); 866 xmlFree(key);
863 // } 867 }
864 // if ((!xmlStrcmp(cur->name, (const xmlChar *)"PID_KI"))) {
865 // key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
866 // if (sscanf((const char *)key, "%f", &val) == 1)
867 // unit->PID_cool->iGain = unit->PID_heat->iGain = val; /* Upgrade config */
868 // xmlFree(key);
869 // }
870 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PIDC_IMAX"))) { 868 if ((!xmlStrcmp(cur->name, (const xmlChar *)"PIDC_IMAX"))) {
871 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 869 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
872 if (sscanf((const char *)key, "%f", &val) == 1) 870 if (sscanf((const char *)key, "%f", &val) == 1)
873 unit->PID_cool->iMax = val; 871 unit->PID_cool->iMax = val;
874 xmlFree(key); 872 xmlFree(key);

mercurial