 /** Output Functions */
 
 void sendOutput() {
-  if (currentMode != previousMode) {
+  if (outputRequired) {
     log("mode changed");
     Serial.println(currentMode);
 

#define openTime 15600
// time taken to close top
#define closeTime 16400

// operation modes
#define modeWait 0

  This auto-presses the open or close buttons for the convertible top on a Porsche 986
  for the specified open/close seconds automatically if you quickly tap the button.

  If the button tap is longer (eg it is held down), the button goes into manual mode and reacts like normal,
  i.e. is only auto-pressed for the same amount of time as the user is pressing.
  Once engaged, manual mode remains active until no input has been received for a defined amount of time.

  If the top is already automatically opening or closing, a second press of either
  button cancels the auto-open proceedure.
