Merge branch 'amf/sm_update' into sprint83
diff --git a/org.eclipse.ote.statemachine/src/org/eclipse/ote/statemachine/StateMachine.java b/org.eclipse.ote.statemachine/src/org/eclipse/ote/statemachine/StateMachine.java
index a889a3f..9bc6f71 100644
--- a/org.eclipse.ote.statemachine/src/org/eclipse/ote/statemachine/StateMachine.java
+++ b/org.eclipse.ote.statemachine/src/org/eclipse/ote/statemachine/StateMachine.java
@@ -38,13 +38,25 @@
    private StateMachineIdFactory factory;
    private BaseState defaultInitialState;
    private int nextStateId = 0;
-   private boolean debug = false;
+   private volatile boolean debug = false;
    private final boolean runInInputThread;
    
+   /**
+    * This constructor will have the inputs processed in another thread.  Often this is not
+    * what you want if you are already doing scheduling and would prefer that all inputs are 
+    * processed at your controlled rate.
+    *  
+    * @param name
+    */
    public StateMachine(String name){
       this(new StateMachineIdFactory(), name, false);
    }
    
+   /**
+    * 
+    * @param name
+    * @param runInInputThread - false to run in a seperate thread
+    */
    public StateMachine(String name, boolean runInInputThread){
       this(new StateMachineIdFactory(), name, runInInputThread);
    }
@@ -58,6 +70,10 @@
       this.runInInputThread = runInInputThread;
    }
    
+   public void setDebugOutput(boolean debug){
+      this.debug = debug;
+   }
+   
    BaseInput processInput() throws RuntimeException{
       BaseInput input = getInput();
       if(input != null && input != killInput){