thermferm/rdconfig.c

changeset 578
d694abd9d809
parent 570
1e0192b295b9
child 579
7032693272f1
equal deleted inserted replaced
577:7a29f835e20a 578:d694abd9d809
320 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PSU_STATE", "%d", tmp3->psu_state); 320 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PSU_STATE", "%d", tmp3->psu_state);
321 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PSU_IDX", "%d", tmp3->psu_idx); 321 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PSU_IDX", "%d", tmp3->psu_idx);
322 } 322 }
323 xmlTextWriterWriteFormatElement(writer, BAD_CAST "MODE", "%s", UNITMODE[tmp3->mode] ); 323 xmlTextWriterWriteFormatElement(writer, BAD_CAST "MODE", "%s", UNITMODE[tmp3->mode] );
324 xmlTextWriterWriteFormatElement(writer, BAD_CAST "STAGE", "%s", UNITSTAGE[tmp3->stage] ); 324 xmlTextWriterWriteFormatElement(writer, BAD_CAST "STAGE", "%s", UNITSTAGE[tmp3->stage] );
325 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_SET", "%.1f", tmp3->beer_set); 325 xmlTextWriterWriteFormatElement(writer, BAD_CAST "BEER_SET_LO", "%.1f", tmp3->beer_set_lo);
326 xmlTextWriterWriteFormatElement(writer, BAD_CAST "FRIDGE_SET", "%.1f", tmp3->fridge_set); 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);
328 xmlTextWriterWriteFormatElement(writer, BAD_CAST "FRIDGE_SET_HI", "%.1f", tmp3->fridge_set_hi);
327 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);
328 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);
329 331
330 if (tmp3->profile_uuid) { 332 if (tmp3->profile_uuid) {
331 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PROFILE_UUID", "%s", tmp3->profile_uuid); 333 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PROFILE_UUID", "%s", tmp3->profile_uuid);
567 unit->uuid = unit->product_uuid = unit->product_code = unit->product_name = unit->event_msg = \ 569 unit->uuid = unit->product_uuid = unit->product_code = unit->product_name = unit->event_msg = \
568 unit->alias = unit->air_address = unit->beer_address = unit->chiller_address = unit->heater_address = \ 570 unit->alias = unit->air_address = unit->beer_address = unit->chiller_address = unit->heater_address = \
569 unit->cooler_address = unit->fan_address = unit->door_address = \ 571 unit->cooler_address = unit->fan_address = unit->door_address = \
570 unit->light_address = unit->psu_address = unit->profile_uuid = unit->profile_name = NULL; 572 unit->light_address = unit->psu_address = unit->profile_uuid = unit->profile_name = NULL;
571 unit->volume = unit->prof_peak_abs = unit->prof_peak_rel = 0.0; 573 unit->volume = unit->prof_peak_abs = unit->prof_peak_rel = 0.0;
572 unit->air_temperature = unit->beer_temperature = unit->chiller_temperature = unit->beer_set = \ 574 unit->air_temperature = unit->beer_temperature = unit->chiller_temperature = unit->beer_set_lo = unit->beer_set_hi = \
573 unit->fridge_set = unit->profile_inittemp_lo = unit->profile_inittemp_hi = 20.0; 575 unit->fridge_set_lo = unit->fridge_set_hi = unit->profile_inittemp_lo = unit->profile_inittemp_hi = 20.0;
574 unit->air_state = unit->beer_state = unit->chiller_state = 1; // missing 576 unit->air_state = unit->beer_state = unit->chiller_state = 1; // missing
575 unit->heater_state = unit->cooler_state = unit->fan_state = unit->door_state = \ 577 unit->heater_state = unit->cooler_state = unit->fan_state = unit->door_state = \
576 unit->light_state = unit->psu_state = unit->mode = unit->prof_state = unit->stage = 0; 578 unit->light_state = unit->psu_state = unit->mode = unit->prof_state = unit->stage = 0;
577 unit->air_idx = unit->beer_idx = unit->chiller_idx = unit->heater_idx = unit->cooler_idx = unit->fan_idx = \ 579 unit->air_idx = unit->beer_idx = unit->chiller_idx = unit->heater_idx = unit->cooler_idx = unit->fan_idx = \
578 unit->door_idx = unit->light_idx = unit->psu_idx = unit->profile_fridge_mode = \ 580 unit->door_idx = unit->light_idx = unit->psu_idx = unit->profile_fridge_mode = \
797 break; 799 break;
798 } 800 }
799 } 801 }
800 xmlFree(key); 802 xmlFree(key);
801 } 803 }
802 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_SET"))) { 804 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_SET"))) { // Remove in 2020.
803 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 805 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
804 if (sscanf((const char *)key, "%f", &val) == 1) 806 if (sscanf((const char *)key, "%f", &val) == 1)
805 unit->beer_set = val; 807 unit->beer_set_lo = unit->beer_set_hi = val;
806 xmlFree(key); 808 xmlFree(key);
807 } 809 }
808 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FRIDGE_SET"))) { 810 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_SET_LO"))) {
809 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 811 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
810 if (sscanf((const char *)key, "%f", &val) == 1) 812 if (sscanf((const char *)key, "%f", &val) == 1)
811 unit->fridge_set = val; 813 unit->beer_set_lo = val;
814 xmlFree(key);
815 }
816 if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_SET_HI"))) {
817 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
818 if (sscanf((const char *)key, "%f", &val) == 1)
819 unit->beer_set_hi = val;
820 xmlFree(key);
821 }
822 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FRIDGE_SET"))) { // Remove in 2020
823 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
824 if (sscanf((const char *)key, "%f", &val) == 1)
825 unit->fridge_set_lo = unit->fridge_set_hi = val;
826 xmlFree(key);
827 }
828 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FRIDGE_SET_LO"))) {
829 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
830 if (sscanf((const char *)key, "%f", &val) == 1)
831 unit->fridge_set_lo = val;
832 xmlFree(key);
833 }
834 if ((!xmlStrcmp(cur->name, (const xmlChar *)"FRIDGE_SET_HI"))) {
835 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
836 if (sscanf((const char *)key, "%f", &val) == 1)
837 unit->fridge_set_hi = val;
812 xmlFree(key); 838 xmlFree(key);
813 } 839 }
814 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TEMP_SET_MIN"))) { 840 if ((!xmlStrcmp(cur->name, (const xmlChar *)"TEMP_SET_MIN"))) {
815 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 841 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
816 if (sscanf((const char *)key, "%f", &val) == 1) 842 if (sscanf((const char *)key, "%f", &val) == 1)

mercurial