         }
   
         if (last_gyroscope_settling_time != 0) {
-          // Flush the change status so that we have to get a change in one direction
-          // followed by a change in the other starting now.
+          //Serial.print("Stopped\n");
+          
+          // We have dropped to a stop, so we need to set the trigger for
+          // moving fast again and make sure we actually move before the
+          // last gyro value registers a move.
+          have_moved_fast = false;
+          last_gyroscope_value = 0;
+
+          // Flush the change status so that we have to get a brightness change
+          // in one direction followed by a change in the other starting now.
           last_brightness_reach_end_time = 0;
           last_brightness_change_direction = 0;
           state = S_REVERSE_BRIGHTNESS;

    // but now have stopped.
    case S_REVERSE_DIRECTION:
      {
        // Keep track of when the gyroscope value most recently
        // dropped below threshold (was above threshold in the previous
        // time step and dropped below threshold this time).
        static int last_gyroscope_value = 0;
        if (tracking_axis != NULL) {
          if ( (gyro_direction(*tracking_axis) == 0) &&
               (gyro_direction(last_gyroscope_value) != 0) ) {
            last_gyroscope_settling_time = now;
          }

            state = S_REVERSE_DIRECTION;
            Serial.print("Calibration complete, measuring latencies on ");
            if (tracking_axis == &gyroX) {
              Serial.print("X axis");
            } else if (tracking_axis == &gyroY) {
              Serial.print("Y axis");
            } else {
              Serial.print("Z axis");
            }
            Serial.print(" (brightness difference ");
            Serial.print(maxBright - minBright);
            Serial.print(")\n");
            Serial.print("Continue periodic motion to test latency.\n");
          }
        }
