Index: trunk/MagicSoft/Cosy/tcpip/MCeCoCom.cc
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MCeCoCom.cc	(revision 9432)
+++ trunk/MagicSoft/Cosy/tcpip/MCeCoCom.cc	(revision 9435)
@@ -42,4 +42,11 @@
 bool MCeCoCom::InterpreteReport(TString &str)
 {
+    if (!str.EndsWith("OVER"))
+    {
+        cout << "Communication Problem: Termination (OVER) not found." << endl;
+        fComStat = kComProblem;
+        return false;
+    }
+
     int y, m, d, h, min, s, ms, len;
 
@@ -74,4 +81,5 @@
         return false;
     }
+/*
     str.Remove(0, len);
 
@@ -82,4 +90,5 @@
         return false;
     }
+ */
 
     fHumidity = hum;
@@ -142,5 +151,5 @@
 
     // Send report to CC
-    const bool rc = Send(msg, strlen(msg));
+    const bool rc = Send(msg.Data(), msg.Length());
     fComStat = rc ? kNoCmdReceived : kComProblem;
 
Index: trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 9432)
+++ trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 9435)
@@ -148,4 +148,18 @@
 {
     cout << "CC-COMMAND " << MTime(-1) << " TPOIN " << str << endl;
+
+    if (fQueue)
+        fQueue->PostMsg(WM_TPOINT);//, (void*)str.Data(), str.Length()+1);
+
+    return true;
+}
+
+bool MDriveCom::CommandSTGMD(TString &str)
+{
+    cout << "CC-COMMAND " << MTime(-1) << "STGMD" << endl;
+
+    if (fQueue)
+        fQueue->PostMsg(WM_STARGMODE);//, (void*)str.Data(), str.Length()+1);
+
     return true;
 }
@@ -220,4 +234,7 @@
     if (cmd==(TString)"ARM")
         return CommandARM(str);
+
+    if (cmd==(TString)"STGMD")
+        return CommandSTGMD(str);
 
     if (cmd.IsNull() && str.IsNull())
@@ -278,5 +295,5 @@
     str += armed ? "1 " : "0 ";
 
-    return SendRep("DRIVE-REPORT", str, kFALSE);
+    return SendRep("DRIVE-REPORT", str.Data(), kFALSE);
 }
 
@@ -286,5 +303,5 @@
 }
 
-bool MDriveCom::SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t num, Int_t n, Double_t bright, Double_t mjd, Double_t x, Double_t y)
+bool MDriveCom::SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t num, Int_t n, Double_t bright, Double_t mjd, Int_t numleds, Int_t numrings)
 {
     // miss   [deg]
@@ -305,14 +322,14 @@
     str += MString::Format("%05.3f ", miss.Zd());       //[arcmin]
     str += MString::Format("%05.3f ", miss.Az());       //[arcmin]
-    Print(str, nompos.Zd());                      //[deg]
-    Print(str, nompos.Az());                      //[deg]
-    str += MString::Format("%05.1f ",   center.GetX()); //number
-    str += MString::Format("%05.1f ",   center.GetY()); //number
-    str += MString::Format("%04d ",   n);               //number of correleated stars
-    str += MString::Format("%03.1f ",  bright);
+    Print(str, nompos.Zd());                            //[deg]
+    Print(str, nompos.Az());                            //[deg]
+    str += MString::Format("%05.1f ",   center.GetX()); //
+    str += MString::Format("%05.1f ",   center.GetY()); //
+    str += MString::Format("%04d ",   n);               // number of correleated stars
+    str += MString::Format("%03.1f ",  bright);         // arbitrary sky brightness
     str += MString::Format("%12.6f ", t.GetMjd());      // mjd
-    str += MString::Format("%.1f ", x);
-    str += MString::Format("%.1f ", y);
-    str += MString::Format("%04d ", num);               //number of detected stars
+    str += MString::Format("%d ", numleds);             // number of detected leds
+    str += MString::Format("%d ", numrings);            // number of detected rings
+    str += MString::Format("%04d ", num);               // number of detected stars
 
     return SendRep("STARG-REPORT", str, kTRUE);
@@ -321,36 +338,23 @@
 bool MDriveCom::SendTPoint(UInt_t stat)
 {
+    //const MTime t(-1);
+
+    SetStatus(stat);
     /*
-    // miss   [deg]
-    // nompos [deg]
-    const MTime t(-1);
-
-    miss *= 60;        // [arcmin]
-
-    // Set status flag
-    if (stat&kError)
-        SetStatus(0);
-    if (stat&kStandby)
-        SetStatus(2);
-    if (stat&kMonitoring)
-        SetStatus(4);
-    
-    MString txt;
-
-    TString str;
-    str += txt.Print("%05.3f ", miss.Zd());       //[arcmin]
-    str += txt.Print("%05.3f ", miss.Az());       //[arcmin]
-    Print(str, nompos.Zd());                      //[deg]
-    Print(str, nompos.Az());                      //[deg]
-    str += txt.Print("%05.1f ",   center.GetX()); //number
-    str += txt.Print("%05.1f ",   center.GetY()); //number
-    str += txt.Print("%04d ",   n);               //number of correleated stars
-    str += txt.Print("%03.1f ",  bright);
-    str += txt.Print("%12.6f ", t.GetMjd());      // mjd
-    str += txt.Print("%.1f ", x);
-    str += txt.Print("%.1f ", y);
-    str += txt.Print("%04d ", num);               //number of detected stars
-    */
-
+     TString str;
+     str += name;  // star name
+     str += " ";
+     str += nominalaz;
+     str += nominalel;
+     str += realaz;
+     str += realel;
+     str += nomra;
+     str += nomdec;
+     str += diffaz;
+     str += diffel;
+     str += mjd;
+     str += numleds;
+     str += artmag;
+     */
     return SendRep("TPOINT-REPORT", "", kTRUE);
 }
Index: trunk/MagicSoft/Cosy/tcpip/MDriveCom.h
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MDriveCom.h	(revision 9432)
+++ trunk/MagicSoft/Cosy/tcpip/MDriveCom.h	(revision 9435)
@@ -29,4 +29,5 @@
     bool CommandARM(TString &str);
     bool CommandTPOINT(TString &str);
+    bool CommandSTGMD(TString &str);
 
 public:
@@ -49,5 +50,5 @@
 
     bool SendReport(UInt_t stat, RaDec rd, ZdAz so, ZdAz is, ZdAz er, Bool_t armed);
-    bool SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t num, Int_t n, Double_t bright, Double_t mjd, Double_t x, Double_t y);
+    bool SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t num, Int_t n, Double_t bright, Double_t mjd, Int_t numleds, Int_t numrings);
     bool SendTPoint(UInt_t stat);
     bool SendStatus(const char *stat);
