   //wait on button release
   if (!openButtonIn.on()) {
     currentMode = modeWait;
-    manualModeReleaseTime = millis();
+    manualModeLastMoveTime = millis();
   }
 }
 

void updateModeWait() {
  log("updateModeWait");
  if (manualModeLocked) {
    //react to buttons locked in manual mode
    if (openButtonIn.on()) {
      currentMode = modeManualOpen;
    } else if (closeButtonIn.on()) {
      currentMode = modeManualClose;
    }
  } else {
    //react to buttons in auto mode
    if (openButtonIn.on()) {
      currentMode = modeAutoOpen;
    } else if (closeButtonIn.on()) {
      currentMode = modeAutoClose;
    }
  }
}


  updateTimers();
  updateMode();
  sendOutput();
}


