Index: trunk/FACT++/src/drivectrl.cc
===================================================================
--- trunk/FACT++/src/drivectrl.cc	(revision 18381)
+++ trunk/FACT++/src/drivectrl.cc	(revision 18382)
@@ -2180,4 +2180,27 @@
     }
 
+    int Screenshot(const EventImp &evt)
+    {
+        if (evt.GetSize()<2)
+        {
+            ostringstream msg;
+            msg << "Screenshot - Received event has " << evt.GetSize() << " bytes, but expected at least 2.";
+            T::Fatal(msg);
+            return T::kSM_FatalError;
+        }
+
+        if (evt.GetSize()==2)
+        {
+            ostringstream msg;
+            msg << "Screenshot - Filename missing.";
+            T::Error(msg);
+            return T::GetCurrentState();
+        }
+
+        T::Info("Screenshot initiated.");
+        Dim::SendCommandNB("TPOINT/SCREENSHOT", evt.GetData(), evt.GetSize());
+        return T::GetCurrentState();
+    }
+
     int SetLedBrightness(const EventImp &evt)
     {
@@ -2487,5 +2510,8 @@
         if (now>fSunRise)
         {
-            if (T::GetCurrentState()>State::kLocked)
+            if (T::GetCurrentState()==State::kParking)
+                return State::kParking;
+
+            if (T::GetCurrentState()>State::kLocked && T::GetCurrentState()!=StateMachineImp::kError)
                 return Park();
 
@@ -2769,4 +2795,10 @@
             (bind(&StateMachineDrive::TPoint, this))
             ("Take a TPoint");
+
+        T::AddEvent("SCREENSHOT", "B:1;C")
+            (bind(&StateMachineDrive::Screenshot, this, placeholders::_1))
+            ("Take a screenshot"
+             "|color[bool]:False if just the gray image should be saved."
+             "|name[string]:Filename");
 
         T::AddEvent("SET_LED_BRIGHTNESS", "I:2")
