Index: /trunk/FACT++/src/smartfact.cc
===================================================================
--- /trunk/FACT++/src/smartfact.cc	(revision 14371)
+++ /trunk/FACT++/src/smartfact.cc	(revision 14372)
@@ -705,6 +705,4 @@
             return GetCurrentState();
 
-        cout << d.GetQoS() << ": " << d.GetText() << endl;
-
         if (d.GetQoS()==90)
             HandleControlMessageImp(d);
@@ -718,15 +716,6 @@
             return StateMachineImp::kSM_KeepState;
 
-        // [0] DimControl::kReady (Idle)
-        // [1] DimControl::kLoad
-        // [2] DimControl::kStarted
-        if (d.GetQoS()==1 && fDimControl.scriptdepth==0)
-            fControlMessageHist.clear();
-
-        // Not that this will also "ding" just after program startup
-        // if the dimctrl is still in state -3
-        if (fDimControl.last.second!=DimState::kOffline &&
-            d.GetQoS()==0 && fDimControl.scriptdepth==0)
-            SetAudio("ding");
+        if (fDimControl.scriptdepth>0)
+            return StateMachineImp::kSM_KeepState;
 
         if (d.GetQoS()>=2)
@@ -739,7 +728,25 @@
 #endif
 
-        HandleControlMessageImp(Event(d, fDimControl.shortmsg.data(), fDimControl.shortmsg.length()+1));
-        if (!file.empty())
+        // [0] DimControl::kReady (Idle)
+        // [1] DimControl::kLoad
+        // [2] DimControl::kStarted
+        if (d.GetQoS()==1)
+        {
+            fControlMessageHist.clear();
+            HandleControlMessageImp(Event(d, "========================================", 41));
+        }
+
+        HandleControlMessageImp(Event(d, ("----- "+fDimControl.shortmsg+" -----").data(), fDimControl.shortmsg.length()+13));
+        if (!file.empty() && d.GetQoS()<2)
             HandleControlMessageImp(Event(d, file.data(), file.length()+1));
+
+        // Not that this will also "ding" just after program startup
+        // if the dimctrl is still in state -3
+        if (d.GetQoS()==0)
+        {
+            HandleControlMessageImp(Event(d, "========================================", 41));
+            if (fDimControl.last.second!=DimState::kOffline)
+                SetAudio("ding");
+        }
 
         return StateMachineImp::kSM_KeepState;
@@ -1824,5 +1831,5 @@
 
         if (&state==&fDimControl)
-            return HTML::kGreen +'\t'+(state.state()<-2?"Idle":fDimControl.shortmsg)+'\n';
+            return HTML::kGreen +'\t'+(state.state()==0?"Idle":fDimControl.shortmsg)+'\n';
 
         const State rc = state.description();
@@ -2513,6 +2520,8 @@
                 }
         }
-        if (fDimDNS.online() && fDimDriveControl.state()==0x100)   // Armed, Moving, Tracking
-            out << " [ERR]";
+        if (fDimDNS.online() && fDimDriveControl.state()==0x100)
+            out << " <ERR>";
+        if (fDimDNS.online() && fDimDriveControl.state()==Drive::State::kLocked)
+            out << " &otimes;";
         out << '\n';
 
@@ -2651,5 +2660,5 @@
 
         out.str("");
-        out << Header(now) << '\t' << (fErrorList.size()>0) << '\t' << (fDimControl.state()>-3) << '\n';
+        out << Header(now) << '\t' << (fErrorList.size()>0) << '\t' << (fDimControl.state()>0) << '\n';
 
         if (!fDimDNS.online())
