 {
   for (int i=0;i<sizeof(variables) / sizeof(struct variable);i++) {
     if (!strcmp(variables[i].name,name)) {
-      variables[i].value=origVariables[i].value;
+      variables[i].value=variables[i].origvalue;
       return 0;
     }
   }
   return 1;
 }
 
+void initVariables()
+{
+  for (int i=0;i<sizeof(variables) / sizeof(struct variable);i++) {
+    variables[i].value=variables[i].origvalue;
+  }
+}
+
 void processSensors()
 {
-  //static unsigned int cnt=0;
   boolean timeouts=false;
   boolean cntTimeouts,cntChanges;
   boolean changes=false;
   time_t ts=now();
   int chcnt=(sizeof(adArr) / sizeof(struct ad));
 
-  //if (!cnt)
-  //  resetAdChannels(adArr,chcnt);
-  //readAdChannels(adArr,chcnt);
-  //cnt++;
   if (readAdChannels(adArr,chcnt)) {
     sched.oscillate(13,150, LOW,2);
     cntTimeouts=chkCntTimeouts(ts,false);

	break;

      case METHOD_TABLE:
	iTable=(struct convert *) conditions[i].target;
	conditions[i].limit2->value=resolveConversion(value,conditions[i].limit->value,iTable);
	float radReq=conditions[i].limit2->value;
	float radiator=adArr[3].measured.analog;
	float diff=radReq-radiator;



struct variable variables[]= {
  {"boilTemp",      0,24.5},
  {"boilHysteresis",0, 1.5},
  {"boilReduced",   0,24.0},
  {"hhboil",        0,25.0},
  {"radiatorReq",   0,22.0}, // radiator requested temperature
  {"radiatorAdd",   0,16.0},
  {"null",          0,0.0 }
};

// in future this table shall be stored mainly in eeprom.
// and so is it's size
