       (prepare-state state (when (:use-position-list settings) position-list) autofocus-device)
       (def last-state state) ; for debugging
       (let [acq-seq (generate-acq-sequence settings @attached-runnables)]
-        (def acq-sequence acq-seq)
+        (def acq-sequence acq-seq) ; for debugging
         (execute (mapcat #(make-event-fns % out-queue) acq-seq)))
       (catch Throwable t
              (def acq-error t)


(defn run [this settings cleanup? position-list autofocus-device]
  (def last-acq this)
  (def last-state (.state this))
    (reset! (.state this) {:stop false :pause false :finished false})
    (let [out-queue (LinkedBlockingQueue. 10)
          acq-thread (Thread. #(binding [state (.state this)]
                                 (run-acquisition settings out-queue cleanup? position-list autofocus-device))
                              "AcquisitionEngine2010 Thread (Clojure)")]

               :finished false
               :acq-thread acq-thread
               :summary-metadata (make-summary-metadata settings)})
      (def outq out-queue) ; for debugging
      (when-not (:stop @(.state this))
        (.start acq-thread)
        out-queue)))
