   if (digitalRead(PUSH_BUTTON)==LOW){
     cbus.dumpMemory();
   }
+
+  if (detachservos_time > 0 && detachservos_time < millis()){
+      detachServos();
+      detachservos_time = 0;
+  }
+
 }
 
 //user defined function. contains the module logic.called every time run() is called.

byte active_servo[2];
byte togle_servo[2];



//###############

    byte lastPos;
    if (event){
      if (isServoToTogle(servoidx)){
	//servos[servoidx].write(servo_start,SPEED);
        lastPos = servo_start;
      }
      else {
	//servos[servoidx].write(servo_end,SPEED);
        lastPos = servo_end;
      }
    }
    else{
      if (isServoToTogle(servoidx)){
        //servos[servoidx].write(servo_end,SPEED);
        lastPos = servo_end;
      }
      else {
        //servos[servoidx].write(servo_start,SPEED);
        lastPos = servo_start;
      }
    }
    servos[servoidx].attach(servopins[servoidx]);
    servos[servoidx].write(last_pos,SPEED);

   //write last pos to eprom
   //variables start with number 1  
   #ifdef  DEBUGNODE
