 #define AD_SAMPLECNT 10
 #define FLAGS_DATACHANGE 0x01
 #define FLAGS_TIMEOUT 0x02
+#define FLAGS_EVALUATE 0x04
 
 #define OUTIO_ACTIVE 0x01
 


void processSensors()
{
  static 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 ((cnt % AD_SAMPLECNT)==0) {
    sched.oscillate(13,150, LOW,2);
    cntTimeouts=chkCntTimeouts(ts,false);
    cntChanges=chkCntChanged();

  }
}


void evaluateCondition(struct ad *source,time_t ts)
{
  float value;
