Index: /trunk/MagicSoft/Cosy/Changelog
===================================================================
--- /trunk/MagicSoft/Cosy/Changelog	(revision 1759)
+++ /trunk/MagicSoft/Cosy/Changelog	(revision 1760)
@@ -1,3 +1,32 @@
                                                                   -*-*- END -*-*-
+ 2003/02/16 - Thomas Bretz (La Palma):
+
+   * base/MStarList.h:
+     - added default for mag to Add
+
+   * base/coord.h:
+     - replaced kRadDeg by including MAGIC.h
+   
+   * base/timer.[h,cc]:
+     - changed Now to call virtual function SetMjd
+
+   * gui/MGAccuracy.cc:
+     - fixed a bug causing the display to display error%60
+   
+   * gui/MGCosy.[h,cc]:
+     - added combo box for predifed positions
+     - update display of time only when time changed
+
+   * gui/MGSkyPosition.[h,cc]:
+     - added bright stars
+     
+   * main/MCosy.[h,cc]:
+     - some changes to output
+     - replaced HasZombie by a preliminary one
+     - changed dT to 3s
+     - removed time correction factor in Tracking algorithm
+     - PRELIMINARY TalkThreadTracking
+
+
 
  2003/02/14 - Thomas Bretz (La Palma):
Index: /trunk/MagicSoft/Cosy/base/MStarList.h
===================================================================
--- /trunk/MagicSoft/Cosy/base/MStarList.h	(revision 1759)
+++ /trunk/MagicSoft/Cosy/base/MStarList.h	(revision 1760)
@@ -20,5 +20,5 @@
         new (fStars[idx]) MStar(meanx, meany, mag);
     }
-    void Add(Double_t meanx, Double_t meany, Double_t mag)
+    void Add(Double_t meanx, Double_t meany, Double_t mag=0)
     {
         AddAt(fStars.GetLast()+1, meanx, meany, mag);
Index: /trunk/MagicSoft/Cosy/base/coord.h
===================================================================
--- /trunk/MagicSoft/Cosy/base/coord.h	(revision 1759)
+++ /trunk/MagicSoft/Cosy/base/coord.h	(revision 1760)
@@ -5,9 +5,11 @@
 #include <fstream.h>
 
+#include "MAGIC.h"
+
 /* pi/180:  degrees to radians */
 const double kDeg2Rad = 0.017453292519943295769236907684886127134428718885417;
 
 /* 180/pi:  radians to degrees */
-const double kRad2Deg = 57.295779513082320876798154814105170332405472466564;
+//const double kRad2Deg = 57.295779513082320876798154814105170332405472466564;
 
 /* pi/2:  90 degrees in radians */
Index: /trunk/MagicSoft/Cosy/base/timer.cc
===================================================================
--- /trunk/MagicSoft/Cosy/base/timer.cc	(revision 1759)
+++ /trunk/MagicSoft/Cosy/base/timer.cc	(revision 1760)
@@ -13,4 +13,6 @@
     fMs = tv_usec;
 
+    SetMjd((fMs+fSecs)/(60*60*24) + 40587);
+
     fSec  = tv_sec%60;
     tv_sec /= 60;
@@ -22,17 +24,15 @@
     tv_sec /= 24;
 
-    Set(tv_sec + 40587);
-
-    fDiv = fmod((fMs+fSecs)/(60*60*24), 1.0);
+//    fDiv = fmod((fMs+fSecs)/(60*60*24), 1.0);
 }
-
+/*
 void Timer::Set(const long mjd)
 {
+    SetMjd(mjd);
+
     //
     // Express day in Gregorian calendar
     //  (taken from slalib slaDjcl)
     //
-    fMjd = mjd;
-
     const long jd   = mjd + 2400001;
     const long n4   = (((((jd*4-17918)/146097)*6)/4+1)/2+jd-37)*4;
@@ -43,5 +43,5 @@
     fDay = (nd10%306)/10 + 1;
 }
-
+*/
 void Timer::SetTimer(const struct timeval *tv)
 {
@@ -77,5 +77,17 @@
 void Timer::SetMjd(double mjd)
 {
-    Set((long)mjd);
+    //
+    // Express day in Gregorian calendar
+    //  (taken from slalib slaDjcl)
+    //
+    fMjd = mjd;
+
+    const long jd   = (long)mjd + 2400001;
+    const long n4   = (((((jd*4-17918)/146097)*6)/4+1)/2+jd-37)*4;
+    const long nd10 = (((n4-237)%1461)/4)*10+5;
+
+    fYea = n4/1461 - 4712;
+    fMon = ((nd10/306+2)%12) + 1;
+    fDay = (nd10%306)/10 + 1;
 
     fDiv = fmod(mjd, 1.0);
@@ -84,13 +96,13 @@
 
     mjd *= 24;
-    fHor = (int)mjd;
+    fHor = (int)fmod(mjd, 24);
 
     mjd *= 60;
-    fMin = (int)mjd;
+    fMin = (int)fmod(mjd, 60);
 
     mjd *= 60;
-    fSec = (int)mjd;
+    fSec = (int)fmod(mjd, 60);
 
-    fMs = mjd * 1000;
+    fMs = fmod(mjd * 1000, 1000);
 }
 
Index: /trunk/MagicSoft/Cosy/base/timer.h
===================================================================
--- /trunk/MagicSoft/Cosy/base/timer.h	(revision 1759)
+++ /trunk/MagicSoft/Cosy/base/timer.h	(revision 1760)
@@ -22,5 +22,5 @@
     char fDateStr[30];
 
-    void Set(const long mjd);
+    //void Set(const long mjd);
 
 public:
@@ -36,5 +36,5 @@
 
     double Now(); //[s]
-    double GetMjd() const { return fMjd+fDiv; }
+    double GetMjd() const { return fMjd/*+fDiv*/; }
 
     virtual void SetMjd(double mjd);
Index: /trunk/MagicSoft/Cosy/gui/MGAccuracy.cc
===================================================================
--- /trunk/MagicSoft/Cosy/gui/MGAccuracy.cc	(revision 1759)
+++ /trunk/MagicSoft/Cosy/gui/MGAccuracy.cc	(revision 1760)
@@ -206,5 +206,5 @@
     int rs = (int)floor(fmod(dist, 60.));
     dist /= 60.;
-    int rm = (int)floor(fmod(dist, 60.));
+    int rm = (int)dist;//floor(fmod(dist, 60.));
 
     char txt[100];
Index: /trunk/MagicSoft/Cosy/gui/MGCosy.cc
===================================================================
--- /trunk/MagicSoft/Cosy/gui/MGCosy.cc	(revision 1759)
+++ /trunk/MagicSoft/Cosy/gui/MGCosy.cc	(revision 1760)
@@ -14,4 +14,5 @@
 #include <TGLabel.h>       // TGLabel
 #include <TGListBox.h>     // TGListBox
+#include <TGComboBox.h>    // TGComboBox
 #include <TG3DLine.h>      // TGHorizontal3DLine (TGSplitter)
 #include <TGTextEntry.h>   // TGTextEntry
@@ -53,5 +54,7 @@
     kPB_LoadBending,
     kPB_ResetBending,
-    kPB_CALIBSE
+    kPB_CALIBSE,
+    kCB_PredefPos
+
 };
 
@@ -306,4 +309,36 @@
 }
 
+void MGCosy::CreatePredefinedPos(TGCompositeFrame *tf1)
+{
+    TGComboBox *box = new TGComboBox(tf1, kCB_PredefPos);
+    box->Resize(120, 20);
+    box->Associate(this);
+
+    TGLayoutHints *lay = new TGLayoutHints(kLHintsLeft|kLHintsTop,
+                                            27, 0, 200, 0);
+    tf1->AddFrame(box, lay);
+
+    fList->Add(box);
+    fList->Add(lay);
+
+    ifstream fin("prepos.txt");
+    if (!fin)
+    {
+        cout << "ERROR: Predifined posiion in 'prepos.txt' not found." << endl;
+        return;
+    }
+
+    int i=0;
+    while (!fin.eof())
+    {
+        TString str;
+        Double_t zd, az;
+        fin >> str >> zd >> az;
+        box->AddEntry(str, i++);
+
+        fStarList.Add(zd, az);
+    }
+}
+
 void MGCosy::CreateTabs(TGTab *fTab)
 {
@@ -317,4 +352,6 @@
     fCZdAz->Move(27, 105);
     fList->Add(fCZdAz);
+
+    CreatePredefinedPos(tf1);
 
     fCRaDec = new MGCoordinates(tf2, kETypeRaDec);
@@ -866,4 +903,6 @@
     time.Now();
 
+    static char oldtxt[256];
+
     char text[256];
 
@@ -875,10 +914,20 @@
         dot[2] = 0;
 
-    fUtc->SetText(new TGString(text));
-
+    if (strcmp(oldtxt, text))
+    {
+        fUtc->SetText(new TGString(text));
+        strcpy(oldtxt, text);
+    }
+
+    static long oldmjd;
     double mjd = time.GetMjd();
 
-    sprintf(text, "%12.6f", mjd);
-    fMjd->SetText(new TGString(text));
+    if (oldmjd != 1000000*mjd)
+    {
+        sprintf(text, "%12.6f", mjd);
+        fMjd->SetText(new TGString(text));
+
+        oldmjd = (long)(1000000*mjd);
+    }
 
     return mjd;
@@ -1098,4 +1147,14 @@
         switch (GET_SUBMSG(msg))
         {
+        case kCM_COMBOBOX:
+            if (mp1==kCB_PredefPos)
+            {
+                MStar *pos = fStarList[mp2];
+                if (!pos)
+                    return kTRUE;
+                fCZdAz->SetCoordinates(ZdAz(pos->GetX(), pos->GetY()));
+            }
+            return kTRUE;
+
         case kCM_TAB:
             //cout << "Tab: " << mp1 << endl;
Index: /trunk/MagicSoft/Cosy/gui/MGCosy.h
===================================================================
--- /trunk/MagicSoft/Cosy/gui/MGCosy.h	(revision 1759)
+++ /trunk/MagicSoft/Cosy/gui/MGCosy.h	(revision 1760)
@@ -7,5 +7,9 @@
 
 #ifndef MARS_MObservatory
-#include <MObservatory.h>
+#include "MObservatory.h"
+#endif
+
+#ifndef COSY_MStarList
+#include "MStarList.h"
 #endif
 
@@ -64,4 +68,6 @@
     TGLabel       *fMjd;
 
+    MStarList     fStarList;
+
     MGCoordinates *fCZdAz;
     MGCoordinates *fCRaDec;
@@ -94,4 +100,5 @@
     void CreateLabel(TGCompositeFrame *f);
     void CreateTabs(TGTab *fTab);
+    void CreatePredefinedPos(TGCompositeFrame *tf1);
 
     void StartPos();
Index: /trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc
===================================================================
--- /trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc	(revision 1759)
+++ /trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc	(revision 1760)
@@ -69,4 +69,11 @@
     InitArc(fSaturn,  1001, kYellow/*17*/, 16);
 
+    for (int i=0; i<13; i++)
+    {
+        fStars[i] = new TArc(0, 0, 1);
+        InitArc(fStars[i], 1001, kWhite, kWhite);
+        fList->Add(fStars[i]);
+    }
+
     for (int i=0; i<4; i++)
     {
@@ -97,4 +104,29 @@
 }
 
+void MGSkyPosition::UpdateStars()
+{
+    RaDec stars[13];
+
+    // 32349   Sirius           -1.44 1.45    2.64      0.009   A0m
+    stars[0] = RaDec(MObservatory::Hms2Rad(  6, 45, 0), MObservatory::Dms2Rad(-16, 42, 0));
+    // 30438   Canopus          -0.62 -5.53   95.88     0.164   F0Ib
+    stars[1] = RaDec(MObservatory::Hms2Rad(  6, 23, 0), MObservatory::Dms2Rad(-52, 41, 0));
+    // 69673   Arcturus         -0.05 -0.31   11.25     1.239   K2IIIp
+    stars[2] = RaDec(MObservatory::Hms2Rad( 14, 15, 0), MObservatory::Dms2Rad( 19, 10, 0));
+    stars[3] = RaDec(MObservatory::Hms2Rad( 01, 37, 6), MObservatory::Dms2Rad(-57, 14, 0));
+    stars[4] = RaDec(MObservatory::Hms2Rad( 12, 26, 6), MObservatory::Dms2Rad(-63, 06, 0));
+    stars[5] = RaDec(MObservatory::Hms2Rad( 13, 25, 2), MObservatory::Dms2Rad(-11, 10, 0));
+    stars[6] = RaDec(MObservatory::Hms2Rad(  5, 14, 0), MObservatory::Dms2Rad(- 8, 12, 5));
+    stars[7] = RaDec(MObservatory::Hms2Rad( 19, 50, 0), MObservatory::Dms2Rad(- 8, 52, 6));
+    stars[8] = RaDec(MObservatory::Hms2Rad( 18, 37, 0), MObservatory::Dms2Rad( 38, 47, 0));
+    stars[9] = RaDec(MObservatory::Hms2Rad(  5, 16, 0), MObservatory::Dms2Rad( 46, 00, 0));
+    stars[10] = RaDec(MObservatory::Hms2Rad(  7, 39, 0), MObservatory::Dms2Rad(  5, 14, 0));
+    stars[11] = RaDec(MObservatory::Hms2Rad(  5, 55, 0), MObservatory::Dms2Rad(  7, 24, 0));
+    stars[12] = RaDec(MObservatory::Hms2Rad( 19, 50, 0), MObservatory::Dms2Rad(  8, 52, 0));
+
+    for (int i=0; i<13; i++)
+        SetDot(fStars[i], stars[i], 0);
+
+}
 void MGSkyPosition::InitText()
 {
@@ -327,4 +359,6 @@
     UpdatePlanet(kESaturn,  fSaturn);
 
+    UpdateStars();
+
     RaDec radec = fSlaStar->CalcRaDecFast(pos*kDeg2Rad);
 
Index: /trunk/MagicSoft/Cosy/gui/MGSkyPosition.h
===================================================================
--- /trunk/MagicSoft/Cosy/gui/MGSkyPosition.h	(revision 1759)
+++ /trunk/MagicSoft/Cosy/gui/MGSkyPosition.h	(revision 1760)
@@ -35,4 +35,6 @@
     TArc       *fSaturn;
 
+    TArc       *fStars[13];
+
     TArc       *fSaturnRing;
 
@@ -67,4 +69,5 @@
     void SetDot(TArc *arc, RaDec &radec, Int_t off);
 
+    void UpdateStars();
     void UpdateText(Float_t zd, Float_t az);
     void UpdatePlanet(Int_t planet, TArc *arc);
Index: /trunk/MagicSoft/Cosy/main/MCosy.cc
===================================================================
--- /trunk/MagicSoft/Cosy/main/MCosy.cc	(revision 1759)
+++ /trunk/MagicSoft/Cosy/main/MCosy.cc	(revision 1760)
@@ -1,2 +1,3 @@
+#include "MCosy.h"
 #include "MCosy.h"
 
@@ -307,5 +308,4 @@
     if (HasZombie())
         return;
-
     SetStatus(MCosy::kMoving);
 
@@ -408,7 +408,18 @@
 
     const ZdAz d = dst*kRad2Deg;
-    if (d.Zd()<fMin.Zd() || d.Zd()>fMax.Zd() || d.Az()<fMin.Az() || d.Az()>fMax.Az())
-    {
-        lout << "ERROR: Requested Position not inside allowed range." << endl;
+
+    lout << "Target Position: " << d.Zd() << "deg, " << d.Az() << "deg (Zd/Az)" << endl;
+
+    if (d.Zd()<fMin.Zd() || d.Zd()>fMax.Zd())
+    {
+        lout << "ERROR: Requested Zenith Angle (" << d.Zd() << "deg) not ";
+        lout << "inside allowed range." << endl;
+        return kFALSE;
+    }
+
+    if (d.Az()<fMin.Az() || d.Az()>fMax.Az())
+    {
+        lout << "ERROR: Requested Azimuth Angle (" << d.Az() << "deg) not ";
+        lout << "inside allowed range." << endl;
         return kFALSE;
     }
@@ -445,5 +456,4 @@
     fZdAzSoll = dst;
 
-    lout << "Positioning to Target..." << endl;
     cout << "Source        Zd: " << src.Zd()  << "se  Az:" << src.Az()  << "se" << endl;
     cout << "Destination   Zd: " << Rad2SE(dst.Zd()) << "se  Az:" << Rad2SE(dst.Az())  << "se" << endl;
@@ -451,6 +461,9 @@
     cout << "Shortest Dest Zd: " << dest.Zd() << "se  Az:" << dest.Az() << "se" << endl;
 
-    for (int i=0; i<10 && !(Break() || HasError()) && !HasZombie(); i++)
-    {
+    int i;
+    for (i=0; i<10 && !(Break() || HasError()) && !HasZombie(); i++)
+    {
+
+        lout << "Step #" << i << endl;
         //
         // Get Shaft Encoder Positions
@@ -491,8 +504,9 @@
         // at the same time
         //
+        lout << "SetVelocity" << endl;
         if (i)
             SetPosVelocity(1.0, 0.1, 0.1);
         else
-            SetPosVelocity(fabs(rd.Ratio()), 0.9, 0.5);
+            SetPosVelocity(fabs(rd.Ratio()), 0.1, 0.3);
 
         rd.Round();
@@ -511,9 +525,12 @@
         // repositioning (relative)
         //
+        lout << "Do Relative Positioning Done" << endl;
         DoRelPos(rd, cdzd, cdaz);
+
+        lout << "Relative Positioning Done" << endl;
     }
 
     StopMovement();
-    lout << "Warning: Requested position not reached." << endl;
+    lout << "Warning: Requested position not reached (i=" << i << ")" << endl;
     return FALSE;
 }
@@ -670,4 +687,6 @@
 void MCosy::TrackPosition(const RaDec &dst) // ra, dec [rad]
 {
+    lout << "Track Position: " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg << "deg (Ra/Dec)" << endl;
+
     SlaStars sla(fObservatory);
 
@@ -733,5 +752,6 @@
     // We want to reach the theoretical position exactly in about 0.5s
     //
-    const float dt = 1;  // 1 second
+    // *OLD*const float dt = 1;  // 1 second
+    const float dt = 3;  // 1 second
     while (!(Break() || HasError()) && !HasZombie())
     {
@@ -751,7 +771,17 @@
         dest *= kGearRatio;  // [re]
 
-        if (d.Zd()<fMin.Zd() || d.Zd()>fMax.Zd() || d.Az()<fMin.Az() || d.Az()>fMax.Az())
+        ZdAz min = fBending(fMin/kRad2Deg)*kRad2Deg;
+        ZdAz max = fBending(fMax/kRad2Deg)*kRad2Deg;
+
+        if (d.Zd()<min.Zd() || d.Az()<min.Az())
         {
             lout << "ERROR: Calculated position for T+dt not inside allowed range." << endl;
+            lout << "<  " << d.Zd() << " " << min.Zd() << "  " << d.Az() << " " << min.Az()  << endl;
+            break;
+        }
+        if (d.Zd()>max.Zd() || d.Az()>max.Az())
+        {
+            lout << "ERROR: Calculated position for T+dt not inside allowed range." << endl;
+            lout << ">  " <<  d.Zd() << " " << max.Zd() << "  " << d.Az() << " " << max.Az()  << endl;
             break;
         }
@@ -777,5 +807,5 @@
         // correct for the duration of RaDec2AltAz
         //
-        const ZdAz v = dest*60.0/(dt-(fMac2->GetTime()-sla));
+        const ZdAz v = dest*60.0/(dt/*-(fMac2->GetTime()-sla)*/);
 
         //
@@ -830,4 +860,5 @@
         //
         usleep(50000); // 0.05s
+        //usleep(500000); // 0.5s
     }
 
@@ -876,5 +907,7 @@
 bool MCosy::CheckNetwork()
 {
+    return kTRUE;
     //CheckConnections();
+
     if (HasZombie())
     {
@@ -1034,4 +1067,6 @@
         else
         {
+            cout << "HOME NOT ALLOWED... for Magic." << endl;
+            /*
             cout << "Going Home..." << endl;
             TEnv env(".cosyrc");
@@ -1053,4 +1088,5 @@
             fMac2->ReqPos();
             fMac3->StopMotor();
+            */
         }
         cout << "WM_Home: done. (return 0x403e)" << endl;
@@ -1065,5 +1101,5 @@
 
             XY xy = *((XY*)mp);
-            RaDec rd(xy.X()*15., xy.Y());
+            RaDec rd(xy.X()*15., xy.Y()); // [deg]
 
             ZdAz a0 = sla.CalcZdAz(rd*kDeg2Rad);
@@ -1109,12 +1145,12 @@
 
     cout << "Reading telescope range..." << flush;
-    const Double_t amin = env.GetValue("Az_Min", -90.0);
-    const Double_t zmin = env.GetValue("Zd_Min", -90.0);
+    const Double_t amin = env.GetValue("Az_Min[deg]", -74.5);
+    const Double_t zmin = env.GetValue("Zd_Min[deg]", -90.0);
     fMin.Set(zmin, amin);
 
     cout << " Min: " << zmin << "deg  " << amin << "deg" << endl;
 
-    const Double_t amax = env.GetValue("Az_Max", 318.0);
-    const Double_t zmax = env.GetValue("Zd_Max", 100.0);
+    const Double_t amax = env.GetValue("Az_Max[deg]", 318.0);
+    const Double_t zmax = env.GetValue("Zd_Max[deg]", 100.5);
     fMax.Set(zmax, amax);
 
@@ -1155,6 +1191,6 @@
         resseaz = env.GetValue("Az_ResSE[se/U_mot]", 16384);
 
-    kGearRatio.Set (gzd*resrezd/ressezd, gaz*resreaz/resseaz);  //[re/se]
-    kGearRatio2.Set(gzd*resrezd/360.0,   gaz*resreaz/360.0);    //[re/deg]
+    kGearRatio.Set (gzd*resrezd*4/ressezd, gaz*resreaz*4/resseaz);  //[re/se]
+    kGearRatio2.Set(gzd*resrezd*4/360.0,   gaz*resreaz*4/360.0);    //[re/deg]
     cout << "done." << endl;
 
@@ -1183,8 +1219,14 @@
 void MCosy::TalkThreadTracking()
 {
-    if (fZd1->IsZombieNode() || fZd2->IsZombieNode() || fAz->IsZombieNode())
+    if (fZd1->IsZombieNode() && fZd2->IsZombieNode())
         return;
+
+    if (fAz->IsZombieNode())
+        return;
+
     if (!fMac1 || !fMac2)
         return;
+
+    lout << "Tracking Thread started..." << endl;
 
     SlaStars sla(fObservatory);
@@ -1223,5 +1265,5 @@
         {
             phca1 = fZd1->PosHasChanged();
-            phca2 = fZd2->PosHasChanged();
+//            phca2 = fZd2->PosHasChanged();
             phcaz = fAz->PosHasChanged();
             usleep(1);
@@ -1250,8 +1292,12 @@
         // FIXME: I cannot take the avarage
         //
+        // FIXME
+        time.Zd(fZd1->GetMjd());
+        /* OLD*
         if (fZd1->GetMjd()>fZd2->GetMjd())
             time.Zd(fZd1->GetMjd());
         else
             time.Zd(fZd2->GetMjd());
+        */
         //time.Zd((fZd1->GetMjd()+fZd2->GetMjd())/2.0);
         time.Az(fAz->GetMjd());
@@ -1281,5 +1327,5 @@
         }
 
-        ZdAz soll(sollzd.Zd(), sollaz.Az());
+        ZdAz soll(sollzd.Zd(), sollaz.Az()); // [se]
         fZdAzSoll = fBending.CorrectBack(soll*2*TMath::Pi()/16384);
 
@@ -1603,4 +1649,11 @@
     lout << "- Starting GUI." << endl;
     fWin=new MGCosy(fObservatory, this, gClient->GetRoot(), 1, 1);
+}
+
+bool MCosy::HasZombie() const
+{
+    bool ses = fZd1->IsZombieNode() & fZd2->IsZombieNode();
+
+    return fMac1->IsZombieNode() | fMac2->IsZombieNode() | fAz->IsZombieNode() | ses;
 }
 
Index: /trunk/MagicSoft/Cosy/main/MCosy.h
===================================================================
--- /trunk/MagicSoft/Cosy/main/MCosy.h	(revision 1759)
+++ /trunk/MagicSoft/Cosy/main/MCosy.h	(revision 1760)
@@ -161,4 +161,6 @@
     bool CheckNetwork();
 
+    virtual bool HasZombie() const;
+
 public:
     MCosy(int mode, const char *dev, const int baud, MLog &out=gLog);
