Index: /BAORadio/libindi/libindi/.directory
===================================================================
--- /BAORadio/libindi/libindi/.directory	(revision 696)
+++ /BAORadio/libindi/libindi/.directory	(revision 697)
@@ -1,6 +1,6 @@
 [Dolphin]
-Timestamp=2012,9,13,22,1,51
+Timestamp=2012,10,21,16,15,23
+Version=3
 
 [Settings]
-HiddenFilesShown=true
 ShowDotFiles=false
Index: /BAORadio/libindi/libindi/.kdev4/libindi.kdev4
===================================================================
--- /BAORadio/libindi/libindi/.kdev4/libindi.kdev4	(revision 696)
+++ /BAORadio/libindi/libindi/.kdev4/libindi.kdev4	(revision 697)
@@ -3,11 +3,63 @@
 
 [CMake]
-BuildDirs=/home/richard/libindi/libindi_build
+Build Directory Count=3
 CMakeDir=/usr/share/cmake-2.8/Modules
-Current CMake Binary=file:///usr/bin/cmake
-CurrentBuildDir=file:///home/richard/libindi/libindi_build
-CurrentBuildType=
-CurrentInstallDir=file:///usr
+Current Build Directory Index=2
 ProjectRootRelative=./
+
+[CMake][CMake Build Directory 0]
+Build Directory Path=file:///home/richard/libindi/libindi_build
+Build Type=Release
+CMake Binary=file:///usr/bin/cmake
+Install Directory=file:///usr/local
+
+[CMake][CMake Build Directory 1]
+Build Directory Path=file:///home/richard/BAORadio/libindi/libindi/build
+Build Type=Debug
+CMake Binary=file:///usr/bin/cmake
+Environment Profile=
+Extra Arguments=
+Install Directory=file:///usr/local
+
+[CMake][CMake Build Directory 2]
+Build Directory Path=file:///home/richard/BAORadio/libindi/libindi/libindi_build
+Build Type=
+CMake Binary=file:///usr/bin/cmake
+Environment Profile=
+Extra Arguments=
+Install Directory=file:///usr
+
+[Launch]
+Launch Configurations=Launch Configuration 0
+
+[Launch][Launch Configuration 0]
+Configured Launch Modes=execute
+Configured Launchers=nativeAppLauncher
+Name=Nouvelle configuration Application native
+Type=Native Application
+
+[Launch][Launch Configuration 0][Data]
+Arguments=/home/richard/BAORadio/libindi/libindi/libindi_build/indi_BAO
+Debugger Shell=
+Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00)
+Dependency Action=Nothing
+Display Demangle Names=true
+Display Static Members=false
+EnvironmentGroup=default
+Executable=file:///home/richard/BAORadio/libindi/libindi/libindi_build/indiserver
+External Terminal=konsole --noclose --workdir %workdir -e %exe
+GDB Path=
+Project Target=libindi,indi_BAO
+Remote GDB Config Script=
+Remote GDB Run Script=
+Remote GDB Shell Script=
+Start With=ApplicationOutput
+Use External Terminal=false
+Working Directory=file:///home/richard/BAORadio/libindi/libindi/libindi_build
+isExecutable=true
+
+[MakeBuilder]
+Install As Root=true
+Su Command=2
 
 [Project]
Index: /BAORadio/libindi/libindi/BAOTest/BAOtest_main.cpp
===================================================================
--- /BAORadio/libindi/libindi/BAOTest/BAOtest_main.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/BAOTest/BAOtest_main.cpp	(revision 697)
@@ -18,5 +18,25 @@
 #include <netinet/in.h>
 
-//#define POSITIONS_DIRECT  
+
+// Faut-il simuler grossiÃšrement le mouvement de l'antenne  qui ne va pas directement sur l'objet ?
+
+#define POSITIONS_DIRECTES false
+
+// Erreurs alÃ©atoires ?
+
+#define ERREURS_ALEATOIRES false
+
+// Erreurs du type : le microcontrÃŽleur envoie une trame incomplÃšte...
+
+#define ERREURS_TRAMES false
+
+// Affichage ?
+
+#define AFFICHAGE true
+
+// Au bout de combien de trames en moyenne arrive une erreur ?
+
+#define ERREURS 10
+
 
 using namespace std;
@@ -77,5 +97,5 @@
         result.y=atoi(str.substr(7, 4).c_str());
 
-	if (str[1]=='f') result.x=-result.x;
+        if (str[1]=='f') result.x=-result.x;
 
         if (str[6]=='f') result.y=-result.y;
@@ -128,5 +148,5 @@
 ***************************************************************************************/
 
-#define ERREURS 10
+
 
 int main ( int argc, char *argv[] )
@@ -135,19 +155,19 @@
     char cIP;
     char IP[20];
-    bool Aleat;
-
-    // Parametres sups
-    bool ErreursAleatoires=false;
-    bool Affichage=true;
+    bool Erreurs_Aleatoires;
+    bool Erreurs_Trames;
+
 
     // Position PARK
-    Pos.x=0;
-    Pos.y=0;
-
-    NouvPos.x=100;
-    NouvPos.y=100;
+    
+    Pos.x     = 0;
+    Pos.y     = 0;
+
+    NouvPos.x = 100;
+    NouvPos.y = 100;
 
     //init nbs aleÌatoires
-    if (ErreursAleatoires) srand(time(NULL));
+    
+    if (ERREURS_ALEATOIRES) srand(time(NULL));
 
 
@@ -159,5 +179,6 @@
     std::cout <<  "1)-  192.168.0.1\n";
     std::cout <<  "2)-  127.0.0.1\n\n? ";
-    std::cin >> cIP;
+    
+    std::cin  >>  cIP;
 
     if (cIP=='1') strcpy(IP, "192.168.0.1");
@@ -173,5 +194,5 @@
 
         std::string reply;
-        std::string asks,memasks;
+        std::string asks, memasks;
         char chaine[5000];
 
@@ -182,40 +203,49 @@
 
             int pos=asks.find("\n");
+	    
             memasks=asks;
 
             while ((pos!=string::npos) && (asks.length()>1))
             {
-                memasks=asks.substr(pos+1);
-                asks=asks.substr(0,pos);
+                memasks = asks.substr(pos+1);
+                asks    = asks.substr(0,pos);
 
                 strcpy(chaine, "");
 
-#ifndef POSITIONS_DIRECT
-                if (abs(Pos.x - NouvPos.x) < 5 )
-		{
-                    if (Pos.x - NouvPos.x < 0) Pos.x--;
-                    if (Pos.x - NouvPos.x > 0) Pos.x++;
-                }
-                else
-                {
-                    Pos.x -= (NouvPos.x - Pos.x) / 6.0;
-                }
-
-                if (abs(Pos.y - NouvPos.y) < 5 )
-                {
-                    if (Pos.y - NouvPos.y < 0) Pos.y--;
-                    if (Pos.y - NouvPos.y > 0) Pos.y++;
-                }
-                else
-                {
-                    Pos.y -= (NouvPos.y - Pos.y) / 6.0;
-                }
-#endif
+                if ( !POSITIONS_DIRECTES)
+                {
+                    if (abs(Pos.x - NouvPos.x) < 5 )
+                    {
+                        if (Pos.x - NouvPos.x < 0) Pos.x--;
+                        if (Pos.x - NouvPos.x > 0) Pos.x++;
+                    }
+                    else
+                    {
+                        Pos.x -= (NouvPos.x - Pos.x) / 6.0;
+                    }
+
+                    if (abs(Pos.y - NouvPos.y) < 5 )
+                    {
+                        if (Pos.y - NouvPos.y < 0) Pos.y--;
+                        if (Pos.y - NouvPos.y > 0) Pos.y++;
+                    }
+                    else
+                    {
+                        Pos.y -= (NouvPos.y - Pos.y) / 6.0;
+                    }
+                }
+
+                Erreurs_Aleatoires = false;
+
+                if (ERREURS_ALEATOIRES) Erreurs_Aleatoires = rand()%ERREURS == 1;
+                
+		Erreurs_Trames = false;
+
+                if (ERREURS_TRAMES) Erreurs_Trames = rand()%ERREURS == 1;
 		
-
-                if (ErreursAleatoires) Aleat=rand()%ERREURS != 1;
-                else Aleat=1;
-
-                if (Affichage) std::cout <<  "Pilote BAO : " << asks << "\n" ;
+		int position_erreur = 2 + rand() % 3;
+		
+		
+                if (AFFICHAGE) std::cout <<  "Pilote BAO : " << asks << "\n" ;
 
 
@@ -224,9 +254,12 @@
 
                     strcpy(chaine,"ACK/POSITION\n");
-                    client_socket << chaine;
-
-                    if (Affichage) std::cout <<  "MicrocontroÌleur : " << chaine;
-
-                    if (Aleat)
+		    
+		    if (Erreurs_Trames) { strncpy(chaine, chaine, position_erreur ); chaine[position_erreur] = '\n'; chaine[position_erreur + 1] = 0; }
+		    
+                    client_socket << chaine;
+
+                    if (AFFICHAGE) std::cout <<  "MicrocontroÌleur : " << chaine;
+
+                    if (!Erreurs_Aleatoires)
                     {
                         sprintf(chaine, "POSITION/%05i/%05i/\n", Pos.x, Pos.y);
@@ -240,19 +273,27 @@
                 if (asks.find("G")!=string::npos)
                 {
-#ifndef POSITIONS_DIRECT
-                 NouvPos = ExtractPosition2(asks);
+                    if (!POSITIONS_DIRECTES)
+                    {
+                        NouvPos = ExtractPosition2(asks);
 
                         NouvPos.x += Pos.x;
                         NouvPos.y += Pos.y;
-#else 
-	       
-	       Pos2 = ExtractPosition2(asks);
-	       Pos.x-=Pos2.x;
-               Pos.y-=Pos2.y;
-#endif
+                    }
+                    else
+                    {
+
+                        Pos2 = ExtractPosition2(asks);
+			
+                        Pos.x -= Pos2.x;
+                        Pos.y -= Pos2.y;
+                    }
+                    
                     strcpy(chaine,"ACK/GOTO/\n");
-                    client_socket << chaine;
-
-                    if (Affichage)
+		    
+		    if (Erreurs_Trames) { strncpy(chaine, chaine, position_erreur ); chaine[position_erreur] = '\n'; chaine[position_erreur + 1] = 0; }
+		    
+                    client_socket << chaine;
+
+                    if (AFFICHAGE)
                     {
                         std::cout <<  "MicrocontroÌleur : " << chaine;
@@ -261,5 +302,5 @@
                     }
 
-                    if (Aleat)
+                    if (!Erreurs_Aleatoires)
                     {
                         strcpy(chaine, "OK/GOTO/\n");
@@ -273,11 +314,13 @@
                 if (asks.find("Z")!=string::npos)
                 {
-
                     strcpy(chaine, "ACK/PARK\n");
-                    client_socket << chaine;
-
-                    if (Affichage) std::cout <<  "MicrocontroÌleur : " << chaine;
-
-                    if (Aleat)
+		    
+		    if (Erreurs_Trames) { strncpy(chaine, chaine, position_erreur ); chaine[position_erreur] = '\n'; chaine[position_erreur + 1] = 0; }
+		    
+                    client_socket << chaine;
+
+                    if (AFFICHAGE) std::cout <<  "MicrocontroÌleur : " << chaine;
+
+                    if (!Erreurs_Aleatoires)
                     {
                         strcpy(chaine, "OK/PARK/\n");
@@ -293,9 +336,12 @@
 
                     strcpy(chaine,"ACK/ABORT\n");
-                    client_socket << chaine;
-
-                    if (Affichage) std::cout <<  "MicrocontroÌleur : " << chaine;
-
-                    if (Aleat)
+		    
+		    if (Erreurs_Trames) { strncpy(chaine, chaine, position_erreur ); chaine[position_erreur] = '\n'; chaine[position_erreur + 1] = 0; }
+		    
+                    client_socket << chaine;
+
+                    if (AFFICHAGE) std::cout <<  "MicrocontroÌleur : " << chaine;
+
+                    if (!Erreurs_Aleatoires)
                     {
                         strcpy(chaine, "OK/ABORT/\n");
@@ -307,9 +353,11 @@
                 }
 
-                if (strlen(chaine)>1)
-                {
-                    client_socket << chaine;
-
-                    if (Affichage)
+                if ( strlen(chaine) >1 )
+                {
+		    if (Erreurs_Trames) { strncpy(chaine, chaine, position_erreur ); chaine[position_erreur] = '\n'; chaine[position_erreur + 1] = 0; }
+		  
+                    client_socket << chaine;
+
+                    if (AFFICHAGE)
                     {
                         std::cout <<  "MicrocontroÌleur : " << chaine;
@@ -319,6 +367,7 @@
                 }
 
-                asks=memasks;
-                pos=asks.find("\n");
+                asks = memasks;
+		
+                pos  = asks.find("\n");
             }
 
Index: /BAORadio/libindi/libindi/BAOcontrol/BAOcontrol.pro
===================================================================
--- /BAORadio/libindi/libindi/BAOcontrol/BAOcontrol.pro	(revision 696)
+++ /BAORadio/libindi/libindi/BAOcontrol/BAOcontrol.pro	(revision 697)
@@ -1,4 +1,4 @@
 ######################################################################
-# Automatically generated by qmake (2.01a) Thu Sep 27 14:47:45 2012
+# Automatically generated by qmake (2.01a) lun. oct. 22 16:02:51 2012
 ######################################################################
 
Index: /BAORadio/libindi/libindi/BAOcontrol/Makefile
===================================================================
--- /BAORadio/libindi/libindi/BAOcontrol/Makefile	(revision 696)
+++ /BAORadio/libindi/libindi/BAOcontrol/Makefile	(revision 697)
@@ -1,5 +1,5 @@
 #############################################################################
 # Makefile for building: BAOcontrol
-# Generated by qmake (2.01a) (Qt 4.8.1) on: Thu Sep 27 14:47:45 2012
+# Generated by qmake (2.01a) (Qt 4.8.3) on: lun. oct. 22 16:02:51 2012
 # Project:  BAOcontrol.pro
 # Template: app
Index: /BAORadio/libindi/libindi/BAOcontrol/baocontrol.cpp
===================================================================
--- /BAORadio/libindi/libindi/BAOcontrol/baocontrol.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/BAOcontrol/baocontrol.cpp	(revision 697)
@@ -177,5 +177,5 @@
     a=15.0*(18.0+36.0/60.0+56.3/3600.0)*Pidiv180;
     b=(38.0+47.0/60.0+3.1/3600.0)*Pidiv180;
-    
+
     a= 3.61082;
     b=0.860677;
@@ -192,5 +192,5 @@
     a22=5.55106;
     b22=0.699053;
-    
+
     a=4.87356;
     b=0.676912;
@@ -198,10 +198,10 @@
     b22=0.579795;
 
-    
+
     a=3.73351;
     b=0.334748;
     a22=3.61661;
     b22=0.241758;
-    
+
 
     //a=15.0*(18.0+37.0/60.0+22.0/3600.0)*Pidiv180;
@@ -259,5 +259,5 @@
     AfficherLog(os.str(), true);
     */
-    
+
 
 
@@ -609,95 +609,89 @@
 {
     stringstream os;
-    struct timeval tv;
-
-    // Tant que l'utilisateur n'a pas tapÃ© la commande 'exit'
-
-
-    {
-        // On actualise le jour julien et le temps sidÃ©ral local
-
-        UpdateTime();
-
-        // On rÃ©cupÃšre le jour julien
-
-        double JJ = GetJJ();
-
-
-        // Faut-il exÃ©cuter un fichier de mouvements ?
-
-        if (run && numobjets > 1 && runnum < numobjets)
-        {
-            // On lance le mouvement numÃ©ro runnum si la date et l'heure correspondent au dÃ©but
-            // de son exÃ©cution et que ce mouvement n'a pas Ã©tÃ© encore rÃ©alisÃ©
-
-            if ( JJ >= objets[runnum].JJ && !objets[runnum].exec )
-            {
-                // petit message pour l'utilisateur au dÃ©but de l'exÃ©cution du tout premier mouvement
-
-                if ( runnum == 1 ) AfficherLog("DÃ©but de l'exÃ©cution du fichier de mouvements\n\n", true);
-
-                os << "Suivi de l'objet nÂ°" << runnum << endl;
-
-                AfficherLog(&os, true);
-
-                // on note que le mouvement est en cours d'exÃ©cution
-                // ou qu'il a Ã©tÃ© dÃ©jÃ  exÃ©cutÃ©
-
-                objets[runnum].exec = true;
-
-                // on pointe l'objet correspondant
-
-                Goto( objets[runnum].ad, objets[runnum].de, Transit, J2000 );
-            }
-
-
-            // On arrive Ã  la fin de l'exÃ©cution du mouvements runnum
-
-            if (JJ >= objets[runnum].JJ + objets[runnum].Duree / 3600.0 / 24.0 )
-            {
-                // On interrompt le mouvement
-
-                Abort();
-
-                // S'il s'agit du dernier mouvement -> Fin de la commande run
-
-                if ( runnum + 1 >= numobjets )
-                {
-                    AfficherLog("Fin de l'execution du fichier de mouvements\n\n", true);
-
-                    // on rÃ©affiche le prompt
-
-                    cout << endl;
-                    ChoixCouleurs==1 ? cout << blue1 : cout << blue2;
-                    cout << ">";
-
-                    // on rÃ©initialise toutes les variables impliquÃ©es dans la commande run
-
-                    run		= false;
-                    runnum	= 1;
-                    numobjets	= 1;
-
-                    // On sort du programme dans le cas de BAOControl -r fileName
-
-                    NoExit = !exitrun;
-                }
-                else
-                {
-                    // on passe au mouvement suivant
-
-                    runnum++;
-                }
-            }
-        }
-
-        // on lit et affiche la rÃ©ponse des micro-contrÃŽleurs
-
-        LireReponse();
-
-        // pause de 100 ms
-
-        // usleep(100000);
-    }
-
+   // struct timeval tv;
+
+
+    // On actualise le jour julien et le temps sidÃ©ral local
+
+    UpdateTime();
+
+    // On rÃ©cupÃšre le jour julien
+
+    double JJ = GetJJ();
+
+    // Faut-il exÃ©cuter un fichier de mouvements ?
+
+    if (run && numobjets > 1 && runnum < numobjets)
+    {
+        // On lance le mouvement numÃ©ro runnum si la date et l'heure correspondent au dÃ©but
+        // de son exÃ©cution et que ce mouvement n'a pas Ã©tÃ© encore rÃ©alisÃ©
+
+        if ( JJ >= objets[runnum].JJ && !objets[runnum].exec )
+        {
+            // petit message pour l'utilisateur au dÃ©but de l'exÃ©cution du tout premier mouvement
+
+            if ( runnum == 1 ) AfficherLog("DÃ©but de l'exÃ©cution du fichier de mouvements\n\n", true);
+
+            os << "Suivi de l'objet nÂ°" << runnum << endl;
+
+            AfficherLog(&os, true);
+
+            // on note que le mouvement est en cours d'exÃ©cution
+            // ou qu'il a Ã©tÃ© dÃ©jÃ  exÃ©cutÃ©
+
+            objets[runnum].exec = true;
+
+            // on pointe l'objet correspondant
+
+            Goto( objets[runnum].ad, objets[runnum].de, Transit, J2000 );
+        }
+
+
+        // On arrive Ã  la fin de l'exÃ©cution du mouvements runnum
+
+        if (JJ >= objets[runnum].JJ + objets[runnum].Duree / 3600.0 / 24.0 )
+        {
+            // On interrompt le mouvement
+
+            Abort();
+
+            // S'il s'agit du dernier mouvement -> Fin de la commande run
+
+            if ( runnum + 1 >= numobjets )
+            {
+                AfficherLog("Fin de l'execution du fichier de mouvements\n\n", true);
+
+                // on rÃ©affiche le prompt
+
+                cout << endl;
+                ChoixCouleurs==1 ? cout << blue1 : cout << blue2;
+                cout << ">";
+
+                // on rÃ©initialise toutes les variables impliquÃ©es dans la commande run
+
+                run		= false;
+                runnum	= 1;
+                numobjets	= 1;
+
+                // On sort du programme dans le cas de BAOControl -r fileName
+
+                NoExit = !exitrun;
+            }
+            else
+            {
+                // on passe au mouvement suivant
+
+                runnum++;
+            }
+        }
+    }
+
+    // on lit et affiche la rÃ©ponse des micro-contrÃŽleurs
+
+    LireReponse();
+
+    // pause de 100 ms
+
+    // usleep(100000);
 
 }
@@ -1049,5 +1043,5 @@
             return true;
         }
-        
+
         if (commande == "R")
         {
@@ -1704,5 +1698,7 @@
             // et donc la magnitude < MAGNITUDEMAXETOILESCALIBRATION
 
-            if ( Etoiles[i].selectionnee = ((Etoiles[i].ha > (HAUTMIN + 5.0 ) * Pidiv180) && (Etoiles[i].mag < MAGNITUDEMAXETOILESCALIBRATION)) )
+            Etoiles[i].selectionnee = ((Etoiles[i].ha > (HAUTMIN + 5.0 ) * Pidiv180) && (Etoiles[i].mag < MAGNITUDEMAXETOILESCALIBRATION));
+
+            if ( Etoiles[i].selectionnee )
             {
                 os.width(20);
@@ -1821,5 +1817,7 @@
         // L'utilisateur a fait suivre la commande goto de l'indication J2000
 
-        if (J2000 = (chaine.find("j2000") != string::npos))
+        J2000 = (chaine.find("j2000") != string::npos);
+
+        if ( J2000 )
         {
             AfficherLog("Prise en compte de la prÃ©cession, de la nutation et de l'aberration...\n", true);
@@ -2175,5 +2173,5 @@
             if (!EnvoyerCommande((string)commande, &Message))
             {
-                ErreurLog("Erreur ! La commande n'a pas un format correct !\n\n");
+                ErreurLog("Erreur ! La commande ne semble pas avoir Ã©tÃ© executÃ©e par l'antenne ou n'a pas un format correct !\n\n");
             }
             else
Index: /BAORadio/libindi/libindi/BAOcontrol/baoqt.cpp
===================================================================
--- /BAORadio/libindi/libindi/BAOcontrol/baoqt.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/BAOcontrol/baoqt.cpp	(revision 697)
@@ -112,6 +112,9 @@
 #endif
 
+#ifdef LAL 
+    ui->lineEditIP->setText("134.158.88.199");
+#else 
     ui->lineEditIP->setText("127.0.0.1");
-    //ui->lineEditIP->setText("134.158.88.199");
+#endif
 
     ui->lineEdit_2->setText((QString("BAORadio, LAL, version ").append(VERSION)).toStdString().c_str());
@@ -135,4 +138,5 @@
     timer->start(100);
 }
+
 
 BAOqt::~BAOqt()
Index: /BAORadio/libindi/libindi/CMakeLists.txt
===================================================================
--- /BAORadio/libindi/libindi/CMakeLists.txt	(revision 696)
+++ /BAORadio/libindi/libindi/CMakeLists.txt	(revision 697)
@@ -6,5 +6,5 @@
 set(CMAKE_INDI_VERSION_MAJOR 0)
 set(CMAKE_INDI_VERSION_MINOR 9)
-set(CMAKE_INDI_VERSION_RELEASE 0)
+set(CMAKE_INDI_VERSION_RELEASE 5)
 set(CMAKE_INDI_VERSION_STRING "${CMAKE_INDI_VERSION_MAJOR}.${CMAKE_INDI_VERSION_MINOR}.${CMAKE_INDI_VERSION_RELEASE}")
 
@@ -89,11 +89,13 @@
 
 set (indiclient_SRCS
-        ${CMAKE_SOURCE_DIR}/libs/indibase/basedriver.cpp
+        ${CMAKE_SOURCE_DIR}/libs/indibase/basedevice.cpp
         ${CMAKE_SOURCE_DIR}/libs/indibase/baseclient.cpp
+        ${CMAKE_SOURCE_DIR}/libs/indibase/indiproperty.cpp
     )
 
 set (indidriver_SRCS
-        ${CMAKE_SOURCE_DIR}/libs/indibase/basedriver.cpp
-        ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdriver.cpp
+        ${CMAKE_SOURCE_DIR}/libs/indibase/basedevice.cpp
+        ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdevice.cpp
+        ${CMAKE_SOURCE_DIR}/libs/indibase/indiproperty.cpp
         ${CMAKE_SOURCE_DIR}/libs/indibase/indiccd.cpp
         ${CMAKE_SOURCE_DIR}/libs/indibase/inditelescope.cpp
@@ -104,4 +106,6 @@
         ${CMAKE_SOURCE_DIR}/libs/indibase/indifilterinterface.cpp
 
+
+
     )
 
@@ -165,140 +169,4 @@
 ########## TELESCOPE GROUP ##########
 #####################################
-
-########### LX200 Basic #############
-set(lx200basic_SRCS
-   ${indimain_SRCS}
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200basic.cpp )
-
-add_executable(indi_lx200basic ${lx200basic_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_lx200basic ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_lx200basic RUNTIME DESTINATION bin )
-
-#################################################################################
-
-########### LX200 Generic ###########
-set(lx200generic_SRCS
-   ${indimain_SRCS}
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200autostar.cpp
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200_16.cpp
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200gps.cpp
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200generic.cpp
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200classic.cpp
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200apdriver.c
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200ap.cpp 
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200fs2.cpp)
-
-add_executable(indi_lx200generic ${lx200generic_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_lx200generic  m )
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_lx200generic ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_lx200generic RUNTIME DESTINATION bin )
-
-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_lx200generic_symlink.cmake
-"exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200classic)\n
-exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200autostar)\n
-exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200_16)\n
-exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200gps)\n
-exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200ap)\n
-exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200fs2)\n
-")
-set_target_properties(indi_lx200generic PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/make_lx200generic_symlink.cmake)
-#################################################################################
-
-########### Celestron GPS ############
-set(celestrongps_SRCS
-   ${indimain_SRCS}
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/celestronprotocol.c
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/celestrongps.cpp )
-
-add_executable(indi_celestron_gps ${celestrongps_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_celestron_gps m )
-
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_celestron_gps ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_celestron_gps RUNTIME DESTINATION bin )
-
-#################################################################################
-
-########### Orion Atlas #############
-set(orionatlas_SRCS
-   ${indimain_SRCS}
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/orionatlas.cpp )
-
-add_executable(indi_orion_atlas ${orionatlas_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
-
-#target_link_libraries(indi_orion_atlas ${KDE4_KDECORE_LIBS})
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_orion_atlas ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_orion_atlas RUNTIME DESTINATION bin )
-
-#################################################################################
-
-########### Takahashi Temma ##########
-if (NOVA_FOUND)
-
-set(temma_SRCS
-   ${indimain_SRCS}
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/temmadriver.c )
-
-add_executable(indi_temma ${temma_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_temma  ${NOVA_LIBRARIES} m )
-
-install(TARGETS indi_temma RUNTIME DESTINATION bin )
-
-endif (NOVA_FOUND)
-#################################################################################
-
-########### Sky Commander #############
-set(skycommander_SRCS
-   ${indimain_SRCS}
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/skycommander.c )
-
-add_executable(indi_skycommander ${skycommander_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_skycommander  m )
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_skycommander ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_skycommander  RUNTIME DESTINATION bin )
-
-#################################################################################
-
-########### Intelliscope ###############
-set(intelliscope_SRCS
-   ${indimain_SRCS}
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/intelliscope.c )
-
-add_executable(indi_intelliscope ${intelliscope_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_intelliscope  m )
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_intelliscope ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_intelliscope RUNTIME DESTINATION bin )
 
 ########### BAO ###############
@@ -325,267 +193,4 @@
 
 install(TARGETS indi_BAO RUNTIME DESTINATION bin )
-########### Syncscan ###############
-set(synscan_SRCS
-   ${indimain_SRCS}
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/synscanmount.cpp )
-
-add_executable(indi_synscan ${synscan_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_synscan indidriver m z)
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_synscan ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_synscan RUNTIME DESTINATION bin )
-
-########### Magellan I #############
-set(magellan_SRCS
-   ${indimain_SRCS}
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/magellandriver.c
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/magellan1.cpp )
-
-add_executable(indi_magellan1 ${magellan_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_magellan1 ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_magellan1 RUNTIME DESTINATION bin )
-
-########### IEQ45 #############
-set(ieq45_SRCS
-   ${indimain_SRCS}
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/ieq45driver.c
-   ${CMAKE_SOURCE_DIR}/drivers/telescope/ieq45.cpp )
-
-add_executable(indi_ieq45 ${ieq45_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_ieq45 ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_ieq45 RUNTIME DESTINATION bin )
-
-########### Telescope Simulator ##############
-set(telescopesimulator_SRCS
-        ${indimain_SRCS}
-        ${CMAKE_SOURCE_DIR}/drivers/telescope/telescope_simulator.cpp
-   )
-
-add_executable(indi_simulator_telescope ${telescopesimulator_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_simulator_telescope indidriver ${CFITSIO_LIBRARIES} m z pthread)
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_simulator_telescope ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_simulator_telescope RUNTIME DESTINATION bin )
-
-########### CCD Simulator ##############
-if (CFITSIO_FOUND)
-
-set(ccdsimulator_SRCS
-        ${indimain_SRCS}
-        ${CMAKE_SOURCE_DIR}/drivers/ccd/ccd_simulator.cpp
-   )
-
-add_executable(indi_simulator_ccd ${ccdsimulator_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_simulator_ccd indidriver ${CFITSIO_LIBRARIES} m z pthread)
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_simulator_ccd ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_simulator_ccd RUNTIME DESTINATION bin )
-
-endif (CFITSIO_FOUND)
-
-
-#####################################
-########## FOCUSER GROUP ############
-#####################################
-
-#################################################################################
-
-################ Robo Focuser ################
-
-set(robofocus_SRCS
-	${indimain_SRCS}
-        ${CMAKE_SOURCE_DIR}/drivers/focuser/robofocus.cpp
-   )
-
-add_executable(indi_robo_focus ${robofocus_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_robo_focus indidriver m z)
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_robo_focus ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_robo_focus RUNTIME DESTINATION bin )
-
-################ Optec TCF-S ################
-
-set(tcfs_SRCS
-        ${indimain_SRCS}
-        ${CMAKE_SOURCE_DIR}/drivers/focuser/tcfs.cpp
-   )
-
-add_executable(indi_tcfs_focus ${tcfs_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_tcfs_focus indidriver m z)
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_tcfs_focus ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_tcfs_focus RUNTIME DESTINATION bin )
-
-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_tcfs_symlink.cmake
-"exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_tcfs_focus \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_tcfs3_focus)\n")
-set_target_properties(indi_tcfs_focus PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/make_tcfs_symlink.cmake)
-
-#################################################################################
-
-#####################################
-######## FILTER WHEEL GROUP #########
-#####################################
-
-########## True Technology Wheel ############
-set(trutechwheel_SRCS
-	${indimain_SRCS}
-	${CMAKE_SOURCE_DIR}/drivers/filter_wheel/trutech_wheel.c
-   )
-
-add_executable(indi_trutech_wheel ${trutechwheel_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_trutech_wheel  m)
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_trutech_wheel ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_trutech_wheel RUNTIME DESTINATION bin )
-
-########### Filter Simulator ##############
-set(filtersimulator_SRCS
-        ${indimain_SRCS}
-        ${CMAKE_SOURCE_DIR}/drivers/filter_wheel/filter_simulator.cpp
-   )
-
-add_executable(indi_simulator_wheel ${filtersimulator_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_simulator_wheel indidriver ${CFITSIO_LIBRARIES} m z pthread)
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_simulator_wheel ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_simulator_wheel RUNTIME DESTINATION bin )
-
-#################################################################################
-
-#########################################
-########### VIDEO GROUP   ###############
-#########################################
-
-########### STV #######################
-if (CFITSIO_FOUND)
-if (NOVA_FOUND)
-
-set(stv_SRCS
-   ${indimain_SRCS}
-   ${CMAKE_SOURCE_DIR}/drivers/video/stvdriver.c
-   ${CMAKE_SOURCE_DIR}/drivers/video/stv.c )
-
-add_executable(indi_sbig_stv ${stv_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_sbig_stv z m ${NOVA_LIBRARIES} ${CFITSIO_LIBRARIES})
-
-install(TARGETS indi_sbig_stv RUNTIME DESTINATION bin )
-
-endif (NOVA_FOUND)
-endif(CFITSIO_FOUND)
-
-#################################################################################
-
-### Meade Lunar Planetary Imager ########
-if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-if (CFITSIO_FOUND)
-
-ADD_DEFINITIONS(-DHAVE_LINUX_VIDEODEV2_H)
-
-set(meade_lpi_SRCS
-	${indimain_SRCS}
-	${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
-	${CMAKE_SOURCE_DIR}/drivers/video/indi_lpi.cpp
-   )
-
-add_executable(indi_meade_lpi ${meade_lpi_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_meade_lpi z ${CFITSIO_LIBRARIES})
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_meade_lpi ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_meade_lpi RUNTIME DESTINATION bin )
-
-endif (CFITSIO_FOUND)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-
-#################################################################################
-
-########### V4L Philips ##############
-if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-if (CFITSIO_FOUND)
-
-set(v4lphilips_SRCS
-	${indimain_SRCS}
-	${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
-	${CMAKE_SOURCE_DIR}/drivers/video/v4lphilips.cpp
-	${CMAKE_SOURCE_DIR}/drivers/video/indi_philips.cpp
-)
-
-add_executable(indi_v4l_philips ${v4lphilips_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_v4l_philips m z ${CFITSIO_LIBRARIES})
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_v4l_philips ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_v4l_philips RUNTIME DESTINATION bin )
-
-endif (CFITSIO_FOUND)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-
-#################################################################################
-
-########### Generic V4L Driver ###############
-if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-if (CFITSIO_FOUND)
-
-set(v4ldriver_SRCS
-	${indimain_SRCS}
-	${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
-	${CMAKE_SOURCE_DIR}/drivers/video/indi_v4l.cpp
-   )
-
-add_executable(indi_v4l_generic ${v4ldriver_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(indi_v4l_generic m z ${CFITSIO_LIBRARIES})
-
-if (NOVA_FOUND)
-  target_link_libraries(indi_v4l_generic ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-install(TARGETS indi_v4l_generic RUNTIME DESTINATION bin )
-
-endif (CFITSIO_FOUND)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 
 #################################################################################
@@ -647,107 +252,5 @@
 install(TARGETS indi_eval RUNTIME DESTINATION bin )
 
-#################################################################################
-## Build Examples. Not installation
-########### Tutorial one ##############
-set(tutorialone_SRCS
-	${indimain_SRCS}
-	${CMAKE_SOURCE_DIR}/examples/tutorial_one.c
-   )
-
-add_executable(tutorial_one ${tutorialone_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(tutorial_one  m)
-
-if (NOVA_FOUND)
-  target_link_libraries(tutorial_one ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-########### Tutorial two ##############
-set(tutorialtwo_SRCS
-	${indimain_SRCS}
-	${CMAKE_SOURCE_DIR}/examples/tutorial_two.c
-   )
-
-add_executable(tutorial_two ${tutorialtwo_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(tutorial_two  m)
-
-if (NOVA_FOUND)
-  target_link_libraries(tutorial_two ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-########### Tutorial three ##############
-set(tutorialthree_SRCS
-	${indimain_SRCS}
-	${CMAKE_SOURCE_DIR}/examples/tutorial_three.c
-   )
-
-add_executable(tutorial_three ${tutorialthree_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(tutorial_three m z)
-
-if (NOVA_FOUND)
-  target_link_libraries(tutorial_three ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-########### Tutorial four ##############
-if (CFITSIO_FOUND)
-
-set(tutorialfour_SRCS
-        ${indimain_SRCS}
-        ${CMAKE_SOURCE_DIR}/examples/tutorial_four.cpp
-   )
-
-add_executable(tutorial_four ${tutorialfour_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(tutorial_four indidriver ${CFITSIO_LIBRARIES} m z pthread)
-
-if (NOVA_FOUND)
-  target_link_libraries(tutorial_four ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-endif (CFITSIO_FOUND)
-
-########### Tutorial dome ##############
-set(tutorialdome_SRCS
-	${indimain_SRCS}
-	${CMAKE_SOURCE_DIR}/examples/tutorial_dome.c
-   )
-
-add_executable(tutorial_dome ${tutorialdome_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(tutorial_dome  m)
-
-if (NOVA_FOUND)
-  target_link_libraries(tutorial_dome ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-########### Tutorial rain ##############
-set(tutorialrain_SRCS
-	${indimain_SRCS}
-	${CMAKE_SOURCE_DIR}/examples/tutorial_rain.c
-   )
-
-add_executable(tutorial_rain ${tutorialrain_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(tutorial_rain  m)
-
-if (NOVA_FOUND)
-  target_link_libraries(tutorial_rain ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
-
-
-########### Client Tutorial ##############
-set(tutorialclient_SRCS
-        ${CMAKE_SOURCE_DIR}/examples/tutorial_client.cpp
-   )
-
-add_executable(tutorial_client ${tutorialclient_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
-
-target_link_libraries(tutorial_client indiclient m)
-
-if (NOVA_FOUND)
-  target_link_libraries(tutorial_client ${NOVA_LIBRARIES})
-endif (NOVA_FOUND)
+
 
 #################################################################################
@@ -756,9 +259,9 @@
 
 install( FILES indiapi.h indidevapi.h base64.h eventloop.h indidriver.h ${CMAKE_SOURCE_DIR}/libs/lilxml.h ${CMAKE_SOURCE_DIR}/libs/indibase/indibase.h
-${CMAKE_SOURCE_DIR}/libs/indibase/basedriver.h  ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdriver.h
+${CMAKE_SOURCE_DIR}/libs/indibase/basedevice.h  ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdevice.h
 ${CMAKE_SOURCE_DIR}/libs/indibase/indiccd.h  ${CMAKE_SOURCE_DIR}/libs/indibase/indifilterwheel.h
 ${CMAKE_SOURCE_DIR}/libs/indibase/indifocuser.h  ${CMAKE_SOURCE_DIR}/libs/indibase/inditelescope.h
 ${CMAKE_SOURCE_DIR}/libs/indibase/baseclient.h ${CMAKE_SOURCE_DIR}/libs/indibase/indiguiderinterface.h
-${CMAKE_SOURCE_DIR}/libs/indibase/indifilterinterface.h
+${CMAKE_SOURCE_DIR}/libs/indibase/indifilterinterface.h ${CMAKE_SOURCE_DIR}/libs/indibase/indiproperty.h
 ${CMAKE_SOURCE_DIR}/libs/indicom.h ${CMAKE_SOURCE_DIR}/libs/indibase/indiusbdevice.h
  DESTINATION ${INCLUDE_INSTALL_DIR}/libindi COMPONENT Devel)
Index: /BAORadio/libindi/libindi/ChangeLog
===================================================================
--- /BAORadio/libindi/libindi/ChangeLog	(revision 696)
+++ /BAORadio/libindi/libindi/ChangeLog	(revision 697)
@@ -1,2 +1,10 @@
+From 0.9 to 0.95
+
+      # Focuser simulator driver.
+      # CCD, Telescope, Focuser, and Filter simulators improvements including periodic error effects, FWHM, and more.
+      # Major improvements to INDI Base Library and INDI Client Library.
+      # Fixed minor bugs in LX200 Generic, LX200 FS2, Magellan, and Celestron drivers.
+      # Minor bugfixes and improvements.
+      
 From 0.8 to 0.9
 
Index: /BAORadio/libindi/libindi/Changelog-BAORadio
===================================================================
--- /BAORadio/libindi/libindi/Changelog-BAORadio	(revision 696)
+++ /BAORadio/libindi/libindi/Changelog-BAORadio	(revision 697)
@@ -1,2 +1,9 @@
+Version 0.6.4
+#Nouvelles fonctions / modifications
+-Utilisation de la version 0.9.5 dela bibliothÃšque libindi
+#Corrections bugs
+-Correction de l'erreur concernant la commande 'm'
+
+
 Version 0.6.1 
 #Nouvelles fonctions / modifications
Index: /BAORadio/libindi/libindi/Makefile
===================================================================
--- /BAORadio/libindi/libindi/Makefile	(revision 696)
+++ /BAORadio/libindi/libindi/Makefile	(revision 697)
@@ -1,8 +1,8 @@
 #############################################################################
 # Makefile for building: libindi
-# Generated by qmake (2.01a) (Qt 4.7.4) on: mar. juil. 10 03:01:50 2012
+# Generated by qmake (2.01a) (Qt 4.8.3) on: lun. oct. 22 02:49:51 2012
 # Project:  libindi.pro
 # Template: app
-# Command: /usr/bin/qmake -o Makefile libindi.pro
+# Command: /usr/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile libindi.pro
 #############################################################################
 
@@ -11,11 +11,11 @@
 CC            = gcc
 CXX           = g++
-DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-CFLAGS        = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
-CXXFLAGS      = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
-INCPATH       = -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include -I. -Ilibs -IBAOcontrol -Icommuns -Ilibs/indibase -Iexamples -Idrivers/ccd -Idrivers/filter_wheel -Idrivers/focuser -Idrivers/telescope -Idrivers/video -Ilibs/webcam -IIndi_Stellarium/src -I. -I.
+DEFINES       = -DQT_WEBKIT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS        = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
+CXXFLAGS      = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
+INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -Ilibs -IBAOcontrol -Icommuns -Ilibs/indibase -Iexamples -Idrivers/ccd -Idrivers/filter_wheel -Idrivers/focuser -Idrivers/telescope -Idrivers/video -Ilibs/webcam -IIndi_Stellarium/src -I. -I.
 LINK          = g++
-LFLAGS        = -m64 -Wl,-O1
-LIBS          = $(SUBLIBS)  -L/usr/lib64 -lQtGui -L/usr/lib64 -L/usr/X11R6/lib64 -lQtCore -lpthread 
+LFLAGS        = 
+LIBS          = $(SUBLIBS)  -L/usr/lib/x86_64-linux-gnu -lQtGui -lQtCore -lpthread 
 AR            = ar cqs
 RANLIB        = 
@@ -72,12 +72,4 @@
 		communs/ServerSocket.cpp \
 		communs/Socket.cpp \
-		examples/tutorial_ccdpreview.c \
-		examples/tutorial_client.cpp \
-		examples/tutorial_dome.c \
-		examples/tutorial_four.cpp \
-		examples/tutorial_one.c \
-		examples/tutorial_rain.c \
-		examples/tutorial_three.c \
-		examples/tutorial_two.c \
 		libs/indicom.c \
 		libs/lilxml.c \
@@ -88,12 +80,4 @@
 		drivers/ccd/ccd_simulator.cpp \
 		drivers/ccd/fli_ccd.c \
-		drivers/filter_wheel/filter_simulator.cpp \
-		drivers/filter_wheel/fli_wheel.c \
-		drivers/filter_wheel/trutech_wheel.c \
-		drivers/focuser/fli_pdf.c \
-		drivers/focuser/robofocus.c \
-		drivers/focuser/robofocus.cpp \
-		drivers/focuser/robofocusdriver.c \
-		drivers/focuser/tcfs.cpp \
 		drivers/telescope/BAO.cpp \
 		drivers/telescope/celestrongps.cpp \
@@ -119,11 +103,4 @@
 		drivers/telescope/telescope_simulator.cpp \
 		drivers/telescope/temmadriver.c \
-		drivers/video/indi_lpi.cpp \
-		drivers/video/indi_philips.cpp \
-		drivers/video/indi_v4l.cpp \
-		drivers/video/stv.c \
-		drivers/video/stvdriver.c \
-		drivers/video/v4ldriver.cpp \
-		drivers/video/v4lphilips.cpp \
 		Indi_Stellarium/src/Connection.cpp \
 		Indi_Stellarium/src/Listener.cpp \
@@ -144,11 +121,4 @@
 		libs/indibase/inditelescope.cpp \
 		libs/indibase/indiusbdevice.cpp \
-		libs/webcam/ccvt_c2.c \
-		libs/webcam/ccvt_misc.c \
-		libs/webcam/port.cpp \
-		libs/webcam/PPort.cpp \
-		libs/webcam/v4l1_base.cpp \
-		libs/webcam/v4l1_pwc.cpp \
-		libs/webcam/v4l2_base.cpp \
 		libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c \
 		libindi_build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp moc_baoqt.cpp \
@@ -185,12 +155,4 @@
 		ServerSocket.o \
 		Socket.o \
-		tutorial_ccdpreview.o \
-		tutorial_client.o \
-		tutorial_dome.o \
-		tutorial_four.o \
-		tutorial_one.o \
-		tutorial_rain.o \
-		tutorial_three.o \
-		tutorial_two.o \
 		indicom.o \
 		lilxml.o \
@@ -201,12 +163,4 @@
 		ccd_simulator.o \
 		fli_ccd.o \
-		filter_simulator.o \
-		fli_wheel.o \
-		trutech_wheel.o \
-		fli_pdf.o \
-		robofocus.o \
-		robofocus.o \
-		robofocusdriver.o \
-		tcfs.o \
 		BAO.o \
 		celestrongps.o \
@@ -232,11 +186,4 @@
 		telescope_simulator.o \
 		temmadriver.o \
-		indi_lpi.o \
-		indi_philips.o \
-		indi_v4l.o \
-		stv.o \
-		stvdriver.o \
-		v4ldriver.o \
-		v4lphilips.o \
 		Connection.o \
 		Listener.o \
@@ -257,11 +204,4 @@
 		inditelescope.o \
 		indiusbdevice.o \
-		ccvt_c2.o \
-		ccvt_misc.o \
-		port.o \
-		PPort.o \
-		v4l1_base.o \
-		v4l1_pwc.o \
-		v4l2_base.o \
 		CMakeCCompilerId.o \
 		CMakeCXXCompilerId.o \
@@ -271,15 +211,19 @@
 		moc_qledindicator.o \
 		moc_selectstars.o
-DIST          = /usr/share/qt4/mkspecs/common/g++.conf \
-		/usr/share/qt4/mkspecs/common/unix.conf \
+DIST          = /usr/share/qt4/mkspecs/common/unix.conf \
 		/usr/share/qt4/mkspecs/common/linux.conf \
+		/usr/share/qt4/mkspecs/common/gcc-base.conf \
+		/usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
+		/usr/share/qt4/mkspecs/common/g++-base.conf \
+		/usr/share/qt4/mkspecs/common/g++-unix.conf \
 		/usr/share/qt4/mkspecs/qconfig.pri \
-		/usr/share/qt4/mkspecs/modules/qt_phonon.pri \
+		/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
 		/usr/share/qt4/mkspecs/features/qt_functions.prf \
 		/usr/share/qt4/mkspecs/features/qt_config.prf \
 		/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
 		/usr/share/qt4/mkspecs/features/default_pre.prf \
-		/usr/share/qt4/mkspecs/features/release.prf \
+		/usr/share/qt4/mkspecs/features/debug.prf \
 		/usr/share/qt4/mkspecs/features/default_post.prf \
+		/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
 		/usr/share/qt4/mkspecs/features/warn_on.prf \
 		/usr/share/qt4/mkspecs/features/qt.prf \
@@ -322,16 +266,21 @@
 $(TARGET): ui_baoqt.h ui_liste.h ui_map.h ui_selectstars.h $(OBJECTS)  
 	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
-
-Makefile: libindi.pro  /usr/share/qt4/mkspecs/default/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
-		/usr/share/qt4/mkspecs/common/unix.conf \
+	{ test -n "$(DESTDIR)" && DESTDIR="$(DESTDIR)" || DESTDIR=.; } && test $$(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $$DESTDIR" -ex quit '$(TARGET)' && test -f $(TARGET).gdb-index && objcopy --add-section '.gdb_index=$(TARGET).gdb-index' --set-section-flags '.gdb_index=readonly' '$(TARGET)' '$(TARGET)' && rm -f $(TARGET).gdb-index || true
+
+Makefile: libindi.pro  /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \
 		/usr/share/qt4/mkspecs/common/linux.conf \
+		/usr/share/qt4/mkspecs/common/gcc-base.conf \
+		/usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
+		/usr/share/qt4/mkspecs/common/g++-base.conf \
+		/usr/share/qt4/mkspecs/common/g++-unix.conf \
 		/usr/share/qt4/mkspecs/qconfig.pri \
-		/usr/share/qt4/mkspecs/modules/qt_phonon.pri \
+		/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
 		/usr/share/qt4/mkspecs/features/qt_functions.prf \
 		/usr/share/qt4/mkspecs/features/qt_config.prf \
 		/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
 		/usr/share/qt4/mkspecs/features/default_pre.prf \
-		/usr/share/qt4/mkspecs/features/release.prf \
+		/usr/share/qt4/mkspecs/features/debug.prf \
 		/usr/share/qt4/mkspecs/features/default_post.prf \
+		/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
 		/usr/share/qt4/mkspecs/features/warn_on.prf \
 		/usr/share/qt4/mkspecs/features/qt.prf \
@@ -343,18 +292,22 @@
 		/usr/share/qt4/mkspecs/features/lex.prf \
 		/usr/share/qt4/mkspecs/features/include_source_dir.prf \
-		/usr/lib64/libQtGui.prl \
-		/usr/lib64/libQtCore.prl
-	$(QMAKE) -o Makefile libindi.pro
-/usr/share/qt4/mkspecs/common/g++.conf:
+		/usr/lib/x86_64-linux-gnu/libQtGui.prl \
+		/usr/lib/x86_64-linux-gnu/libQtCore.prl
+	$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile libindi.pro
 /usr/share/qt4/mkspecs/common/unix.conf:
 /usr/share/qt4/mkspecs/common/linux.conf:
+/usr/share/qt4/mkspecs/common/gcc-base.conf:
+/usr/share/qt4/mkspecs/common/gcc-base-unix.conf:
+/usr/share/qt4/mkspecs/common/g++-base.conf:
+/usr/share/qt4/mkspecs/common/g++-unix.conf:
 /usr/share/qt4/mkspecs/qconfig.pri:
-/usr/share/qt4/mkspecs/modules/qt_phonon.pri:
+/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
 /usr/share/qt4/mkspecs/features/qt_functions.prf:
 /usr/share/qt4/mkspecs/features/qt_config.prf:
 /usr/share/qt4/mkspecs/features/exclusive_builds.prf:
 /usr/share/qt4/mkspecs/features/default_pre.prf:
-/usr/share/qt4/mkspecs/features/release.prf:
+/usr/share/qt4/mkspecs/features/debug.prf:
 /usr/share/qt4/mkspecs/features/default_post.prf:
+/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
 /usr/share/qt4/mkspecs/features/warn_on.prf:
 /usr/share/qt4/mkspecs/features/qt.prf:
@@ -366,12 +319,12 @@
 /usr/share/qt4/mkspecs/features/lex.prf:
 /usr/share/qt4/mkspecs/features/include_source_dir.prf:
-/usr/lib64/libQtGui.prl:
-/usr/lib64/libQtCore.prl:
+/usr/lib/x86_64-linux-gnu/libQtGui.prl:
+/usr/lib/x86_64-linux-gnu/libQtCore.prl:
 qmake:  FORCE
-	@$(QMAKE) -o Makefile libindi.pro
+	@$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile libindi.pro
 
 dist: 
 	@$(CHK_DIR_EXISTS) .tmp/libindi1.0.0 || $(MKDIR) .tmp/libindi1.0.0 
-	$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/libindi1.0.0/ && $(COPY_FILE) --parents base64.h config.h eventloop.h fq.h indiapi.h indidevapi.h indidriver.h BAOcontrol/baocontrol.h BAOcontrol/baoqt.h BAOcontrol/Connection.hpp BAOcontrol/Joystick.h BAOcontrol/liste.h BAOcontrol/Listener.hpp BAOcontrol/LogFile.hpp BAOcontrol/map.h BAOcontrol/qledindicator.h BAOcontrol/selectstars.h BAOcontrol/Server.hpp BAOcontrol/Socket2.hpp communs/alignement.h communs/astro.h communs/ClientSocket.h communs/const.h communs/exception.h communs/filetools.h communs/logs.h communs/ServerSocket.h communs/Socket.h communs/SocketException.h examples/tutorial_client.h examples/tutorial_four.h libindi_build/config.h libs/indicom.h libs/lilxml.h drivers/ccd/ccd_simulator.h drivers/filter_wheel/filter_simulator.h drivers/focuser/robofocus.h drivers/focuser/robofocusdriver.h drivers/focuser/tcfs.h drivers/telescope/BAO.h drivers/telescope/celestrongps.h drivers/telescope/celestronprotocol.h drivers/telescope/ieq45.h drivers/telescope/ieq45driver.h drivers/telescope/lx200_16.h drivers/telescope/lx200ap.h drivers/telescope/lx200apdriver.h drivers/telescope/lx200aplib.h drivers/telescope/lx200autostar.h drivers/telescope/lx200basic.h drivers/telescope/lx200classic.h drivers/telescope/lx200driver.h drivers/telescope/lx200fs2.h drivers/telescope/lx200generic.h drivers/telescope/lx200gps.h drivers/telescope/magellan1.h drivers/telescope/magellandriver.h drivers/telescope/orionatlas.h drivers/telescope/synscanmount.h drivers/telescope/telescope_simulator.h drivers/telescope/temmadriver.h drivers/video/stvdriver.h drivers/video/v4ldriver.h drivers/video/v4lphilips.h Indi_Stellarium/src/Connection.hpp Indi_Stellarium/src/Listener.hpp Indi_Stellarium/src/LogFile.hpp Indi_Stellarium/src/Server.hpp Indi_Stellarium/src/ServerBAO.hpp Indi_Stellarium/src/Socket2.hpp libs/indibase/baseclient.h libs/indibase/basedriver.h libs/indibase/defaultdriver.h libs/indibase/indibase.h libs/indibase/indiccd.h libs/indibase/indidevice.h libs/indibase/indifilterinterface.h libs/indibase/indifilterwheel.h libs/indibase/indifocuser.h libs/indibase/indiguiderinterface.h libs/indibase/inditelescope.h libs/indibase/indiusbdevice.h libs/webcam/ccvt.h libs/webcam/ccvt_types.h libs/webcam/port.h libs/webcam/PPort.h libs/webcam/pwc-ioctl.h libs/webcam/v4l1_base.h libs/webcam/v4l1_pwc.h libs/webcam/v4l2_base.h libs/webcam/vcvt.h libs/webcam/videodev.h libs/webcam/videodev2.h .tmp/libindi1.0.0/ && $(COPY_FILE) --parents base64.c eventloop.c fq.c indidriver.c indidrivermain.c indiserver.c BAOcontrol/baocontrol.cpp BAOcontrol/baoqt.cpp BAOcontrol/Connection.cpp BAOcontrol/Joystick.cpp BAOcontrol/liste.cpp BAOcontrol/Listener.cpp BAOcontrol/LogFile.cpp BAOcontrol/main.cpp BAOcontrol/map.cpp BAOcontrol/qledindicator.cpp BAOcontrol/selectstars.cpp BAOcontrol/Server.cpp BAOcontrol/Socket2.cpp BAOTest/BAOtest_main.cpp communs/alignement.cpp communs/astro.cpp communs/ClientSocket.cpp communs/exception.cpp communs/filetools.cpp communs/logs.cpp communs/ServerSocket.cpp communs/Socket.cpp examples/tutorial_ccdpreview.c examples/tutorial_client.cpp examples/tutorial_dome.c examples/tutorial_four.cpp examples/tutorial_one.c examples/tutorial_rain.c examples/tutorial_three.c examples/tutorial_two.c libs/indicom.c libs/lilxml.c tools/compiler.c tools/evalINDI.c tools/getINDIproperty.c tools/setINDIproperty.c drivers/ccd/ccd_simulator.cpp drivers/ccd/fli_ccd.c drivers/filter_wheel/filter_simulator.cpp drivers/filter_wheel/fli_wheel.c drivers/filter_wheel/trutech_wheel.c drivers/focuser/fli_pdf.c drivers/focuser/robofocus.c drivers/focuser/robofocus.cpp drivers/focuser/robofocusdriver.c drivers/focuser/tcfs.cpp drivers/telescope/BAO.cpp drivers/telescope/celestrongps.cpp drivers/telescope/celestronprotocol.c drivers/telescope/ieq45.cpp drivers/telescope/ieq45driver.c drivers/telescope/intelliscope.c drivers/telescope/lx200_16.cpp drivers/telescope/lx200ap.cpp drivers/telescope/lx200apdriver.c drivers/telescope/lx200autostar.cpp drivers/telescope/lx200basic.cpp drivers/telescope/lx200classic.cpp drivers/telescope/lx200driver.c drivers/telescope/lx200fs2.cpp drivers/telescope/lx200generic.cpp drivers/telescope/lx200gps.cpp drivers/telescope/magellan1.cpp drivers/telescope/magellandriver.c drivers/telescope/orionatlas.cpp drivers/telescope/skycommander.c drivers/telescope/synscanmount.cpp drivers/telescope/telescope_simulator.cpp drivers/telescope/temmadriver.c drivers/video/indi_lpi.cpp drivers/video/indi_philips.cpp drivers/video/indi_v4l.cpp drivers/video/stv.c drivers/video/stvdriver.c drivers/video/v4ldriver.cpp drivers/video/v4lphilips.cpp Indi_Stellarium/src/Connection.cpp Indi_Stellarium/src/Listener.cpp Indi_Stellarium/src/LogFile.cpp Indi_Stellarium/src/MainBAO.cpp Indi_Stellarium/src/Server.cpp Indi_Stellarium/src/ServerBAO.cpp Indi_Stellarium/src/Socket2.cpp libs/indibase/baseclient.cpp libs/indibase/basedriver.cpp libs/indibase/defaultdriver.cpp libs/indibase/indiccd.cpp libs/indibase/indidevice.cpp libs/indibase/indifilterinterface.cpp libs/indibase/indifilterwheel.cpp libs/indibase/indifocuser.cpp libs/indibase/indiguiderinterface.cpp libs/indibase/inditelescope.cpp libs/indibase/indiusbdevice.cpp libs/webcam/ccvt_c2.c libs/webcam/ccvt_misc.c libs/webcam/port.cpp libs/webcam/PPort.cpp libs/webcam/v4l1_base.cpp libs/webcam/v4l1_pwc.cpp libs/webcam/v4l2_base.cpp libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c libindi_build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp .tmp/libindi1.0.0/ && $(COPY_FILE) --parents BAOcontrol/baoqt.ui BAOcontrol/liste.ui BAOcontrol/map.ui BAOcontrol/selectstars.ui .tmp/libindi1.0.0/ && (cd `dirname .tmp/libindi1.0.0` && $(TAR) libindi1.0.0.tar libindi1.0.0 && $(COMPRESS) libindi1.0.0.tar) && $(MOVE) `dirname .tmp/libindi1.0.0`/libindi1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/libindi1.0.0
+	$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/libindi1.0.0/ && $(COPY_FILE) --parents base64.h eventloop.h fq.h indiapi.h indidevapi.h indidriver.h BAOcontrol/baocontrol.h BAOcontrol/baoqt.h BAOcontrol/Connection.hpp BAOcontrol/Joystick.h BAOcontrol/liste.h BAOcontrol/Listener.hpp BAOcontrol/LogFile.hpp BAOcontrol/map.h BAOcontrol/qledindicator.h BAOcontrol/selectstars.h BAOcontrol/Server.hpp BAOcontrol/Socket2.hpp communs/alignement.h communs/astro.h communs/ClientSocket.h communs/const.h communs/exception.h communs/filetools.h communs/logs.h communs/ServerSocket.h communs/Socket.h communs/SocketException.h examples/tutorial_client.h examples/tutorial_four.h libindi_build/config.h libs/indicom.h libs/lilxml.h drivers/ccd/ccd_simulator.h drivers/filter_wheel/filter_simulator.h drivers/focuser/robofocus.h drivers/focuser/robofocusdriver.h drivers/focuser/tcfs.h drivers/telescope/BAO.h drivers/telescope/celestrongps.h drivers/telescope/celestronprotocol.h drivers/telescope/ieq45.h drivers/telescope/ieq45driver.h drivers/telescope/lx200_16.h drivers/telescope/lx200ap.h drivers/telescope/lx200apdriver.h drivers/telescope/lx200aplib.h drivers/telescope/lx200autostar.h drivers/telescope/lx200basic.h drivers/telescope/lx200classic.h drivers/telescope/lx200driver.h drivers/telescope/lx200fs2.h drivers/telescope/lx200generic.h drivers/telescope/lx200gps.h drivers/telescope/magellan1.h drivers/telescope/magellandriver.h drivers/telescope/orionatlas.h drivers/telescope/synscanmount.h drivers/telescope/telescope_simulator.h drivers/telescope/temmadriver.h drivers/video/stvdriver.h drivers/video/v4ldriver.h drivers/video/v4lphilips.h Indi_Stellarium/src/Connection.hpp Indi_Stellarium/src/Listener.hpp Indi_Stellarium/src/LogFile.hpp Indi_Stellarium/src/Server.hpp Indi_Stellarium/src/ServerBAO.hpp Indi_Stellarium/src/Socket2.hpp libs/indibase/baseclient.h libs/indibase/basedriver.h libs/indibase/defaultdriver.h libs/indibase/indibase.h libs/indibase/indiccd.h libs/indibase/indidevice.h libs/indibase/indifilterinterface.h libs/indibase/indifilterwheel.h libs/indibase/indifocuser.h libs/indibase/indiguiderinterface.h libs/indibase/inditelescope.h libs/indibase/indiusbdevice.h libs/webcam/ccvt.h libs/webcam/ccvt_types.h libs/webcam/port.h libs/webcam/PPort.h libs/webcam/pwc-ioctl.h libs/webcam/v4l1_base.h libs/webcam/v4l1_pwc.h libs/webcam/v4l2_base.h libs/webcam/vcvt.h libs/webcam/videodev.h libs/webcam/videodev2.h .tmp/libindi1.0.0/ && $(COPY_FILE) --parents base64.c eventloop.c fq.c indidriver.c indidrivermain.c indiserver.c BAOcontrol/baocontrol.cpp BAOcontrol/baoqt.cpp BAOcontrol/Connection.cpp BAOcontrol/Joystick.cpp BAOcontrol/liste.cpp BAOcontrol/Listener.cpp BAOcontrol/LogFile.cpp BAOcontrol/main.cpp BAOcontrol/map.cpp BAOcontrol/qledindicator.cpp BAOcontrol/selectstars.cpp BAOcontrol/Server.cpp BAOcontrol/Socket2.cpp BAOTest/BAOtest_main.cpp communs/alignement.cpp communs/astro.cpp communs/ClientSocket.cpp communs/exception.cpp communs/filetools.cpp communs/logs.cpp communs/ServerSocket.cpp communs/Socket.cpp libs/indicom.c libs/lilxml.c tools/compiler.c tools/evalINDI.c tools/getINDIproperty.c tools/setINDIproperty.c drivers/ccd/ccd_simulator.cpp drivers/ccd/fli_ccd.c drivers/telescope/BAO.cpp drivers/telescope/celestrongps.cpp drivers/telescope/celestronprotocol.c drivers/telescope/ieq45.cpp drivers/telescope/ieq45driver.c drivers/telescope/intelliscope.c drivers/telescope/lx200_16.cpp drivers/telescope/lx200ap.cpp drivers/telescope/lx200apdriver.c drivers/telescope/lx200autostar.cpp drivers/telescope/lx200basic.cpp drivers/telescope/lx200classic.cpp drivers/telescope/lx200driver.c drivers/telescope/lx200fs2.cpp drivers/telescope/lx200generic.cpp drivers/telescope/lx200gps.cpp drivers/telescope/magellan1.cpp drivers/telescope/magellandriver.c drivers/telescope/orionatlas.cpp drivers/telescope/skycommander.c drivers/telescope/synscanmount.cpp drivers/telescope/telescope_simulator.cpp drivers/telescope/temmadriver.c Indi_Stellarium/src/Connection.cpp Indi_Stellarium/src/Listener.cpp Indi_Stellarium/src/LogFile.cpp Indi_Stellarium/src/MainBAO.cpp Indi_Stellarium/src/Server.cpp Indi_Stellarium/src/ServerBAO.cpp Indi_Stellarium/src/Socket2.cpp libs/indibase/baseclient.cpp libs/indibase/basedriver.cpp libs/indibase/defaultdriver.cpp libs/indibase/indiccd.cpp libs/indibase/indidevice.cpp libs/indibase/indifilterinterface.cpp libs/indibase/indifilterwheel.cpp libs/indibase/indifocuser.cpp libs/indibase/indiguiderinterface.cpp libs/indibase/inditelescope.cpp libs/indibase/indiusbdevice.cpp libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c libindi_build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp .tmp/libindi1.0.0/ && $(COPY_FILE) --parents BAOcontrol/baoqt.ui BAOcontrol/liste.ui BAOcontrol/map.ui BAOcontrol/selectstars.ui .tmp/libindi1.0.0/ && (cd `dirname .tmp/libindi1.0.0` && $(TAR) libindi1.0.0.tar libindi1.0.0 && $(COMPRESS) libindi1.0.0.tar) && $(MOVE) `dirname .tmp/libindi1.0.0`/libindi1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/libindi1.0.0
 
 
@@ -415,19 +368,19 @@
 		BAOcontrol/Server.hpp \
 		BAOcontrol/baoqt.h
-	/usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/baoqt.h -o moc_baoqt.cpp
+	/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/baoqt.h -o moc_baoqt.cpp
 
 moc_liste.cpp: BAOcontrol/liste.h
-	/usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/liste.h -o moc_liste.cpp
+	/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/liste.h -o moc_liste.cpp
 
 moc_map.cpp: communs/const.h \
 		BAOcontrol/map.h
-	/usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/map.h -o moc_map.cpp
+	/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/map.h -o moc_map.cpp
 
 moc_qledindicator.cpp: BAOcontrol/qledindicator.h
-	/usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/qledindicator.h -o moc_qledindicator.cpp
+	/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/qledindicator.h -o moc_qledindicator.cpp
 
 moc_selectstars.cpp: BAOcontrol/ui_selectstars.h \
 		BAOcontrol/selectstars.h
-	/usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/selectstars.h -o moc_selectstars.cpp
+	/usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/selectstars.h -o moc_selectstars.cpp
 
 compiler_rcc_make_all:
@@ -442,14 +395,14 @@
 	-$(DEL_FILE) ui_baoqt.h ui_liste.h ui_map.h ui_selectstars.h
 ui_baoqt.h: BAOcontrol/baoqt.ui
-	/usr/bin/uic BAOcontrol/baoqt.ui -o ui_baoqt.h
+	/usr/bin/uic-qt4 BAOcontrol/baoqt.ui -o ui_baoqt.h
 
 ui_liste.h: BAOcontrol/liste.ui
-	/usr/bin/uic BAOcontrol/liste.ui -o ui_liste.h
+	/usr/bin/uic-qt4 BAOcontrol/liste.ui -o ui_liste.h
 
 ui_map.h: BAOcontrol/map.ui
-	/usr/bin/uic BAOcontrol/map.ui -o ui_map.h
+	/usr/bin/uic-qt4 BAOcontrol/map.ui -o ui_map.h
 
 ui_selectstars.h: BAOcontrol/selectstars.ui
-	/usr/bin/uic BAOcontrol/selectstars.ui -o ui_selectstars.h
+	/usr/bin/uic-qt4 BAOcontrol/selectstars.ui -o ui_selectstars.h
 
 compiler_yacc_decl_make_all:
@@ -634,72 +587,4 @@
 	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o Socket.o communs/Socket.cpp
 
-tutorial_ccdpreview.o: examples/tutorial_ccdpreview.c indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		libs/indicom.h \
-		eventloop.h \
-		base64.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_ccdpreview.o examples/tutorial_ccdpreview.c
-
-tutorial_client.o: examples/tutorial_client.cpp config.h \
-		libs/indibase/baseclient.h \
-		indiapi.h \
-		indidevapi.h \
-		libs/lilxml.h \
-		libs/indibase/indibase.h \
-		libs/indibase/basedriver.h \
-		libs/indicom.h \
-		examples/tutorial_client.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tutorial_client.o examples/tutorial_client.cpp
-
-tutorial_dome.o: examples/tutorial_dome.c indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		eventloop.h \
-		libs/indicom.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_dome.o examples/tutorial_dome.c
-
-tutorial_four.o: examples/tutorial_four.cpp config.h \
-		libs/indibase/baseclient.h \
-		indiapi.h \
-		indidevapi.h \
-		libs/lilxml.h \
-		libs/indibase/indibase.h \
-		libs/indicom.h \
-		examples/tutorial_four.h \
-		libs/indibase/defaultdriver.h \
-		libs/indibase/basedriver.h \
-		indidriver.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tutorial_four.o examples/tutorial_four.cpp
-
-tutorial_one.o: examples/tutorial_one.c indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		eventloop.h \
-		libs/indicom.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_one.o examples/tutorial_one.c
-
-tutorial_rain.o: examples/tutorial_rain.c indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		eventloop.h \
-		libs/indicom.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_rain.o examples/tutorial_rain.c
-
-tutorial_three.o: examples/tutorial_three.c indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		libs/indicom.h \
-		eventloop.h \
-		base64.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_three.o examples/tutorial_three.c
-
-tutorial_two.o: examples/tutorial_two.c indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		eventloop.h \
-		libs/indicom.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_two.o examples/tutorial_two.c
-
 indicom.o: libs/indicom.c config.h \
 		libs/indicom.h \
@@ -730,10 +615,11 @@
 ccd_simulator.o: drivers/ccd/ccd_simulator.cpp drivers/ccd/ccd_simulator.h \
 		libs/indibase/indiccd.h \
-		libs/indibase/defaultdriver.h \
-		libs/indibase/basedriver.h \
-		indiapi.h \
-		indidevapi.h \
-		libs/lilxml.h \
-		libs/indibase/indibase.h \
+		libs/indibase/defaultdevice.h \
+		libs/indibase/basedevice.h \
+		indiapi.h \
+		indidevapi.h \
+		libs/lilxml.h \
+		libs/indibase/indibase.h \
+		libs/indibase/indiproperty.h \
 		indidriver.h \
 		libs/indibase/indiguiderinterface.h
@@ -746,75 +632,4 @@
 		libs/indicom.h
 	$(CC) -c $(CFLAGS) $(INCPATH) -o fli_ccd.o drivers/ccd/fli_ccd.c
-
-filter_simulator.o: drivers/filter_wheel/filter_simulator.cpp drivers/filter_wheel/filter_simulator.h \
-		libs/indibase/indifilterwheel.h \
-		libs/indibase/defaultdriver.h \
-		libs/indibase/basedriver.h \
-		indiapi.h \
-		indidevapi.h \
-		libs/lilxml.h \
-		libs/indibase/indibase.h \
-		indidriver.h \
-		libs/indibase/indifilterinterface.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o filter_simulator.o drivers/filter_wheel/filter_simulator.cpp
-
-fli_wheel.o: drivers/filter_wheel/fli_wheel.c indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		eventloop.h \
-		libs/indicom.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o fli_wheel.o drivers/filter_wheel/fli_wheel.c
-
-trutech_wheel.o: drivers/filter_wheel/trutech_wheel.c indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		eventloop.h \
-		libs/indicom.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o trutech_wheel.o drivers/filter_wheel/trutech_wheel.c
-
-fli_pdf.o: drivers/focuser/fli_pdf.c indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		eventloop.h \
-		libs/indicom.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o fli_pdf.o drivers/focuser/fli_pdf.c
-
-robofocus.o: drivers/focuser/robofocus.c indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		eventloop.h \
-		libs/indicom.h \
-		drivers/focuser/robofocusdriver.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o robofocus.o drivers/focuser/robofocus.c
-
-robofocus.o: drivers/focuser/robofocus.cpp drivers/focuser/robofocus.h \
-		libs/indibase/indifocuser.h \
-		libs/indibase/defaultdriver.h \
-		libs/indibase/basedriver.h \
-		indiapi.h \
-		indidevapi.h \
-		libs/lilxml.h \
-		libs/indibase/indibase.h \
-		indidriver.h \
-		libs/indicom.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o robofocus.o drivers/focuser/robofocus.cpp
-
-robofocusdriver.o: drivers/focuser/robofocusdriver.c libs/indicom.h \
-		indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		drivers/focuser/robofocusdriver.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o robofocusdriver.o drivers/focuser/robofocusdriver.c
-
-tcfs.o: drivers/focuser/tcfs.cpp libs/indicom.h \
-		drivers/focuser/tcfs.h \
-		indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		libs/indibase/defaultdriver.h \
-		libs/indibase/basedriver.h \
-		libs/indibase/indibase.h \
-		indidriver.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tcfs.o drivers/focuser/tcfs.cpp
 
 BAO.o: drivers/telescope/BAO.cpp drivers/telescope/BAO.h \
@@ -1003,10 +818,11 @@
 synscanmount.o: drivers/telescope/synscanmount.cpp drivers/telescope/synscanmount.h \
 		libs/indibase/inditelescope.h \
-		libs/indibase/defaultdriver.h \
-		libs/indibase/basedriver.h \
-		indiapi.h \
-		indidevapi.h \
-		libs/lilxml.h \
-		libs/indibase/indibase.h \
+		libs/indibase/defaultdevice.h \
+		libs/indibase/basedevice.h \
+		indiapi.h \
+		indidevapi.h \
+		libs/lilxml.h \
+		libs/indibase/indibase.h \
+		libs/indibase/indiproperty.h \
 		indidriver.h \
 		libs/indicom.h
@@ -1015,10 +831,11 @@
 telescope_simulator.o: drivers/telescope/telescope_simulator.cpp drivers/telescope/telescope_simulator.h \
 		libs/indibase/inditelescope.h \
-		libs/indibase/defaultdriver.h \
-		libs/indibase/basedriver.h \
-		indiapi.h \
-		indidevapi.h \
-		libs/lilxml.h \
-		libs/indibase/indibase.h \
+		libs/indibase/defaultdevice.h \
+		libs/indibase/basedevice.h \
+		indiapi.h \
+		indidevapi.h \
+		libs/lilxml.h \
+		libs/indibase/indibase.h \
+		libs/indibase/indiproperty.h \
 		indidriver.h \
 		libs/indicom.h
@@ -1033,88 +850,4 @@
 		drivers/telescope/temmadriver.h
 	$(CC) -c $(CFLAGS) $(INCPATH) -o temmadriver.o drivers/telescope/temmadriver.c
-
-indi_lpi.o: drivers/video/indi_lpi.cpp drivers/video/v4ldriver.h \
-		indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		libs/indicom.h \
-		eventloop.h \
-		config.h \
-		libs/webcam/v4l2_base.h \
-		libs/webcam/videodev2.h \
-		libs/webcam/v4l1_base.h \
-		libs/webcam/videodev.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o indi_lpi.o drivers/video/indi_lpi.cpp
-
-indi_philips.o: drivers/video/indi_philips.cpp drivers/video/v4lphilips.h \
-		libs/webcam/v4l1_pwc.h \
-		libs/webcam/videodev.h \
-		libs/webcam/v4l1_base.h \
-		eventloop.h \
-		drivers/video/v4ldriver.h \
-		indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		libs/indicom.h \
-		config.h \
-		libs/webcam/v4l2_base.h \
-		libs/webcam/videodev2.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o indi_philips.o drivers/video/indi_philips.cpp
-
-indi_v4l.o: drivers/video/indi_v4l.cpp drivers/video/v4ldriver.h \
-		indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		libs/indicom.h \
-		eventloop.h \
-		config.h \
-		libs/webcam/v4l2_base.h \
-		libs/webcam/videodev2.h \
-		libs/webcam/v4l1_base.h \
-		libs/webcam/videodev.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o indi_v4l.o drivers/video/indi_v4l.cpp
-
-stv.o: drivers/video/stv.c indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		eventloop.h \
-		libs/indicom.h \
-		config.h \
-		drivers/video/stvdriver.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o stv.o drivers/video/stv.c
-
-stvdriver.o: drivers/video/stvdriver.c drivers/video/stvdriver.h \
-		config.h \
-		libs/indicom.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o stvdriver.o drivers/video/stvdriver.c
-
-v4ldriver.o: drivers/video/v4ldriver.cpp drivers/video/v4ldriver.h \
-		indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		libs/indicom.h \
-		eventloop.h \
-		config.h \
-		libs/webcam/v4l2_base.h \
-		libs/webcam/videodev2.h \
-		libs/webcam/v4l1_base.h \
-		libs/webcam/videodev.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4ldriver.o drivers/video/v4ldriver.cpp
-
-v4lphilips.o: drivers/video/v4lphilips.cpp drivers/video/v4lphilips.h \
-		libs/webcam/v4l1_pwc.h \
-		libs/webcam/videodev.h \
-		libs/webcam/v4l1_base.h \
-		eventloop.h \
-		drivers/video/v4ldriver.h \
-		indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h \
-		libs/indicom.h \
-		config.h \
-		libs/webcam/v4l2_base.h \
-		libs/webcam/videodev2.h \
-		libs/webcam/pwc-ioctl.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4lphilips.o drivers/video/v4lphilips.cpp
 
 Connection.o: Indi_Stellarium/src/Connection.cpp Indi_Stellarium/src/Connection.hpp \
@@ -1175,5 +908,6 @@
 		libs/lilxml.h \
 		libs/indibase/indibase.h \
-		libs/indibase/basedriver.h \
+		libs/indibase/basedevice.h \
+		libs/indibase/indiproperty.h \
 		libs/indicom.h
 	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o baseclient.o libs/indibase/baseclient.cpp
@@ -1201,10 +935,11 @@
 
 indiccd.o: libs/indibase/indiccd.cpp libs/indibase/indiccd.h \
-		libs/indibase/defaultdriver.h \
-		libs/indibase/basedriver.h \
-		indiapi.h \
-		indidevapi.h \
-		libs/lilxml.h \
-		libs/indibase/indibase.h \
+		libs/indibase/defaultdevice.h \
+		libs/indibase/basedevice.h \
+		indiapi.h \
+		indidevapi.h \
+		libs/lilxml.h \
+		libs/indibase/indibase.h \
+		libs/indibase/indiproperty.h \
 		indidriver.h \
 		libs/indibase/indiguiderinterface.h
@@ -1222,10 +957,11 @@
 
 indifilterwheel.o: libs/indibase/indifilterwheel.cpp libs/indibase/indifilterwheel.h \
-		libs/indibase/defaultdriver.h \
-		libs/indibase/basedriver.h \
-		indiapi.h \
-		indidevapi.h \
-		libs/lilxml.h \
-		libs/indibase/indibase.h \
+		libs/indibase/defaultdevice.h \
+		libs/indibase/basedevice.h \
+		indiapi.h \
+		indidevapi.h \
+		libs/lilxml.h \
+		libs/indibase/indibase.h \
+		libs/indibase/indiproperty.h \
 		indidriver.h \
 		libs/indibase/indifilterinterface.h
@@ -1233,10 +969,11 @@
 
 indifocuser.o: libs/indibase/indifocuser.cpp libs/indibase/indifocuser.h \
-		libs/indibase/defaultdriver.h \
-		libs/indibase/basedriver.h \
-		indiapi.h \
-		indidevapi.h \
-		libs/lilxml.h \
-		libs/indibase/indibase.h \
+		libs/indibase/defaultdevice.h \
+		libs/indibase/basedevice.h \
+		indiapi.h \
+		indidevapi.h \
+		libs/lilxml.h \
+		libs/indibase/indibase.h \
+		libs/indibase/indiproperty.h \
 		indidriver.h
 	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o indifocuser.o libs/indibase/indifocuser.cpp
@@ -1250,10 +987,11 @@
 
 inditelescope.o: libs/indibase/inditelescope.cpp libs/indibase/inditelescope.h \
-		libs/indibase/defaultdriver.h \
-		libs/indibase/basedriver.h \
-		indiapi.h \
-		indidevapi.h \
-		libs/lilxml.h \
-		libs/indibase/indibase.h \
+		libs/indibase/defaultdevice.h \
+		libs/indibase/basedevice.h \
+		indiapi.h \
+		indidevapi.h \
+		libs/lilxml.h \
+		libs/indibase/indibase.h \
+		libs/indibase/indiproperty.h \
 		indidriver.h \
 		libs/indicom.h
@@ -1267,45 +1005,4 @@
 	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o indiusbdevice.o libs/indibase/indiusbdevice.cpp
 
-ccvt_c2.o: libs/webcam/ccvt_c2.c libs/webcam/ccvt.h \
-		libs/webcam/ccvt_types.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o ccvt_c2.o libs/webcam/ccvt_c2.c
-
-ccvt_misc.o: libs/webcam/ccvt_misc.c libs/webcam/ccvt.h \
-		libs/webcam/ccvt_types.h
-	$(CC) -c $(CFLAGS) $(INCPATH) -o ccvt_misc.o libs/webcam/ccvt_misc.c
-
-port.o: libs/webcam/port.cpp libs/webcam/port.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o port.o libs/webcam/port.cpp
-
-PPort.o: libs/webcam/PPort.cpp libs/webcam/PPort.h \
-		libs/webcam/port.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o PPort.o libs/webcam/PPort.cpp
-
-v4l1_base.o: libs/webcam/v4l1_base.cpp libs/webcam/ccvt.h \
-		libs/webcam/v4l1_base.h \
-		libs/webcam/videodev.h \
-		eventloop.h \
-		indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4l1_base.o libs/webcam/v4l1_base.cpp
-
-v4l1_pwc.o: libs/webcam/v4l1_pwc.cpp libs/webcam/ccvt.h \
-		libs/webcam/pwc-ioctl.h \
-		libs/webcam/v4l1_pwc.h \
-		libs/webcam/videodev.h \
-		libs/webcam/v4l1_base.h \
-		eventloop.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4l1_pwc.o libs/webcam/v4l1_pwc.cpp
-
-v4l2_base.o: libs/webcam/v4l2_base.cpp libs/webcam/ccvt.h \
-		libs/webcam/v4l2_base.h \
-		libs/webcam/videodev2.h \
-		eventloop.h \
-		indidevapi.h \
-		indiapi.h \
-		libs/lilxml.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4l2_base.o libs/webcam/v4l2_base.cpp
-
 CMakeCCompilerId.o: libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c 
 	$(CC) -c $(CFLAGS) $(INCPATH) -o CMakeCCompilerId.o libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c
Index: /BAORadio/libindi/libindi/bao.sh
===================================================================
--- /BAORadio/libindi/libindi/bao.sh	(revision 696)
+++ /BAORadio/libindi/libindi/bao.sh	(revision 697)
@@ -20,11 +20,31 @@
 make clean
 rm -f *.cmake *.h *.txt Makefile *.pc 
-rm -rf CMakeFiles/*
+rm -rf CMakeFiles
 cd ../BAOcontrol
 make clean
-rm -f *.o *.cpp~ *.h~  BAOtest
+rm -f *.o *.cpp~ *.h~  BAOcontrol
+cd ../communs
+rm -f *.cpp~ *.h~
 cd ../BAOTest
 make clean
 cd ..
+rm -rf BAOcontrol-build-desktop-Qt_4_8_3__Syst_me__Debug
+rm -rf BAOcontrol-build-desktop-Qt_4_8_3__Syst_me__Release
+
+rm -f /usr/lib/libindi.so
+rm -f /usr/bin/indiserver
+rm -f /usr/lib/libindi.so.0
+rm -f /usr/lib/libindimain.a
+rm -f /usr/lib/libindidriver.a
+rm -f /usr/lib/libindiclient.a
+rm -f /usr/bin/indi_BAO
+rm -f /usr/bin/indi_getprop
+rm -f /usr/bin/indi_setprop
+rm -f /usr/bin/indi_eval
+rm -f /usr/share/indi/drivers.xml
+rm -f /usr/share/indi/indi_tcfs_sk.xml
+rm -f /usr/bin/BAOcontrol
+rm -f /usr/bin/BAOtest
+
 echo "Les fichiers ont Ã©tÃ© supprimÃ©s";
 fi
@@ -55,4 +75,5 @@
 
 cd ../BAOcontrol
+#Ã  rÃ©activer si on ajoute une nouvelle classe Ã  BAOcontrol
 qmake -project
 qmake
Index: /BAORadio/libindi/libindi/cmake_modules/FindGPHOTO2.cmake
===================================================================
--- /BAORadio/libindi/libindi/cmake_modules/FindGPHOTO2.cmake	(revision 696)
+++ /BAORadio/libindi/libindi/cmake_modules/FindGPHOTO2.cmake	(revision 697)
@@ -45,5 +45,5 @@
     endif (NOT LIBGPHOTO2_FIND_QUIETLY)
   else (LIBGPHOTO2_FOUND)
-    if (GLIBPHOTO2_FIND_REQUIRED)
+    if (LIBGPHOTO2_FIND_REQUIRED)
       message(FATAL_ERROR "libgphoto2 not found.")
     endif (LIBGPHOTO2_FIND_REQUIRED)
Index: /BAORadio/libindi/libindi/cmake_modules/FindINDI.cmake
===================================================================
--- /BAORadio/libindi/libindi/cmake_modules/FindINDI.cmake	(revision 696)
+++ /BAORadio/libindi/libindi/cmake_modules/FindINDI.cmake	(revision 697)
@@ -31,7 +31,7 @@
   )
 
- find_path(INDI_DATA_DIR drivers.xml
-    PATHS /usr/share /usr/local/share /opt ${GNUWIN32_DIR}/share
-    PATH_SUFFIXES indi
+  find_path(INDI_DATA_DIR drivers.xml
+    PATHS ${CMAKE_INSTALL_PREFIX} /usr /usr/local /opt /opt/local ${GNUWIN32_DIR}
+    PATH_SUFFIXES share/indi
   )
 
Index: /BAORadio/libindi/libindi/communs/Socket.cpp
===================================================================
--- /BAORadio/libindi/libindi/communs/Socket.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/communs/Socket.cpp	(revision 697)
@@ -181,4 +181,7 @@
         }
     }
+    
+    //TODO:: Ã  vÃ©rifier   - ajoutÃ© le 22/10/2012
+    return 0;
 }
 
Index: /BAORadio/libindi/libindi/communs/alignement.cpp
===================================================================
--- /BAORadio/libindi/libindi/communs/alignement.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/communs/alignement.cpp	(revision 697)
@@ -372,5 +372,5 @@
     double EQMQ[4][4];
 
-    Coord a1, a2, a3, m1, m2, m3, c1, c2;
+    Coord a1, a2, a3, m1, m2, m3;
 
     AzHa2XY(aa1.x, aa1.y, &a1.x, &a1.y);
@@ -762,5 +762,5 @@
     Coord c1, c2, c3, c4, m1, m2, m3, mm1, mm2, mm3, mm,mmm, result;
 
-    double i, j, k, l, m;
+    double j, k, l, m;
 
     double memBC = BC0;
Index: /BAORadio/libindi/libindi/communs/const.h
===================================================================
--- /BAORadio/libindi/libindi/communs/const.h	(revision 696)
+++ /BAORadio/libindi/libindi/communs/const.h	(revision 697)
@@ -8,9 +8,13 @@
 //////////////////////////////////////////
 
-#define VERSION "0.63"
-#define VERSION_DATE "28/09/12"
+#define VERSION "0.64"
+#define VERSION_DATE "22/10/12"
 
 //#define ET_UT 0.0
 #define ET_UT 66.185
+
+//Version Ã  utiliser avec l'antenne du LAL ?
+
+#define LAL
 
 // ParamÃštres de l'instrument
@@ -28,5 +32,5 @@
 
 #define MAXLOG 100000
-#define MAXOBJETS 1000
+#define MAXOBJETS 100
 #define MAXETOILES 250
 #define MAXANTENNES 50
Index: /BAORadio/libindi/libindi/communs/filetools.cpp
===================================================================
--- /BAORadio/libindi/libindi/communs/filetools.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/communs/filetools.cpp	(revision 697)
@@ -816,5 +816,5 @@
 	{
 
-	  fprintf (pFile, pSection->name);
+	  fprintf (pFile, "%s", pSection->name);
 	  fprintf (pFile, "\n");
 	  pKey = pSection->fils;
@@ -840,5 +840,5 @@
 	      offset = strlen (pKey->name) + 1;
 	      strcpy (str + offset, pKey->value);
-	      fprintf (pFile, str);
+	      fprintf (pFile, "%s", str);
 	      fprintf (pFile, "\n");
 	      pKey_pred = pKey;
@@ -855,4 +855,6 @@
   //nettoyage
   fclose (pFile);
+  
+  return 0;
 }
 
@@ -954,5 +956,5 @@
 {
     int ind = 0;
-    for (ind; (ind < strlen (str)) && (str[ind] != '='); ind++);
+    for (ind; (ind < (int)strlen (str)) && (str[ind] != '='); ind++);
     if (str[ind] == '=')
         return ind;
Index: /BAORadio/libindi/libindi/communs/logs.cpp
===================================================================
--- /BAORadio/libindi/libindi/communs/logs.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/communs/logs.cpp	(revision 697)
@@ -71,11 +71,15 @@
 
     if ( Taille(fichier) > TAILLEMAXLOGS ) remove(fichier.c_str());
+    
+    pFile = fopen(fichier.c_str(), "a");
 
-    if ( (pFile = fopen(fichier.c_str(), "a")) != NULL)
+    if ( pFile != NULL)
     {
         time_t rawtime;
         struct tm * timeinfo;
 
-	char buffer[80];
+	char *buffer;
+	
+	buffer = new char[100];
 	
 	// On sauvegarde la date et l'heure
@@ -83,12 +87,14 @@
         time ( &rawtime );
         timeinfo = localtime ( &rawtime );
-        strftime (buffer,80,"%c    ",timeinfo);
-        fprintf(pFile, buffer);
+        strftime (buffer, 80, "%c    ",timeinfo);
+        fprintf(pFile, "%s", buffer);
         
 	// On le sauvegarde dans le fichier log
 
-        fprintf(pFile, Message.c_str());
+        fprintf(pFile, "%s", Message.c_str());
 
         fclose(pFile);
+	
+	delete [] buffer;
     }
     else
Index: /BAORadio/libindi/libindi/config.h
===================================================================
--- /BAORadio/libindi/libindi/config.h	(revision 696)
+++ /BAORadio/libindi/libindi/config.h	(revision 697)
@@ -0,0 +1,1 @@
+ 
Index: /BAORadio/libindi/libindi/drivers.xml
===================================================================
--- /BAORadio/libindi/libindi/drivers.xml	(revision 696)
+++ /BAORadio/libindi/libindi/drivers.xml	(revision 697)
@@ -1,7 +1,3 @@
 <devGroup group="Telescopes">
-	<device label="BAO" focal_length="" aperture="">
-		<driver name="BAO">indi_BAO</driver>
-		<version>1.0</version>
-	</device>
 	<device label="LX200 Basic" focal_length="" aperture="">
 		<driver name="LX200 Basic">indi_lx200basic</driver>
@@ -122,4 +118,8 @@
 </devGroup>
 <devGroup group="Focusers">
+        <device label="Focuser Simulator">
+            <driver name="Focuser Simulator">indi_simulator_focus</driver>
+            <version>1.0</version>
+        </device>
 	<device label="RoboFocus">
                 <driver name="RoboFocus">indi_robo_focus</driver>
@@ -153,9 +153,9 @@
 <devGroup group="Video">
 	<device label="Generic Video4Linux">
-		<driver name="Video4Linux Generic Device">indi_v4l_generic</driver>
+                <driver name="Generic Video4Linux">indi_v4l_generic</driver>
 		<version>1.0</version>
 	</device>
 	<device label="Philips Webcam">
-		<driver name="Video4Linux Generic Device">indi_v4l_philips</driver>
+                <driver name="Generic Video4Linux">indi_v4l_philips</driver>
 		<version>1.0</version>
 	</device>
@@ -164,5 +164,5 @@
 		<version>0.1</version>
 	</device>
-	<device label="SBIG STV">
+        <device label="STV Guider">
 		<driver name="STV Guider">indi_sbig_stv</driver>
 		<version>0.1</version>
Index: /BAORadio/libindi/libindi/drivers/ccd/ccd_simulator.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/ccd/ccd_simulator.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/ccd/ccd_simulator.cpp	(revision 697)
@@ -24,4 +24,6 @@
 #include <string.h>
 
+#include <memory>
+
 
 // We declare an auto pointer to ccdsim.
@@ -133,13 +135,11 @@
     SetCCDParams(SimulatorSettingsN[0].value,SimulatorSettingsN[1].value,16,SimulatorSettingsN[2].value,SimulatorSettingsN[3].value);
     //  Kwiq
-    maxnoise=SimulatorSettingsN[10].value;
-    skyglow=SimulatorSettingsN[11].value;
+    maxnoise=SimulatorSettingsN[8].value;
+    skyglow=SimulatorSettingsN[9].value;
     maxval=SimulatorSettingsN[4].value;
     bias=SimulatorSettingsN[5].value;
     limitingmag=SimulatorSettingsN[7].value;
     saturationmag=SimulatorSettingsN[6].value;
-    focallength=SimulatorSettingsN[8].value;   //  focal length of the telescope in millimeters
-    OAGoffset=SimulatorSettingsN[12].value;    //  An oag is offset this much from center of scope position (arcminutes);
-    seeing=SimulatorSettingsN[9].value;        //  we get real fat stars in this one
+    OAGoffset=SimulatorSettingsN[10].value;    //  An oag is offset this much from center of scope position (arcminutes);
 
     nbuf = PrimaryCCD.getXRes() * PrimaryCCD.getYRes() * PrimaryCCD.getBPP();
@@ -154,5 +154,4 @@
 
     int nbuf;
-    SetupParms();
 
     if(HasGuideHead)
@@ -191,10 +190,8 @@
     IUFillNumber(&SimulatorSettingsN[6],"SIM_SATURATION","Saturation Mag","%4.1f",0,20,0,1.0);
     IUFillNumber(&SimulatorSettingsN[7],"SIM_LIMITINGMAG","Limiting Mag","%4.1f",0,20,0,20);
-    IUFillNumber(&SimulatorSettingsN[8],"SIM_FOCALLENGTH","Focal Length","%4.0f",0,60000,0,1000);
-    IUFillNumber(&SimulatorSettingsN[9],"SIM_FWHM","FWHM (arcseconds)","%4.2f",0,60,0,3.5);
-    IUFillNumber(&SimulatorSettingsN[10],"SIM_NOISE","CCD Noise","%4.0f",0,6000,0,50);
-    IUFillNumber(&SimulatorSettingsN[11],"SIM_SKYGLOW","Sky Glow (magnitudes)","%4.1f",0,6000,0,19.5);
-    IUFillNumber(&SimulatorSettingsN[12],"SIM_OAGOFFSET","Oag Offset (arminutes)","%4.1f",0,6000,0,0);
-    IUFillNumberVector(SimulatorSettingsNV,SimulatorSettingsN,13,deviceName(),"SIMULATOR_SETTINGS","Simulator Settings","Simulator Config",IP_RW,60,IPS_IDLE);
+    IUFillNumber(&SimulatorSettingsN[8],"SIM_NOISE","CCD Noise","%4.0f",0,6000,0,50);
+    IUFillNumber(&SimulatorSettingsN[9],"SIM_SKYGLOW","Sky Glow (magnitudes)","%4.1f",0,6000,0,19.5);
+    IUFillNumber(&SimulatorSettingsN[10],"SIM_OAGOFFSET","Oag Offset (arminutes)","%4.1f",0,6000,0,0);
+    IUFillNumberVector(SimulatorSettingsNV,SimulatorSettingsN,11,getDeviceName(),"SIMULATOR_SETTINGS","Simulator Settings","Simulator Config",IP_RW,60,IPS_IDLE);
 
 
@@ -202,8 +199,12 @@
     IUFillSwitch(&TimeFactorS[1],"10X","10x",ISS_OFF);
     IUFillSwitch(&TimeFactorS[2],"100X","100x",ISS_OFF);
-    IUFillSwitchVector(TimeFactorSV,TimeFactorS,3,deviceName(),"ON_TIME_FACTOR","Time Factor","Simulator Config",IP_RW,ISR_1OFMANY,60,IPS_IDLE);
-
-
-    //loadConfig();
+    IUFillSwitchVector(TimeFactorSV,TimeFactorS,3,getDeviceName(),"ON_TIME_FACTOR","Time Factor","Simulator Config",IP_RW,ISR_1OFMANY,60,IPS_IDLE);
+
+    IUFillNumber(&FWHMN[0],"SIM_FWHM","FWHM (arcseconds)","%4.2f",0,60,0,7.5);
+    IUFillNumberVector(&FWHMNP,FWHMN,1,"Focuser Simulator", "FWHM","FWHM",OPTIONS_TAB,IP_RO,60,IPS_IDLE);
+
+    IUFillNumber(&ScopeParametersN[0],"TELESCOPE_APERTURE","Aperture (mm)","%g",50,4000,0,0.0);
+    IUFillNumber(&ScopeParametersN[1],"TELESCOPE_FOCAL_LENGTH","Focal Length (mm)","%g",100,10000,0,0.0 );
+    IUFillNumberVector(&ScopeParametersNP,ScopeParametersN,2,"Telescope Simulator","TELESCOPE_PARAMETERS","Scope Properties",OPTIONS_TAB,IP_RW,60,IPS_OK);
 
     return true;
@@ -219,7 +220,4 @@
     defineNumber(SimulatorSettingsNV);
     defineSwitch(TimeFactorSV);
-    //IDDefText(&ConfigFileTV, NULL);
-    //IDDefSwitch(&ConfigSaveRestoreSV, NULL);
-
 
     return;
@@ -231,4 +229,8 @@
 
     INDI::CCD::updateProperties();
+
+    if (isConnected())
+        SetupParms();
+
     return true;
 }
@@ -310,6 +312,4 @@
 
         PrimaryCCD.setExposure(timeleft);
-        //ImageExposureN[0].value = timeleft;
-        //IDSetNumber(ImageExposureNP, NULL);
 
         if(timeleft < 1.0)
@@ -567,10 +567,10 @@
             } else
             {
-                IDMessage(deviceName(),"Error looking up stars, is gsc installed with appropriate environment variables set ??");
+                IDMessage(getDeviceName(),"Error looking up stars, is gsc installed with appropriate environment variables set ??");
                 //fprintf(stderr,"Error doing gsc lookup\n");
             }
             if(drawn==0)
             {
-                IDMessage(deviceName(),"Got no stars, is gsc installed with appropriate environment variables set ??");
+                IDMessage(getDeviceName(),"Got no stars, is gsc installed with appropriate environment variables set ??");
 
             }
@@ -839,5 +839,5 @@
     //  first check if it's for our device
     //IDLog("INDI::CCD::ISNewNumber %s\n",name);
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         //  This is for our device
@@ -889,5 +889,5 @@
     //}
 
-    if(strcmp(dev,deviceName())==0) {
+    if(strcmp(dev,getDeviceName())==0) {
         //  This one is for us
 
@@ -924,2 +924,20 @@
 }
 
+bool CCDSim::ISSnoopDevice (XMLEle *root)
+{
+     if (IUSnoopNumber(root,&FWHMNP)==0)
+     {
+           seeing = FWHMNP.np[0].value;
+           IDLog("CCD Simulator: New FWHM value of %g\n", seeing);
+           return true;
+     }
+
+     if (IUSnoopNumber(root,&ScopeParametersNP)==0)
+     {
+           focallength = ScopeParametersNP.np[1].value;
+           IDLog("CCD Simulator: New focalLength value of %g\n", focallength);
+           return true;
+     }
+
+     return INDI::CCD::ISSnoopDevice(root);
+}
Index: /BAORadio/libindi/libindi/drivers/ccd/ccd_simulator.h
===================================================================
--- /BAORadio/libindi/libindi/drivers/ccd/ccd_simulator.h	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/ccd/ccd_simulator.h	(revision 697)
@@ -72,5 +72,5 @@
 
         INumberVectorProperty *SimulatorSettingsNV;
-        INumber SimulatorSettingsN[13];
+        INumber SimulatorSettingsN[11];
 
         ISwitch TimeFactorS[3];
@@ -78,4 +78,12 @@
 
         bool SetupParms();
+
+        //  We are going to snoop these from focuser
+        INumberVectorProperty FWHMNP;
+        INumber FWHMN[1];
+
+        // We are going to snoop these from telescope
+        INumber ScopeParametersN[2];
+        INumberVectorProperty ScopeParametersNP;
 
     public:
@@ -114,4 +122,5 @@
         virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n);
         virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
+        virtual bool ISSnoopDevice (XMLEle *root);
 
 };
Index: /BAORadio/libindi/libindi/drivers/filter_wheel/filter_simulator.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/filter_wheel/filter_simulator.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/filter_wheel/filter_simulator.cpp	(revision 697)
@@ -19,4 +19,5 @@
 #include "filter_simulator.h"
 
+#include <memory>
 
 // We declare an auto pointer to FilterSim.
@@ -99,5 +100,6 @@
     CurrentFilter=1;
     MinFilter=1;
-    MaxFilter=7;
+    MaxFilter=5;
+    FilterSlotN[0].max = MaxFilter;
     return true;
 }
@@ -119,2 +121,26 @@
     SelectFilterDone(CurrentFilter);
 }
+
+bool FilterSim::GetFilterNames(const char* groupName)
+{
+    char filterName[MAXINDINAME];
+    char filterLabel[MAXINDILABEL];
+
+    const char *filterDesignation[5] = { "Red", "Green", "Blue", "H Alpha", "Luminosity" };
+
+    if (FilterNameT != NULL)
+        delete FilterNameT;
+
+    FilterNameT = new IText[MaxFilter];
+
+    for (int i=0; i < MaxFilter; i++)
+    {
+        snprintf(filterName, MAXINDINAME, "FILTER_SLOT_NAME_%d", i+1);
+        snprintf(filterLabel, MAXINDILABEL, "Filter #%d", i+1);
+        IUFillText(&FilterNameT[i], filterName, filterLabel, filterDesignation[i]);
+    }
+
+    IUFillTextVector(FilterNameTP, FilterNameT, MaxFilter, getDeviceName(), "FILTER_NAME", "Filter", groupName, IP_RW, 0, IPS_IDLE);
+
+    return true;
+}
Index: /BAORadio/libindi/libindi/drivers/filter_wheel/filter_simulator.h
===================================================================
--- /BAORadio/libindi/libindi/drivers/filter_wheel/filter_simulator.h	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/filter_wheel/filter_simulator.h	(revision 697)
@@ -38,5 +38,5 @@
 
         virtual bool SetFilterNames() { return false; }
-        virtual bool GetFilterNames(const char *deviceName, const char* groupName) { return false; }
+        virtual bool GetFilterNames(const char* groupName);
 
 
Index: /BAORadio/libindi/libindi/drivers/focuser/robofocus.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/focuser/robofocus.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/focuser/robofocus.cpp	(revision 697)
@@ -26,4 +26,6 @@
 #include <string.h>
 #include <sys/time.h>
+#include <unistd.h>
+#include <memory>
 
 #define RF_MAX_CMD   9
@@ -102,5 +104,4 @@
  {
      ISInit();
-     roboFocus->ISSnoopDevice(root);
  }
 
@@ -127,10 +128,10 @@
     /* Port */
     IUFillText(&PortT[0], "PORT", "Port", "/dev/ttyUSB0");
-    IUFillTextVector(&PortTP, PortT, 1, deviceName(), "DEVICE_PORT", "Ports", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
+    IUFillTextVector(&PortTP, PortT, 1, getDeviceName(), "DEVICE_PORT", "Ports", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
 
 
     /* Focuser temperature */
     IUFillNumber(&TemperatureN[0], "TEMPERATURE", "Celsius", "%6.2f", 0, 65000., 0., 10000.);
-    IUFillNumberVector(&TemperatureNP, TemperatureN, 1, deviceName(), "FOCUS_TEMPERATURE", "Temperature", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE);
+    IUFillNumberVector(&TemperatureNP, TemperatureN, 1, getDeviceName(), "FOCUS_TEMPERATURE", "Temperature", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE);
 
     /* Settings of the Robofocus */
@@ -138,5 +139,5 @@
     IUFillNumber(&SettingsN[1], "Step Delay", "Step delay", "%6.0f", 0., 255., 0., 1.0);
     IUFillNumber(&SettingsN[2], "Motor Steps", "Motor steps per tick", "%6.0f", 0., 255., 0., 1.0);
-    IUFillNumberVector(&SettingsNP, SettingsN, 3, deviceName(), "FOCUS_SETTINGS", "Settings", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
+    IUFillNumberVector(&SettingsNP, SettingsN, 3, getDeviceName(), "FOCUS_SETTINGS", "Settings", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
 
     /* Power Switches of the Robofocus */
@@ -145,33 +146,33 @@
     IUFillSwitch(&PowerSwitchesS[2], "3", "Switch 3", ISS_OFF);
     IUFillSwitch(&PowerSwitchesS[3], "4", "Switch 4", ISS_ON);
-    IUFillSwitchVector(&PowerSwitchesSP, PowerSwitchesS, 4, deviceName(), "SWTICHES", "Power", OPTIONS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE);
+    IUFillSwitchVector(&PowerSwitchesSP, PowerSwitchesS, 4, getDeviceName(), "SWTICHES", "Power", OPTIONS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE);
 
     /* Robofocus should stay within these limits */
     IUFillNumber(&MinMaxPositionN[0], "MINPOS", "Minimum Tick", "%6.0f", 1., 65000., 0., 100. );
     IUFillNumber(&MinMaxPositionN[1], "MAXPOS", "Maximum Tick", "%6.0f", 1., 65000., 0., 55000.);
-    IUFillNumberVector(&MinMaxPositionNP, MinMaxPositionN, 2, deviceName(), "FOCUS_MINMAXPOSITION", "Extrama", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
+    IUFillNumberVector(&MinMaxPositionNP, MinMaxPositionN, 2, getDeviceName(), "FOCUS_MINMAXPOSITION", "Extrama", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
 
     IUFillNumber(&MaxTravelN[0], "MAXTRAVEL", "Maximum travel", "%6.0f", 1., 64000., 0., 10000.);
-    IUFillNumberVector(&MaxTravelNP, MaxTravelN, 1, deviceName(), "FOCUS_MAXTRAVEL", "Max. travel", OPTIONS_TAB, IP_RW, 0, IPS_IDLE );
+    IUFillNumberVector(&MaxTravelNP, MaxTravelN, 1, getDeviceName(), "FOCUS_MAXTRAVEL", "Max. travel", OPTIONS_TAB, IP_RW, 0, IPS_IDLE );
 
     /* Set Robofocus position register to the this position */
     IUFillNumber(&SetRegisterPositionN[0], "SETPOS", "Position", "%6.0f", 0, 64000., 0., 0. );
-    IUFillNumberVector(&SetRegisterPositionNP, SetRegisterPositionN, 1, deviceName(), "FOCUS_REGISTERPOSITION", "Set register", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
+    IUFillNumberVector(&SetRegisterPositionNP, SetRegisterPositionN, 1, getDeviceName(), "FOCUS_REGISTERPOSITION", "Set register", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
 
     /* Backlash */
     IUFillNumber(&SetBacklashN[0], "SETBACKLASH", "Backlash", "%6.0f", -255., 255., 0., 0.);
-    IUFillNumberVector(&SetBacklashNP, SetBacklashN, 1, deviceName(), "FOCUS_BACKLASH", "Set Register", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
+    IUFillNumberVector(&SetBacklashNP, SetBacklashN, 1, getDeviceName(), "FOCUS_BACKLASH", "Set Register", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
 
     /* Robofocus` position (RO) */
     IUFillNumber(&PositionN[0], "POSITION", "Tick", "%6.0f", 0, 65000., 0., 10000.);
-    IUFillNumberVector(&PositionNP, PositionN, 1, deviceName(), "FOCUS_POSITION", "Position", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE);
+    IUFillNumberVector(&PositionNP, PositionN, 1, getDeviceName(), "FOCUS_POSITION", "Position", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE);
 
 
     /* Relative and absolute movement */
     IUFillNumber(&RelMovementN[0], "RELMOVEMENT", "Ticks", "%6.0f", -65000., 65000., 0., 100. );
-    IUFillNumberVector(&RelMovementNP, RelMovementN, 1, deviceName(), "FOCUS_RELMOVEMENT", "Relative GoTo", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
+    IUFillNumberVector(&RelMovementNP, RelMovementN, 1, getDeviceName(), "FOCUS_RELMOVEMENT", "Relative GoTo", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
 
     IUFillNumber(&AbsMovementN[0], "ABSMOVEMENT", "Tick", "%6.0f", 0, 65000., 0., 10000.);
-    IUFillNumberVector(&AbsMovementNP, AbsMovementN, 1, deviceName(), "FOCUS_ABSMOVEMENT", "Absolute GoTo", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
+    IUFillNumberVector(&AbsMovementNP, AbsMovementN, 1, getDeviceName(), "FOCUS_ABSMOVEMENT", "Absolute GoTo", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
 
 
@@ -245,5 +246,5 @@
             IDLog("Failed to connect o port %s. Error: %s", PortT[0].text, errorMsg);
 
-        IDMessage(deviceName(), "Failed to connect to port %s. Error: %s", PortT[0].text, errorMsg);
+        IDMessage(getDeviceName(), "Failed to connect to port %s. Error: %s", PortT[0].text, errorMsg);
 
         return false;
@@ -254,13 +255,13 @@
     {
       /* This would be the end*/
-        IDMessage( deviceName(), "Unknown error while reading Robofocus firmware\n");
+        IDMessage( getDeviceName(), "Unknown error while reading Robofocus firmware\n");
         return false;
     }
 
-    IDMessage(deviceName(), "Robofocus is online. Getting focus parameters...");
+    IDMessage(getDeviceName(), "Robofocus is online. Getting focus parameters...");
 
     GetFocusParams();
 
-    IDMessage(deviceName(), "RoboFocus paramaters readout complete, focuser ready for use.");
+    IDMessage(getDeviceName(), "RoboFocus paramaters readout complete, focuser ready for use.");
 
     return true;
@@ -270,5 +271,5 @@
 {
     tty_disconnect(PortFD);
-    IDMessage(deviceName(), "RoboFocus is offline.");
+    IDMessage(getDeviceName(), "RoboFocus is offline.");
     return true;
 }
@@ -390,5 +391,5 @@
               {
                   IDLog("TTY error detected: %s\n", robofocus_error);
-                  IDMessage(deviceName(), "TTY error detected: %s\n", robofocus_error);
+                  IDMessage(getDeviceName(), "TTY error detected: %s\n", robofocus_error);
               }
               return false;
@@ -848,5 +849,5 @@
 bool RoboFocus::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
 {
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         // ===================================
@@ -870,5 +871,5 @@
 bool RoboFocus::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 {
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         if (!strcmp (name, PowerSwitchesSP.name))
@@ -951,5 +952,5 @@
     int nset=0,i=0;
 
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
 
@@ -1086,5 +1087,5 @@
                 IDSetNumber(&PositionNP, "Robofocus position recovered %5.0f", currentPosition);
 
-                IDMessage( deviceName(), "Robofocus position recovered resuming normal operation");
+                IDMessage( getDeviceName(), "Robofocus position recovered resuming normal operation");
 
                 /* We have to leave here, because new_rpos is not set */
@@ -1170,5 +1171,5 @@
                 PositionNP.s = IPS_OK;
                 IDSetNumber(&PositionNP, "Robofocus position recovered %5.0f", currentPosition);
-                IDMessage( deviceName(), "Robofocus position recovered resuming normal operation");
+                IDMessage( getDeviceName(), "Robofocus position recovered resuming normal operation");
                 /* We have to leave here, because new_apos is not set */
                 return false;
@@ -1405,5 +1406,5 @@
                 PositionNP.s = IPS_OK;
                 IDSetNumber(&PositionNP, "Robofocus position recovered %5.0f", currentPosition);
-                IDMessage( deviceName(), "Robofocus position recovered resuming normal operation");
+                IDMessage( getDeviceName(), "Robofocus position recovered resuming normal operation");
                 /* We have to leave here, because new_apos is not set */
                 return true ;
Index: /BAORadio/libindi/libindi/drivers/focuser/tcfs.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/focuser/tcfs.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/focuser/tcfs.cpp	(revision 697)
@@ -156,5 +156,5 @@
     static int propInit=0;
 
-    INDI::DefaultDriver::ISGetProperties(dev);
+    INDI::DefaultDevice::ISGetProperties(dev);
 
     if (propInit == 0)
@@ -239,5 +239,5 @@
     if (tty_connect(tProp->tp[0].text, 19200, 8, 0, 1, &fd) != TTY_OK)
     {
-        IDMessage(deviceName(), "Error connecting to port %s. Make sure you have BOTH read and write permission to the port.", tProp->tp[0].text);
+        IDMessage(getDeviceName(), "Error connecting to port %s. Make sure you have BOTH read and write permission to the port.", tProp->tp[0].text);
 	return false;
     }
@@ -251,5 +251,5 @@
             if (!strcmp(response, "!"))
             {
-                IDMessage(deviceName(), "Successfully connected to TCF-S Focuser in Manual Mode.");
+                IDMessage(getDeviceName(), "Successfully connected to TCF-S Focuser in Manual Mode.");
 
                 IUResetSwitch(FocusModeSP);
@@ -274,5 +274,5 @@
     }
 
-    IDMessage(deviceName(), "Error connecting to TCF-S focuser...");
+    IDMessage(getDeviceName(), "Error connecting to TCF-S focuser...");
     return false;
 
@@ -316,5 +316,5 @@
   {
       resetProperties();
-      IDMessage(deviceName(), "TCF-S is offline. Connect before issiung any commands.");
+      IDMessage(getDeviceName(), "TCF-S is offline. Connect before issiung any commands.");
       return false;
   }
@@ -355,5 +355,5 @@
   }
 
-  return DefaultDriver::ISNewNumber (dev, name, values, names, n);
+  return DefaultDevice::ISNewNumber (dev, name, values, names, n);
     
 }
@@ -383,5 +383,5 @@
 
 
-    return DefaultDriver::ISNewText(dev, name, texts, names, n);
+    return DefaultDevice::ISNewText(dev, name, texts, names, n);
 	
 }
@@ -396,5 +396,5 @@
     ISwitch *current_active_switch = NULL, *target_active_switch = NULL;
     // First process parent!
-    if (INDI::DefaultDriver::ISNewSwitch(deviceName(), name, states, names, n) == true)
+    if (INDI::DefaultDevice::ISNewSwitch(getDeviceName(), name, states, names, n) == true)
         return true;
 
@@ -417,5 +417,5 @@
     {
       resetProperties();
-      IDMessage(deviceName(), "TCF-S is offline. Connect before issiung any commands.");
+      IDMessage(getDeviceName(), "TCF-S is offline. Connect before issiung any commands.");
       return false;
     }
@@ -664,5 +664,5 @@
 
 
-    return DefaultDriver::ISNewSwitch(dev, name, states, names, n);
+    return DefaultDevice::ISNewSwitch(dev, name, states, names, n);
 }
 
Index: /BAORadio/libindi/libindi/drivers/focuser/tcfs.h
===================================================================
--- /BAORadio/libindi/libindi/drivers/focuser/tcfs.h	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/focuser/tcfs.h	(revision 697)
@@ -27,5 +27,5 @@
 #include <indidevapi.h>
 #include <indicom.h>
-#include <indibase/defaultdriver.h>
+#include <indibase/defaultdevice.h>
 
 using namespace std;
@@ -35,5 +35,5 @@
 #define TCFS_ERROR_BUFFER   1024
 
-class TCFS : public INDI::DefaultDriver
+class TCFS : public INDI::DefaultDevice
 {
 
Index: /BAORadio/libindi/libindi/drivers/telescope/BAO.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/telescope/BAO.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/telescope/BAO.cpp	(revision 697)
@@ -652,45 +652,51 @@
             else if (chaine[0] == 'M')
             {
-                IDSetText(&CommandTP, "Calcul des matrices de correction\n" );
-
-                if  (Sockets[targetAlignmentIP].AlignementAntenne->nbrcorrections >=3 )
+                if (targetAlignmentIP != -1)
                 {
-                    Sockets[targetAlignmentIP].AlignementAntenne->AlignementEnCours = 0;
-		    
-		    Sockets[targetAlignmentIP].AlignementAntenne->InitParametresInstrument();
-		    
-                    Sockets[targetAlignmentIP].AlignementAntenne->CalculerMatriceCorrection(targetRA, targetDEC);
-		    
-		     Sockets[targetAlignmentIP].AlignementAntenne->EnregistrementParametresAlignement(
+                    IDSetText(&CommandTP, "Calcul des matrices de correction\n" );
+
+                    if  (Sockets[targetAlignmentIP].AlignementAntenne->nbrcorrections >=3 )
+                    {
+                        Sockets[targetAlignmentIP].AlignementAntenne->AlignementEnCours = 0;
+
+                        Sockets[targetAlignmentIP].AlignementAntenne->InitParametresInstrument();
+
+                        Sockets[targetAlignmentIP].AlignementAntenne->CalculerMatriceCorrection(targetRA, targetDEC);
+
+                        Sockets[targetAlignmentIP].AlignementAntenne->EnregistrementParametresAlignement(
+                            Sockets[targetAlignmentIP].IP,
+                            "/home/" + (string)getenv("USER") + "/AlignementAntennes.cfg");
+                    }
+                    else
+                    {
+                        Sockets[targetAlignmentIP].AlignementAntenne->Identity();
+
+                        Sockets[targetAlignmentIP].AlignementAntenne->Matrice_ok = false;
+                    }
+                }
+            }
+            else if (chaine[0] == 'R')
+            {
+                if (targetAlignmentIP != -1)
+                {
+                    IDSetText(&CommandTP, "Reinitialisation de la matrice de correction\n" );
+
+                    Sockets[targetAlignmentIP].AlignementAntenne->InitParametresInstrument();
+
+                    Sockets[targetAlignmentIP].AlignementAntenne->Identity();
+
+                    Sockets[targetAlignmentIP].AlignementAntenne->Matrice_ok = false;
+
+                    Sockets[targetAlignmentIP].AlignementAntenne->EnregistrementParametresAlignement(
                         Sockets[targetAlignmentIP].IP,
                         "/home/" + (string)getenv("USER") + "/AlignementAntennes.cfg");
                 }
-                else
-                {
-                    Sockets[targetAlignmentIP].AlignementAntenne->Identity();
-
-                    Sockets[targetAlignmentIP].AlignementAntenne->Matrice_ok = false;
-                }
-            }
-            else if (chaine[0] == 'R')
-            {
-                IDSetText(&CommandTP, "Reinitialisation de la matrice de correction\n" );
-
-                 Sockets[targetAlignmentIP].AlignementAntenne->InitParametresInstrument();
-		 
-		 Sockets[targetAlignmentIP].AlignementAntenne->Identity();
-
-                Sockets[targetAlignmentIP].AlignementAntenne->Matrice_ok = false;
-		
-		 Sockets[targetAlignmentIP].AlignementAntenne->EnregistrementParametresAlignement(
-                        Sockets[targetAlignmentIP].IP,
-                        "/home/" + (string)getenv("USER") + "/AlignementAntennes.cfg");
-	    }
+            }
             else if (chaine[0] == 'O')
             {
-                IDSetText(&CommandTP, "Optimisation de la geometrie de l antenne\n" );
-
                 if (targetAlignmentIP != -1)
                 {
+                    IDSetText(&CommandTP, "Optimisation de la geometrie de l antenne\n" );
+
                     Sockets[targetAlignmentIP].AlignementAntenne->OptimisationGeometrieAntenne(true);
 
@@ -1798,5 +1804,5 @@
 
                     double az, ha, ad, de;
-		    
+
                     int num = Sockets[i].AlignementAntenne->nbrcorrections;
 
Index: /BAORadio/libindi/libindi/drivers/telescope/celestrongps.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/telescope/celestrongps.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/telescope/celestrongps.cpp	(revision 697)
@@ -447,4 +447,6 @@
 	  
 	  if (IUUpdateSwitch(&OnCoordSetSP, states, names, n) < 0) return;
+          OnCoordSetSP.s = IPS_OK;
+          IDSetSwitch(&OnCoordSetSP, NULL);
 	  currentSet = getOnSwitch(&OnCoordSetSP);
 	}
@@ -524,7 +526,5 @@
 	 last_move = getOnSwitch(&MovementNSSP);
 
-	 if (IUUpdateSwitch(&MovementNSSP, states, names, n) < 0)
-        IDLog("fixme!!! - IUUpdateSwitch MovementNSSP\n");
-	//	return;
+         IUUpdateSwitch(&MovementNSSP, states, names, n);
 
 	current_move = getOnSwitch(&MovementNSSP);
Index: /BAORadio/libindi/libindi/drivers/telescope/lx200basic.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/telescope/lx200basic.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/telescope/lx200basic.cpp	(revision 697)
@@ -45,5 +45,5 @@
 
 const int POLLMS = 1000;				// Period of update, 1 second.
-const char *mydev = "LX200 Basic";			// Name of our device.
+char *mydev;                            // Name of our device.
 
 const char *BASIC_GROUP    = "Main Control";		// Main Group
@@ -151,4 +151,13 @@
 LX200Basic::LX200Basic()
 {
+    mydev = new char[MAXINDIDEVICE];
+
+    char *envDev = getenv("INDIDEV");
+
+    if (envDev != NULL)
+        strncpy(mydev, envDev, MAXINDIDEVICE);
+    else
+        strncpy(mydev, "LX200 Basic", MAXINDIDEVICE);
+
    init_properties();
 
Index: /BAORadio/libindi/libindi/drivers/telescope/lx200fs2.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/telescope/lx200fs2.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/telescope/lx200fs2.cpp	(revision 697)
@@ -64,5 +64,5 @@
 
    IDLog("Initilizing from LX200 FS2 device...\n");
-   IDLog("Driver Version: 2011-01-02\n");
+   IDLog("Driver Version: 2012-07-22\n");
  
    //enableSimulation(true);  
@@ -151,5 +151,8 @@
   
   if (FirmwareVerNP.np[0].value < 1.19)
-	return getLX200RA(fd, &x); // Version 1.18 and below don't support ACK command
+  {
+	getLX200RA(fd, &x);
+	return getLX200DEC(fd, &x); // Version 1.18 and below don't support ACK command
+  }
   else
 	return check_lx200_connection(fd);
@@ -216,7 +219,5 @@
 void LX200Fs2::getBasicData()
 {
-
-  // process parent first
-   LX200Generic::getBasicData();
+  //LX200Generic::getBasicData()
   // Make sure short
   //checkLX200Format(fd);
Index: /BAORadio/libindi/libindi/drivers/telescope/lx200generic.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/telescope/lx200generic.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/telescope/lx200generic.cpp	(revision 697)
@@ -507,9 +507,9 @@
 
  }
-
+ IEAddTimer (POLLMS, ISPoll, NULL);
 }
 
 void ISGetProperties (const char *dev)
-{ ISInit(); telescope->ISGetProperties(dev); IEAddTimer (POLLMS, ISPoll, NULL);}
+{ ISInit(); telescope->ISGetProperties(dev);}
 void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 { ISInit(); telescope->ISNewSwitch(dev, name, states, names, n);}
@@ -555,7 +555,7 @@
    IDLog("INDI Library v%g\n", INDI_LIBV);
    IDLog("initilizaing from generic LX200 device...\n");
-   IDLog("Driver Version: 2008-05-21\n");
+   IDLog("Driver Version: 2012-07-27\n");
  
-   //enableSimulation(true);  
+   //enableSimulation(true);
 }
 
@@ -1750,5 +1750,5 @@
 		mountSim();
 		return;
-        }
+	}
 
 	if ( (err = getLX200RA(fd, &currentRA)) < 0 || (err = getLX200DEC(fd, &currentDEC)) < 0)
@@ -1777,5 +1777,5 @@
         break;
 
-        case IPS_BUSY:
+	case IPS_BUSY:
 	    dx = targetRA - currentRA;
 	    dy = targetDEC - currentDEC;
@@ -1789,6 +1789,6 @@
 	       EquatorialCoordsWNP.s = IPS_OK;
 	       IDSetNumber(&EquatorialCoordsWNP, "Slew is complete, target locked...");
-	       
-	    break;
+		}  
+		break;
 
 	case IPS_OK:
@@ -1801,5 +1801,5 @@
 }
 
-}
+
 // wildi nothing changed in LX200Generic::mountSim
 void LX200Generic::mountSim ()
@@ -2117,4 +2117,5 @@
 	}
 	
+	 tty_disconnect(fd); // Close if already open
 	 if (tty_connect(PortTP.tp[0].text, 9600, 8, 0, 1, &fd) != TTY_OK)
 	 {
Index: /BAORadio/libindi/libindi/drivers/telescope/magellan1.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/telescope/magellan1.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/telescope/magellan1.cpp	(revision 697)
@@ -98,4 +98,8 @@
 void ISInit()
 {
+  static int isInit=0;
+	
+  if (isInit)
+	  return;
   if (telescope == NULL)
   {
@@ -104,8 +108,11 @@
     telescope->setCurrentDeviceName(mydev);
   }
+ 
+  isInit = 1;
+  IEAddTimer (POLLMS, ISPoll, NULL);
 }
 
 void ISGetProperties (const char *dev)
-{ ISInit(); telescope->ISGetProperties(dev); IEAddTimer (POLLMS, ISPoll, NULL);}
+{ ISInit(); telescope->ISGetProperties(dev);}
 
 void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
Index: /BAORadio/libindi/libindi/drivers/telescope/synscanmount.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/telescope/synscanmount.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/telescope/synscanmount.cpp	(revision 697)
@@ -119,7 +119,4 @@
 void SynscanMount::ISGetProperties (const char *dev)
 {
-    //if (isDebug())
-        IDLog("Enter SynscanMount::ISGetProperties %s\n",dev);
-
     //  First we let our parent class do it's thing
     INDI::Telescope::ISGetProperties(dev);
@@ -147,6 +144,6 @@
         //  this is not a correct echo
         //if (isDebug())
-            IDLog("ReadStatus Echo Fail\n");
-        IDMessage(deviceName(),"Mount Not Responding");
+            IDLog("ReadStatus Echo Fail. %s\n", str);
+        IDMessage(getDeviceName(),"Mount Not Responding");
         return false;
     }
@@ -183,5 +180,5 @@
             ParkSV->s=IPS_OK;
             IDSetSwitch(ParkSV,NULL);
-            IDMessage(deviceName(),"Telescope is Parked.");
+            IDMessage(getDeviceName(),"Telescope is Parked.");
         }
 
@@ -276,5 +273,5 @@
 
     TrackState=SCOPE_PARKING;
-    IDMessage(deviceName(),"Parking Telescope...");
-    return true;
-}
+    IDMessage(getDeviceName(),"Parking Telescope...");
+    return true;
+}
Index: /BAORadio/libindi/libindi/drivers/telescope/telescope_simulator.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/telescope/telescope_simulator.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/telescope/telescope_simulator.cpp	(revision 697)
@@ -9,4 +9,6 @@
 #include "telescope_simulator.h"
 #include "indicom.h"
+
+#include <memory>
 
 // We declare an auto pointer to ScopeSim.
@@ -126,30 +128,36 @@
     IUFillNumber(&GuideNSN[GUIDE_NORTH], "TIMED_GUIDE_N", "North (sec)", "%g", 0, 10, 0.001, 0);
     IUFillNumber(&GuideNSN[GUIDE_SOUTH], "TIMED_GUIDE_S", "South (sec)", "%g", 0, 10, 0.001, 0);
-    IUFillNumberVector(GuideNSNP, GuideNSN, 2, deviceName(), "TELESCOPE_TIMED_GUIDE_NS", "Guide North/South", MOTION_TAB, IP_RW, 0, IPS_IDLE);
+    IUFillNumberVector(GuideNSNP, GuideNSN, 2, getDeviceName(), "TELESCOPE_TIMED_GUIDE_NS", "Guide North/South", MOTION_TAB, IP_RW, 0, IPS_IDLE);
 
     /* Property for guider support. How many seconds to guide either westward or eastward? */
     IUFillNumber(&GuideWEN[GUIDE_WEST], "TIMED_GUIDE_W", "West (sec)", "%g", 0, 10, 0.001, 0);
     IUFillNumber(&GuideWEN[GUIDE_EAST], "TIMED_GUIDE_E", "East (sec)", "%g", 0, 10, 0.001, 0);
-    IUFillNumberVector(GuideWENP, GuideWEN, 2, deviceName(), "TELESCOPE_TIMED_GUIDE_WE", "Guide West/East", MOTION_TAB, IP_RW, 0, IPS_IDLE);
+    IUFillNumberVector(GuideWENP, GuideWEN, 2, getDeviceName(), "TELESCOPE_TIMED_GUIDE_WE", "Guide West/East", MOTION_TAB, IP_RW, 0, IPS_IDLE);
 
     /* Simulated periodic error in RA, DEC */
     IUFillNumber(&EqPECN[RA_AXIS],"RA_PEC","RA (hh:mm:ss)","%010.6m",0,24,0,15.);
     IUFillNumber(&EqPECN[DEC_AXIS],"DEC_PEC","DEC (dd:mm:ss)","%010.6m",-90,90,0,15.);
-    IUFillNumberVector(EqPECNV,EqPECN,2,deviceName(),"EQUATORIAL_PEC","Periodic Error",MOTION_TAB,IP_RO,60,IPS_IDLE);
+    IUFillNumberVector(EqPECNV,EqPECN,2,getDeviceName(),"EQUATORIAL_PEC","Periodic Error",MOTION_TAB,IP_RO,60,IPS_IDLE);
 
     /* Enable client to manually add periodic error northward or southward for simulation purposes */
     IUFillSwitch(&PECErrNSS[MOTION_NORTH], "PEC_N", "North", ISS_OFF);
     IUFillSwitch(&PECErrNSS[MOTION_SOUTH], "PEC_S", "South", ISS_OFF);
-    IUFillSwitchVector(PECErrNSSP, PECErrNSS, 2, deviceName(),"PEC_NS", "PE N/S", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
+    IUFillSwitchVector(PECErrNSSP, PECErrNSS, 2, getDeviceName(),"PEC_NS", "PE N/S", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
 
     /* Enable client to manually add periodic error westward or easthward for simulation purposes */
     IUFillSwitch(&PECErrWES[MOTION_WEST], "PEC_W", "West", ISS_OFF);
     IUFillSwitch(&PECErrWES[MOTION_EAST], "PEC_E", "East", ISS_OFF);
-    IUFillSwitchVector(PECErrWESP, PECErrWES, 2, deviceName(),"PEC_WE", "PE W/E", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
+    IUFillSwitchVector(PECErrWESP, PECErrWES, 2, getDeviceName(),"PEC_WE", "PE W/E", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
 
     /* How fast do we guide compared to sideral rate */
     IUFillNumber(&GuideRateN[RA_AXIS], "GUIDE_RATE_WE", "W/E Rate", "%g", 0, 1, 0.1, 0.3);
     IUFillNumber(&GuideRateN[DEC_AXIS], "GUIDE_RATE_NS", "N/S Rate", "%g", 0, 1, 0.1, 0.3);
-    IUFillNumberVector(GuideRateNP, GuideRateN, 2, deviceName(), "GUIDE_RATE", "Guiding Rate", MOTION_TAB, IP_RW, 0, IPS_IDLE);
+    IUFillNumberVector(GuideRateNP, GuideRateN, 2, getDeviceName(), "GUIDE_RATE", "Guiding Rate", MOTION_TAB, IP_RW, 0, IPS_IDLE);
+
+    // Let's simulate it to be an F/10 8" telescope
+    ScopeParametersN[0].value = 203;
+    ScopeParametersN[1].value = 2000;
+
+    TrackState=SCOPE_IDLE;
 
     /* Add debug controls so we may debug driver if necessary */
@@ -197,5 +205,5 @@
         deleteProperty(EqPECNV->name);
         deleteProperty(PECErrNSSP->name);
-        deleteProperty(PECErrNSSP->name);
+        deleteProperty(PECErrWESP->name);
         deleteProperty(GuideRateNP->name);
     }
@@ -218,7 +226,7 @@
 }
 
-bool ScopeSim::Connect(char *)
-{
-    return true;
+bool ScopeSim::Connect(char *port)
+{
+   return true;
 }
 
@@ -292,7 +300,7 @@
     switch (TrackState)
     {
-    case SCOPE_IDLE:
+    /*case SCOPE_IDLE:
         EqNV->s = IPS_IDLE;
-        break;
+        break;*/
     case SCOPE_SLEWING:
     case SCOPE_PARKING:
@@ -340,5 +348,5 @@
 
                 EqNV->s = IPS_OK;
-                IDMessage(deviceName(), "Telescope slew is complete. Tracking...");
+                IDMessage(getDeviceName(), "Telescope slew is complete. Tracking...");
             }
             else
@@ -346,5 +354,5 @@
                 TrackState = SCOPE_PARKED;
                 EqNV->s = IPS_IDLE;
-                IDMessage(deviceName(), "Telescope parked successfully.");
+                IDMessage(getDeviceName(), "Telescope parked successfully.");
             }
         }
@@ -352,4 +360,5 @@
         break;
 
+    case SCOPE_IDLE:
     case SCOPE_TRACKING:
         /* tracking */
@@ -491,6 +500,25 @@
     EqNV->s    = IPS_BUSY;
 
-    IDMessage(deviceName(), "Slewing to RA: %s - DEC: %s", RAStr, DecStr);
+    IDMessage(getDeviceName(), "Slewing to RA: %s - DEC: %s", RAStr, DecStr);
     return true;
+}
+
+bool ScopeSim::Sync(double ra, double dec)
+{
+    currentRA  = ra;
+    currentDEC = dec;
+
+    EqPECN[RA_AXIS].value = ra;
+    EqPECN[DEC_AXIS].value = dec;
+    IDSetNumber(EqPECNV, NULL);
+
+    IDMessage(getDeviceName(), "Sync is successful.");
+
+    TrackState = SCOPE_IDLE;
+    EqReqNV->s = IPS_OK;
+    EqNV->s    = IPS_OK;
+
+
+    NewRaDec(currentRA, currentDEC);
 }
 
@@ -501,5 +529,5 @@
     Parked=true;
     TrackState = SCOPE_PARKING;
-    IDMessage(deviceName(), "Parking telescope in progress...");
+    IDMessage(getDeviceName(), "Parking telescope in progress...");
     return true;
 }
@@ -509,5 +537,5 @@
     //  first check if it's for our device
 
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         //  This is for our device
@@ -517,10 +545,10 @@
 
              // Unless we're in track mode, we don't obey guide commands.
-             if (TrackState != SCOPE_TRACKING)
-             {
-                 GuideNSNP->s = IPS_IDLE;
-                 IDSetNumber(GuideNSNP, NULL);
-                 return true;
-             }
+             //if (TrackState != SCOPE_TRACKING)
+             //{
+                // GuideNSNP->s = IPS_IDLE;
+                 //IDSetNumber(GuideNSNP, NULL);
+                 //return true;
+             //}
 
              IUUpdateNumber(GuideNSNP, values, names, n);
@@ -532,10 +560,10 @@
          {
              // Unless we're in track mode, we don't obey guide commands.
-             if (TrackState != SCOPE_TRACKING)
-             {
-                 GuideWENP->s = IPS_IDLE;
-                 IDSetNumber(GuideWENP, NULL);
-                 return true;
-             }
+             //if (TrackState != SCOPE_TRACKING)
+             //{
+                 //GuideWENP->s = IPS_IDLE;
+                 //IDSetNumber(GuideWENP, NULL);
+                 //return true;
+             //}
 
              IUUpdateNumber(GuideWENP, values, names, n);
@@ -566,5 +594,5 @@
     //}
 
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         if(strcmp(name,"PEC_NS")==0)
Index: /BAORadio/libindi/libindi/drivers/telescope/telescope_simulator.h
===================================================================
--- /BAORadio/libindi/libindi/drivers/telescope/telescope_simulator.h	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/telescope/telescope_simulator.h	(revision 697)
@@ -18,5 +18,4 @@
         INumber GuideNSN[2];
         INumberVectorProperty *GuideNSNP;
-
 
         INumber GuideWEN[2];
@@ -56,4 +55,5 @@
         bool Goto(double,double);
         bool Park();
+        bool Sync(double ra, double dec);
 
 };
Index: /BAORadio/libindi/libindi/drivers/telescope/temmadriver.c
===================================================================
--- /BAORadio/libindi/libindi/drivers/telescope/temmadriver.c	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/telescope/temmadriver.c	(revision 697)
@@ -34,5 +34,6 @@
 #include <config.h>
 
-#include <libnova.h>
+//le fichier include Ã©tait Ã  l'origine <libnova.h>
+#include <libnova/libnova.h>
 
 #include "indicom.h"
Index: /BAORadio/libindi/libindi/drivers/video/indi_v4l.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/video/indi_v4l.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/video/indi_v4l.cpp	(revision 697)
@@ -30,5 +30,5 @@
   {
     MainCam = new V4L_Driver();
-    MainCam->initProperties("Video4Linux Generic Device");
+    MainCam->initProperties("Generic Video4Linux");
     MainCam->initCamBase();
   }
Index: /BAORadio/libindi/libindi/drivers/video/v4ldriver.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/video/v4ldriver.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/video/v4ldriver.cpp	(revision 697)
@@ -74,5 +74,5 @@
   /* Expose */
   IUFillNumber(&ExposeTimeN[0], "CCD_EXPOSURE_VALUE", "Duration (s)", "%5.2f", 0., 36000., 0.5, 1.);
-  IUFillNumberVector(&ExposeTimeNP, ExposeTimeN, NARRAY(ExposeTimeN), dev, "CCD_EXPOSURE", "Expose", COMM_GROUP, IP_RW, 60, IPS_IDLE);
+  IUFillNumberVector(&ExposeTimeNP, ExposeTimeN, NARRAY(ExposeTimeN), dev, "CCD_EXPOSURE_REQUEST", "Expose", COMM_GROUP, IP_RW, 60, IPS_IDLE);
 
 /* Frame Rate */
@@ -130,9 +130,5 @@
 void V4L_Driver::initCamBase()
 {
-   #ifndef HAVE_LINUX_VIDEODEV2_H
-    v4l_base = new V4L1_Base();
-   #else
     v4l_base = new V4L2_Base();
-   #endif
 }
 
@@ -218,4 +214,6 @@
        
           
+       v4l_base->stop_capturing(errmsg);
+
        if (StreamS[0].s == ISS_ON)
        {
@@ -373,6 +371,6 @@
          return;
     
-        if (StreamS[0].s == ISS_ON) 
-          v4l_base->stop_capturing(errmsg);
+        //if (StreamS[0].s == ISS_ON)
+    v4l_base->stop_capturing(errmsg);
 
 	StreamS[0].s  = ISS_OFF;
Index: /BAORadio/libindi/libindi/drivers/video/v4lphilips.cpp
===================================================================
--- /BAORadio/libindi/libindi/drivers/video/v4lphilips.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/drivers/video/v4lphilips.cpp	(revision 697)
@@ -125,7 +125,7 @@
 void V4L_Philips::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 {
-	/* ignore if not ours */
+    /* ignore if not ours */
      if (dev && strcmp (device_name, dev))
-	 return;
+     return;
 
      /* Connection */
@@ -133,9 +133,9 @@
      {
           IUResetSwitch(&PowerSP);
-	  IUUpdateSwitch(&PowerSP, states, names, n);
-   	  connectCamera();
-	  return;
-     }
-    
+      IUUpdateSwitch(&PowerSP, states, names, n);
+      connectCamera();
+      return;
+     }
+
 
      #ifndef HAVE_LINUX_VIDEODEV2_H
@@ -145,39 +145,39 @@
        if (checkPowerS(&AntiFlickerSP))
          return;
-	 
+
        AntiFlickerSP.s = IPS_IDLE;
-       
+
        IUResetSwitch(&AntiFlickerSP);
        IUUpdateSwitch(&AntiFlickerSP, states, names, n);
-       
+
        if (AntiFlickerS[0].s == ISS_ON)
        {
          if (v4l_pwc->setFlicker(true, errmsg) < 0)
-	 {
-	   AntiFlickerS[0].s = ISS_OFF;
-	   AntiFlickerS[1].s = ISS_ON;
-	   IDSetSwitch(&AntiFlickerSP, "%s", errmsg);
-	   return;
-	 }
-	 
-	 AntiFlickerSP.s = IPS_OK;
-	 IDSetSwitch(&AntiFlickerSP, NULL);
+     {
+       AntiFlickerS[0].s = ISS_OFF;
+       AntiFlickerS[1].s = ISS_ON;
+       IDSetSwitch(&AntiFlickerSP, "%s", errmsg);
+       return;
+     }
+
+     AntiFlickerSP.s = IPS_OK;
+     IDSetSwitch(&AntiFlickerSP, NULL);
        }
        else
        {
          if (v4l_pwc->setFlicker(false, errmsg) < 0)
-	 {
-	   AntiFlickerS[0].s = ISS_ON;
-	   AntiFlickerS[1].s = ISS_OFF;
-	   IDSetSwitch(&AntiFlickerSP, "%s", errmsg);
-	   return;
-	 }
-	 
-	 IDSetSwitch(&AntiFlickerSP, NULL);
-       }
-       
-       return;
-    }
-    
+     {
+       AntiFlickerS[0].s = ISS_ON;
+       AntiFlickerS[1].s = ISS_OFF;
+       IDSetSwitch(&AntiFlickerSP, "%s", errmsg);
+       return;
+     }
+
+     IDSetSwitch(&AntiFlickerSP, NULL);
+       }
+
+       return;
+    }
+
     /* Back light compensation */
     if (!strcmp (BackLightSP.name, name))
@@ -185,39 +185,39 @@
        if (checkPowerS(&BackLightSP))
          return;
-	 
+
        BackLightSP.s = IPS_IDLE;
-       
+
        IUResetSwitch(&BackLightSP);
        IUUpdateSwitch(&BackLightSP, states, names, n);
-       
+
        if (BackLightS[0].s == ISS_ON)
        {
          if (v4l_pwc->setBackLight(true, errmsg) < 0)
-	 {
-	   BackLightS[0].s = ISS_OFF;
-	   BackLightS[1].s = ISS_ON;
-	   IDSetSwitch(&BackLightSP, "%s", errmsg);
-	   return;
-	 }
-	 
-	 BackLightSP.s = IPS_OK;
-	 IDSetSwitch(&BackLightSP, NULL);
+     {
+       BackLightS[0].s = ISS_OFF;
+       BackLightS[1].s = ISS_ON;
+       IDSetSwitch(&BackLightSP, "%s", errmsg);
+       return;
+     }
+
+     BackLightSP.s = IPS_OK;
+     IDSetSwitch(&BackLightSP, NULL);
        }
        else
        {
          if (v4l_pwc->setBackLight(false, errmsg) < 0)
-	 {
-	   BackLightS[0].s = ISS_ON;
-	   BackLightS[1].s = ISS_OFF;
-	   IDSetSwitch(&BackLightSP, "%s", errmsg);
-	   return;
-	 }
-	 
-	 IDSetSwitch(&BackLightSP, NULL);
-       }
-       
-       return;
-    }
-	 
+     {
+       BackLightS[0].s = ISS_ON;
+       BackLightS[1].s = ISS_OFF;
+       IDSetSwitch(&BackLightSP, "%s", errmsg);
+       return;
+     }
+
+     IDSetSwitch(&BackLightSP, NULL);
+       }
+
+       return;
+    }
+
     /* Noise reduction control */
     if (!strcmp (NoiseReductionSP.name, name))
@@ -225,31 +225,31 @@
        if (checkPowerS(&NoiseReductionSP))
          return;
-	 
+
        NoiseReductionSP.s = IPS_IDLE;
-       
+
        IUResetSwitch(&NoiseReductionSP);
        IUUpdateSwitch(&NoiseReductionSP, states, names, n);
-       
+
        for (int i=0; i < 4; i++)
         if (NoiseReductionS[i].s == ISS_ON)
-	{
-	   index = i;
-	   break;
-	}
-	
+    {
+       index = i;
+       break;
+    }
+
        if (v4l_pwc->setNoiseRemoval(index, errmsg) < 0)
        {
          IUResetSwitch(&NoiseReductionSP);
-	 NoiseReductionS[0].s = ISS_ON;
-	 IDSetSwitch(&NoiseReductionSP, "%s", errmsg);
-	 return;
-       }
-       
+     NoiseReductionS[0].s = ISS_ON;
+     IDSetSwitch(&NoiseReductionSP, "%s", errmsg);
+     return;
+       }
+
        NoiseReductionSP.s = IPS_OK;
-       
+
        IDSetSwitch(&NoiseReductionSP, NULL);
        return;
     }
-    
+
     /* White balace mode */
     if (!strcmp (WhiteBalanceModeSP.name, name))
@@ -257,127 +257,127 @@
        if (checkPowerS(&WhiteBalanceModeSP))
          return;
-	 
+
        WhiteBalanceModeSP.s = IPS_IDLE;
-       
+
        IUResetSwitch(&WhiteBalanceModeSP);
        IUUpdateSwitch(&WhiteBalanceModeSP, states, names, n);
-       
+
        for (int i=0; i < 5; i++)
         if (WhiteBalanceModeS[i].s == ISS_ON)
-	{
-	   index = i;
-	   break;
-	}
-	
-	switch (index)
-	{
-	  // Auto
-	  case 0:
-	   if (v4l_pwc->setWhiteBalanceMode(PWC_WB_AUTO, errmsg) < 0)
-	   {
-	     IUResetSwitch(&WhiteBalanceModeSP),
-	     WhiteBalanceModeS[0].s = ISS_ON;
-	     IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
-	     return;
-	   }
-	   break;
-	   
-	 // Manual
-	 case 1:
-	  if (v4l_pwc->setWhiteBalanceMode(PWC_WB_MANUAL, errmsg) < 0)
-	   {
-	     IUResetSwitch(&WhiteBalanceModeSP),
-	     WhiteBalanceModeS[0].s = ISS_ON;
-	     IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
-	     return;
-	   }
-	   break;
-	   
-	 // Indoor
-	 case 2:
-	  if (v4l_pwc->setWhiteBalanceMode(PWC_WB_INDOOR, errmsg) < 0)
-	   {
-	     IUResetSwitch(&WhiteBalanceModeSP),
-	     WhiteBalanceModeS[0].s = ISS_ON;
-	     IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
-	     return;
-	   }
-	   break;
-	   
-	 // Outdoor
-	 case 3:
-	  if (v4l_pwc->setWhiteBalanceMode(PWC_WB_OUTDOOR, errmsg) < 0)
-	   {
-	     IUResetSwitch(&WhiteBalanceModeSP),
-	     WhiteBalanceModeS[0].s = ISS_ON;
-	     IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
-	     return;
-	   }
-	   break;
-	   
-	 // Flurescent
-	 case 4:
-	  if (v4l_pwc->setWhiteBalanceMode(PWC_WB_FL, errmsg) < 0)
-	   {
-	     IUResetSwitch(&WhiteBalanceModeSP),
-	     WhiteBalanceModeS[0].s = ISS_ON;
-	     IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
-	     return;
-	   }
-	   break;
-	   
-	}
-	     
-	WhiteBalanceModeSP.s = IPS_OK;
-	IDSetSwitch(&WhiteBalanceModeSP, NULL);
-	return;
-	
-     }
-	
+    {
+       index = i;
+       break;
+    }
+
+    switch (index)
+    {
+      // Auto
+      case 0:
+       if (v4l_pwc->setWhiteBalanceMode(PWC_WB_AUTO, errmsg) < 0)
+       {
+         IUResetSwitch(&WhiteBalanceModeSP),
+         WhiteBalanceModeS[0].s = ISS_ON;
+         IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
+         return;
+       }
+       break;
+
+     // Manual
+     case 1:
+      if (v4l_pwc->setWhiteBalanceMode(PWC_WB_MANUAL, errmsg) < 0)
+       {
+         IUResetSwitch(&WhiteBalanceModeSP),
+         WhiteBalanceModeS[0].s = ISS_ON;
+         IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
+         return;
+       }
+       break;
+
+     // Indoor
+     case 2:
+      if (v4l_pwc->setWhiteBalanceMode(PWC_WB_INDOOR, errmsg) < 0)
+       {
+         IUResetSwitch(&WhiteBalanceModeSP),
+         WhiteBalanceModeS[0].s = ISS_ON;
+         IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
+         return;
+       }
+       break;
+
+     // Outdoor
+     case 3:
+      if (v4l_pwc->setWhiteBalanceMode(PWC_WB_OUTDOOR, errmsg) < 0)
+       {
+         IUResetSwitch(&WhiteBalanceModeSP),
+         WhiteBalanceModeS[0].s = ISS_ON;
+         IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
+         return;
+       }
+       break;
+
+     // Flurescent
+     case 4:
+      if (v4l_pwc->setWhiteBalanceMode(PWC_WB_FL, errmsg) < 0)
+       {
+         IUResetSwitch(&WhiteBalanceModeSP),
+         WhiteBalanceModeS[0].s = ISS_ON;
+         IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
+         return;
+       }
+       break;
+
+    }
+
+    WhiteBalanceModeSP.s = IPS_OK;
+    IDSetSwitch(&WhiteBalanceModeSP, NULL);
+    return;
+
+     }
+
     /* Camera setttings */
     if (!strcmp (CamSettingSP.name, name))
     {
-       
+
        if (checkPowerS(&CamSettingSP))
          return;
-    
-	CamSettingSP.s = IPS_IDLE;
-	
-	IUResetSwitch(&CamSettingSP);
-	IUUpdateSwitch(&CamSettingSP, states, names, n);
-	
-	if (CamSettingS[0].s == ISS_ON)
-	{
-	  if (v4l_pwc->saveSettings(errmsg) < 0)
-	  {
-	    IUResetSwitch(&CamSettingSP);
-	    IDSetSwitch(&CamSettingSP, "%s", errmsg);
-	    return;
-	  }
-	  
-	  CamSettingSP.s = IPS_OK;
-	  IDSetSwitch(&CamSettingSP, "Settings saved.");
-	  return;
-	}
-	
-	if (CamSettingS[1].s == ISS_ON)
-	{
-	   v4l_pwc->restoreSettings();
-	   IUResetSwitch(&CamSettingSP);
-	   CamSettingSP.s = IPS_OK;
-	   IDSetSwitch(&CamSettingSP, "Settings restored.");
+
+    CamSettingSP.s = IPS_IDLE;
+
+    IUResetSwitch(&CamSettingSP);
+    IUUpdateSwitch(&CamSettingSP, states, names, n);
+
+    if (CamSettingS[0].s == ISS_ON)
+    {
+      if (v4l_pwc->saveSettings(errmsg) < 0)
+      {
+        IUResetSwitch(&CamSettingSP);
+        IDSetSwitch(&CamSettingSP, "%s", errmsg);
+        return;
+      }
+
+      CamSettingSP.s = IPS_OK;
+      IDSetSwitch(&CamSettingSP, "Settings saved.");
+      return;
+    }
+
+    if (CamSettingS[1].s == ISS_ON)
+    {
+       v4l_pwc->restoreSettings();
+       IUResetSwitch(&CamSettingSP);
+       CamSettingSP.s = IPS_OK;
+       IDSetSwitch(&CamSettingSP, "Settings restored.");
            updateV4L1Controls();
-	   return;
-	}
-	
-	if (CamSettingS[2].s == ISS_ON)
-	{
-	  v4l_pwc->restoreFactorySettings();
-	  IUResetSwitch(&CamSettingSP);
-	  CamSettingSP.s = IPS_OK;
-	  IDSetSwitch(&CamSettingSP, "Factory settings restored.");
+       return;
+    }
+
+    if (CamSettingS[2].s == ISS_ON)
+    {
+      v4l_pwc->restoreFactorySettings();
+      IUResetSwitch(&CamSettingSP);
+      CamSettingSP.s = IPS_OK;
+      IDSetSwitch(&CamSettingSP, "Factory settings restored.");
           updateV4L1Controls();
-	  return;
-	}
+      return;
+    }
      }
      #endif
@@ -385,5 +385,5 @@
      // Call parent
      V4L_Driver::ISNewSwitch(dev, name, states, names, n);
-        
+
      
 
Index: /BAORadio/libindi/libindi/examples/tutorial_ccdpreview.c
===================================================================
--- /BAORadio/libindi/libindi/examples/tutorial_ccdpreview.c	(revision 696)
+++ /BAORadio/libindi/libindi/examples/tutorial_ccdpreview.c	(revision 697)
@@ -149,15 +149,15 @@
 }
 
-void ISNewBLOB (const char *dev, const char *name, int sizes[], char *blobs[], char *formats[], char *names[], int n)
-{
+//void ISNewBLOB (const char *dev, const char *name, int sizes[], char *blobs[], char *formats[], char *names[], int n)
+//{
 	
        /* ignore if not ours */ 
-       if (dev && strcmp (mydev, dev))
-         return;
+     //  if (dev && strcmp (mydev, dev))
+       //  return;
 
 	/* suppress warning */
-	n=n; dev=dev; name=name; names=names; 
-
-}
+//	n=n; dev=dev; name=name; names=names;
+
+//}
   
 void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
Index: /BAORadio/libindi/libindi/examples/tutorial_client.cpp
===================================================================
--- /BAORadio/libindi/libindi/examples/tutorial_client.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/examples/tutorial_client.cpp	(revision 697)
@@ -37,5 +37,6 @@
 
 #include "indibase/baseclient.h"
-#include "indibase/basedriver.h"
+#include "indibase/basedevice.h"
+#include "indibase/indiproperty.h"
 
 /* INDI Common Library Routines */
@@ -110,29 +111,23 @@
 **
 ***************************************************************************************/
-void MyClient::newDevice(const char *device_name)
+void MyClient::newDevice(INDI::BaseDevice *dp)
 {
-    if (!strcmp(device_name, "CCD Simulator"))
-    {
-        IDLog("Receiving CCD Simulator Device...\n");
+    if (!strcmp(dp->getDeviceName(), "CCD Simulator"))
+       IDLog("Receiving CCD Simulator Device...\n");
 
-        ccd_simulator = getDriver(MYCCD);
+    ccd_simulator = dp;
 
-        if (ccd_simulator == NULL)
-        {
-            IDLog("Error: unable to find CCD Simulator device...\n");
-            return;
-        }
-    }
 }
 
 /**************************************************************************************
 **
-***************************************************************************************/
-void MyClient::newProperty(const char *device_name, const char *property_name)
+*************************************************************************************/
+void MyClient::newProperty(INDI::Property *property)
 {
-     if (!strcmp(device_name, "CCD Simulator") && !strcmp(property_name, "CCD_TEMPERATURE"))
+
+     if (!strcmp(property->getDeviceName(), "CCD Simulator") && !strcmp(property->getName(), "CCD_TEMPERATURE"))
      {
              IDLog("CCD_TEMPERATURE standard property defined. Attempting connection to CCD...\n");
-             setDriverConnection(true, MYCCD);
+             connectDevice(MYCCD);
      }
 }
@@ -168,2 +163,15 @@
    }
 }
+
+/**************************************************************************************
+**
+***************************************************************************************/
+void MyClient::newMessage(INDI::BaseDevice *dp)
+{
+     if (strcmp(dp->getDeviceName(), "CCD Simulator"))
+         return;
+
+     IDLog("Recveing message from Server:\n\n########################\n%s\n########################\n\n", dp->lastMessage());
+
+}
+
Index: /BAORadio/libindi/libindi/examples/tutorial_client.h
===================================================================
--- /BAORadio/libindi/libindi/examples/tutorial_client.h	(revision 696)
+++ /BAORadio/libindi/libindi/examples/tutorial_client.h	(revision 697)
@@ -37,16 +37,18 @@
 protected:
 
-    virtual void newDevice(const char *device_name);
-    virtual void newProperty(const char *device_name, const char *property_name);
+    virtual void newDevice(INDI::BaseDevice *dp);
+    virtual void newProperty(INDI::Property *property);
+    virtual void removeProperty(INDI::Property *property) {}
     virtual void newBLOB(IBLOB *bp) {}
     virtual void newSwitch(ISwitchVectorProperty *svp);
     virtual void newNumber(INumberVectorProperty *nvp);
+    virtual void newMessage(INDI::BaseDevice *dp);
     virtual void newText(ITextVectorProperty *tvp) {}
     virtual void newLight(ILightVectorProperty *lvp) {}
     virtual void serverConnected() {}
-    virtual void serverDisconnected() {}
+    virtual void serverDisconnected(int exit_code) {}
 
 private:
-   INDI::BaseDriver * ccd_simulator;
+   INDI::BaseDevice * ccd_simulator;
 
 };
Index: /BAORadio/libindi/libindi/examples/tutorial_four.cpp
===================================================================
--- /BAORadio/libindi/libindi/examples/tutorial_four.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/examples/tutorial_four.cpp	(revision 697)
@@ -1,4 +1,4 @@
 #if 0
-    MyScope - Tutorial Four
+    TestDevice - Tutorial Four
     Demonstration of libindi v0.7 capabilities.
 
@@ -45,5 +45,5 @@
 
 /* Our telescope auto pointer */
-auto_ptr<MyScope> telescope(0);
+auto_ptr<TestDevice> telescope(0);
 
 const int POLLMS = 1000;				// Period of update, 1 second.
@@ -62,5 +62,6 @@
  {
      isInit = 1;
-     telescope.reset(new MyScope());
+     telescope.reset(new TestDevice());
+     srand (time(NULL));
  }
  
@@ -108,12 +109,9 @@
 void ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
 {
-  INDI_UNUSED(dev);
-  INDI_UNUSED(name);
-  INDI_UNUSED(sizes);
-  INDI_UNUSED(blobsizes);
-  INDI_UNUSED(blobs);
-  INDI_UNUSED(formats);
-  INDI_UNUSED(names);
-  INDI_UNUSED(n);
+    ISInit();
+
+    telescope->ISNewBLOB(dev, name, sizes, blobsizes, blobs, formats, names, n);
+
+
 }
 
@@ -129,16 +127,14 @@
 ** LX200 Basic constructor
 ***************************************************************************************/
-MyScope::MyScope()
-{
-    IDLog("Initilizing from My Scope device...\n");
-
-    //init_properties();
-
- }
-
-/**************************************************************************************
-**
-***************************************************************************************/
-MyScope::~MyScope()
+TestDevice::TestDevice()
+{
+    IDLog("Initilizing from Test Device...\n");
+
+}
+
+/**************************************************************************************
+**
+***************************************************************************************/
+TestDevice::~TestDevice()
 {
 
@@ -148,7 +144,7 @@
 ** Initialize all properties & set default values.
 **************************************************************************************/
-bool MyScope::initProperties()
-{
-    DefaultDriver::initProperties();
+bool TestDevice::initProperties()
+{
+    DefaultDevice::initProperties();
     // This is the default driver skeleton file location
     // Convention is: drivername_sk_xml
@@ -177,10 +173,10 @@
 ** Define Basic properties to clients.
 ***************************************************************************************/
-void MyScope::ISGetProperties(const char *dev)
+void TestDevice::ISGetProperties(const char *dev)
 {
     static int configLoaded = 0;
 
     // Ask the default driver first to send properties.
-    INDI::DefaultDriver::ISGetProperties(dev);
+    INDI::DefaultDevice::ISGetProperties(dev);
 
     // If no configuration is load before, then load it now.
@@ -196,21 +192,21 @@
 ** Process Text properties
 ***************************************************************************************/
-bool MyScope::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
+bool TestDevice::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
 {
 	// Ignore if not ours 
-        if (strcmp (dev, deviceName()))
-            return false;
-
-        return false;
-}
-
-/**************************************************************************************
-**
-***************************************************************************************/
-bool MyScope::ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
+        if (strcmp (dev, getDeviceName()))
+            return false;
+
+        return false;
+}
+
+/**************************************************************************************
+**
+***************************************************************************************/
+bool TestDevice::ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
 {
 	
 	// Ignore if not ours
-        if (strcmp (dev, deviceName()))
+        if (strcmp (dev, getDeviceName()))
             return false;
 
@@ -220,6 +216,12 @@
             return false;
 
-        // Are we updating Slew Accuracy?
-        if (!strcmp(nvp->name, "Slew Accuracy"))
+        if (isConnected() == false)
+        {
+            nvp->s = IPS_ALERT;
+            IDSetNumber(nvp, "Cannot change property while device is disconnected.");
+            return false;
+        }
+
+        if (!strcmp(nvp->name, "Number Property"))
         {
             IUUpdateNumber(nvp, values, names, n);
@@ -236,54 +238,128 @@
 **
 ***************************************************************************************/
-bool MyScope::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
-{
+bool TestDevice::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
+{
+    int lightState=0;
+    int lightIndex=0;
+
 	// ignore if not ours //
-        if (strcmp (dev, deviceName()))
-            return false;
-
-        if (INDI::DefaultDriver::ISNewSwitch(dev, name, states, names, n) == true)
+            if (strcmp (dev, getDeviceName()))
+            return false;
+
+        if (INDI::DefaultDevice::ISNewSwitch(dev, name, states, names, n) == true)
             return true;
 
+
+
         ISwitchVectorProperty *svp = getSwitch(name);
-
-        if (!svp)
-            return false;
-
-        /* Are we update CONNECTION?
-        if (!strcmp(svp->name, "CONNECTION"))
+        ILightVectorProperty *lvp  = getLight("Light Property");
+
+        if (isConnected() == false)
+        {
+            svp->s = IPS_ALERT;
+            IDSetSwitch(svp, "Cannot change property while device is disconnected.");
+            return false;
+        }
+
+
+        if (!svp || !lvp)
+            return false;
+
+        if (!strcmp(svp->name, "Menu"))
         {
             IUUpdateSwitch(svp, states, names, n);
-            connect_telescope();
+            ISwitch *onSW = IUFindOnSwitch(svp);
+            lightIndex = IUFindOnSwitchIndex(svp);
+
+            if (lightIndex < 0 || lightIndex > lvp->nlp)
+                return false;
+
+            if (onSW)
+            {
+                lightState = rand() % 4;
+                svp->s = IPS_OK;
+                lvp->s = IPS_OK;
+                lvp->lp[lightIndex].s = (IPState) lightState;
+
+                IDSetSwitch(svp, "Setting to switch %s is successful. Changing corresponding light property to %s.", onSW->name, pstateStr(lvp->lp[lightIndex].s));
+                IDSetLight(lvp, NULL);
+
+
+            }
             return true;
-        }*/
-
-    return DefaultDriver::ISNewSwitch(dev, name, states, names, n);
-
-
-}
-
-
-/**************************************************************************************
-**
-***************************************************************************************/
-bool MyScope::Connect()
-{
+        }
+
+    return false;
+
+
+}
+
+bool TestDevice::ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
+{
+    if (strcmp (dev, getDeviceName()))
+        return false;
+
+    const char *testBLOB = "This is a test BLOB from the driver";
+
+    IBLOBVectorProperty *bvp = getBLOB(name);
+
+    if (!bvp)
+        return false;
+
+    if (isConnected() == false)
+    {
+        bvp->s = IPS_ALERT;
+        IDSetBLOB(bvp, "Cannot change property while device is disconnected.");
+        return false;
+    }
+
+    if (!strcmp(bvp->name, "BLOB Test"))
+    {
+
+        IUUpdateBLOB(bvp, sizes, blobsizes, blobs, formats, names, n);
+
+        IBLOB *bp = IUFindBLOB(bvp, names[0]);
+
+        if (!bp)
+            return false;
+
+        IDLog("Recieved BLOB with name %s, format %s, and size %d, and bloblen %d\n", bp->name, bp->format, bp->size, bp->bloblen);
+
+        char *blobBuffer = new char[bp->bloblen+1];
+        strncpy(blobBuffer, ((char *) bp->blob), bp->bloblen);
+        blobBuffer[bp->bloblen] = '\0';
+
+        IDLog("BLOB Content:\n##################################\n%s\n##################################\n", blobBuffer);
+
+        delete [] blobBuffer;
+    }
+
     return true;
-}
-
-bool MyScope::Disconnect()
+
+}
+
+
+/**************************************************************************************
+**
+***************************************************************************************/
+bool TestDevice::Connect()
 {
     return true;
 }
 
-const char * MyScope::getDefaultName()
-{
-    return "My Scope";
-}
-
-
-
-
-
-
-
+bool TestDevice::Disconnect()
+{
+    return true;
+}
+
+const char * TestDevice::getDefaultName()
+{
+    return "Test Device";
+}
+
+
+
+
+
+
+
Index: /BAORadio/libindi/libindi/examples/tutorial_four.h
===================================================================
--- /BAORadio/libindi/libindi/examples/tutorial_four.h	(revision 696)
+++ /BAORadio/libindi/libindi/examples/tutorial_four.h	(revision 697)
@@ -24,11 +24,11 @@
 #include "indidevapi.h"
 #include "indicom.h"
-#include "indibase/defaultdriver.h"
+#include "indibase/defaultdevice.h"
 
-class MyScope : public INDI::DefaultDriver
+class TestDevice : public INDI::DefaultDevice
 {
  public:
- MyScope();
- ~MyScope();
+ TestDevice();
+ ~TestDevice();
 
  virtual void ISGetProperties (const char *dev);
@@ -36,4 +36,5 @@
  virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);
  virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
+ virtual bool ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n);
 
 private:
Index: /BAORadio/libindi/libindi/examples/tutorial_four_sk.xml
===================================================================
--- /BAORadio/libindi/libindi/examples/tutorial_four_sk.xml	(revision 696)
+++ /BAORadio/libindi/libindi/examples/tutorial_four_sk.xml	(revision 697)
@@ -1,4 +1,4 @@
 <INDIDriver>
-<defSwitchVector device="My Device" name="CONNECTION" label="Connection" group="Main Control" state="Idle" perm="rw" rule="OneOfMany" timeout="60">
+<defSwitchVector device="Test Device" name="CONNECTION" label="Connection" group="Main Control" state="Idle" perm="rw" rule="OneOfMany" timeout="60">
     <defSwitch name="CONNECT" label="Connect">
 Off
@@ -8,11 +8,50 @@
     </defSwitch>
 </defSwitchVector>
-<defNumberVector device="My Device" name="Slew Accuracy" label="" group="Main Control" state="Idle" perm="rw" timeout="0" timestamp="2010-09-02T23:50:48">
-    <defNumber name="SlewRA" label="RA (arcmin)" format="%10.6m" min="0" max="60" step="1">
+<defNumberVector device="Test Device" name="Number Property" label="" group="Main Control" state="Idle" perm="rw" timeout="0">
+    <defNumber name="NUMBER_1" label="First" format="%10.6m" min="0" max="60" step="1">
 3
     </defNumber>
-    <defNumber name="SlewDEC" label="Dec (arcmin)" format="%10.6m" min="0" max="60" step="1">
+    <defNumber name="NUMBER_2" label="Second" format="%10.6m" min="0" max="60" step="1">
 3
     </defNumber>
 </defNumberVector>
+<defLightVector device="Test Device" name="Light Property" label="" group="Main Control" state="Idle" timeout="0">
+    <defLight name="Light 1">
+        Idle
+    </defLight>
+    <defLight name="Light 2">
+        Idle
+    </defLight>
+    <defLight name="Light 3">
+        Idle
+    </defLight>
+    <defLight name="Light 4">
+        Idle
+    </defLight>
+    <defLight name="Light 5">
+        Idle
+    </defLight>
+</defLightVector>
+<defSwitchVector device="Test Device" name="Menu" group="Main Control" state="Idle" perm="rw" rule="OneOfMany" timeout="60">
+    <defSwitch name="1x">
+On
+    </defSwitch>
+    <defSwitch name="2x">
+Off
+    </defSwitch>
+    <defSwitch name="3x">
+Off
+    </defSwitch>
+    <defSwitch name="4x">
+Off
+    </defSwitch>
+    <defSwitch name="5x">
+Off
+    </defSwitch>
+
+</defSwitchVector>
+<defBLOBVector device="Test Device" name="BLOB Test" group="Main Control" state="Idle" perm="rw" timeout="60">
+    <defBLOB name="BLOB 1">
+    </defBLOB>
+</defBLOBVector>
 </INDIDriver>
Index: /BAORadio/libindi/libindi/examples/tutorial_three.c
===================================================================
--- /BAORadio/libindi/libindi/examples/tutorial_three.c	(revision 696)
+++ /BAORadio/libindi/libindi/examples/tutorial_three.c	(revision 697)
@@ -59,5 +59,5 @@
 /* Exposure time */
 static INumber ExposeTimeN[]    = {{ "CCD_EXPOSURE_VALUE", "Duration (s)", "%5.2f", 0., 36000., .5, 1., 0, 0, 0}};
-static INumberVectorProperty ExposeTimeNP = { mydev, "CCD_EXPOSURE", "Expose", COMM_GROUP, IP_RW, 60, IPS_IDLE, ExposeTimeN, NARRAY(ExposeTimeN), "", 0};
+static INumberVectorProperty ExposeTimeNP = { mydev, "CCD_EXPOSURE_REQUEST", "Expose", COMM_GROUP, IP_RW, 60, IPS_IDLE, ExposeTimeN, NARRAY(ExposeTimeN), "", 0};
  
 /* Temperature control */
Index: /BAORadio/libindi/libindi/indidevapi.h
===================================================================
--- /BAORadio/libindi/libindi/indidevapi.h	(revision 696)
+++ /BAORadio/libindi/libindi/indidevapi.h	(revision 697)
@@ -450,4 +450,14 @@
 extern ISwitch *IUFindOnSwitch (const ISwitchVectorProperty *sp);
 
+/** \brief Returns the index of first ON switch it finds in the vector switch property.
+
+*   \note This is only valid for ISR_1OFMANY mode. That is, when only one switch out of many is allowed to be ON. Do not use this function if you can have multiple ON switches in the same vector property.
+*
+* \param sp a pointer to a switch vector property.
+* \return index to the \e first ON ISwitch member if found. If all switches are off, -1 is returned.
+*/
+
+extern int IUFindOnSwitchIndex (const ISwitchVectorProperty *sp);
+
 /** \brief Reset all switches in a switch vector property to OFF.
 *
@@ -485,4 +495,24 @@
 */
 extern int IUUpdateText(ITextVectorProperty *tvp, char * texts[], char *names[], int n);
+
+/** \brief Update all BLOB members in a BLOB vector property.
+*
+* \param bvp a pointer to a BLOB vector property.
+* \param BLOBs a pointer to the BLOB members
+* \param names the names of the IBLOB members to update.
+* \param n the number of IBLOB members to update.
+* \return 0 if update successful, -1 otherwise. Update will fail in case of property name mismatch.
+*/
+extern int IUUpdateBLOB(IBLOBVectorProperty *bvp, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n);
+
+/** \brief Function to save blob metadata in the corresponding blob.
+    \param tb pointer to an IBLOB member.
+    \param size size of the blob buffer encoded in base64
+    \param blobsize actual size of the buffer after base64 decoding. This is the actual byte count used in drivers.
+    \param blob pointer to the blob buffer
+    \param format format of the blob buffer
+    \note Do not call this function directly, it is called internally by IUUpdateBLOB.
+    */
+extern int IUSaveBLOB(IBLOB *bp, int size, int blobsize, char *blob, char *format);
 
 /** \brief Function to update the min and max elements of a number in the client
Index: /BAORadio/libindi/libindi/indidriver.c
===================================================================
--- /BAORadio/libindi/libindi/indidriver.c	(revision 696)
+++ /BAORadio/libindi/libindi/indidriver.c	(revision 697)
@@ -272,4 +272,42 @@
 }
 
+
+/* Update property BLOB in accord with BLOBs and names */
+int IUUpdateBLOB(IBLOBVectorProperty *bvp, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
+{
+  int i=0;
+
+  IBLOB *bp;
+
+  for (i = 0; i < n; i++)
+  {
+    bp = IUFindBLOB(bvp, names[i]);
+    if (!bp)
+    {
+        bvp->s = IPS_IDLE;
+    IDSetBLOB(bvp, "Error: %s is not a member of %s property.", names[i], bvp->name);
+    return -1;
+    }
+  }
+
+  /* First loop checks for error, second loop set all values atomically*/
+  for (i=0; i < n; i++)
+  {
+    bp = IUFindBLOB(bvp, names[i]);
+    IUSaveBLOB(bp, sizes[i], blobsizes[i], blobs[i], formats[i]);
+  }
+
+  return 0;
+
+}
+
+int IUSaveBLOB(IBLOB *bp, int size, int blobsize, char *blob, char *format)
+{
+    bp->bloblen = blobsize;
+    bp->size    = size;
+    bp->blob    = blob;
+    strncpy(bp->format, format, MAXINDIFORMAT);
+}
+
 void IUFillSwitch(ISwitch *sp, const char *name, const char * label, ISState s)
 {
@@ -440,5 +478,5 @@
 	for (i = 0; i < nvp->nnp; i++) {
 	    for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) {
-		if (!strcmp (tagXMLEle(ep), "oneNumber") &&
+        if (!strcmp (tagXMLEle(ep)+3, "Number") &&
 			!strcmp (nvp->np[i].name, findXMLAttValu(ep, "name"))) {
 		    if (f_scansexa (pcdataXMLEle(ep), &nvp->np[i].value) < 0)
@@ -478,5 +516,5 @@
 	for (i = 0; i < tvp->ntp; i++) {
 	    for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) {
-		if (!strcmp (tagXMLEle(ep), "oneText") &&
+        if (!strcmp (tagXMLEle(ep)+3, "Text") &&
 			!strcmp (tvp->tp[i].name, findXMLAttValu(ep, "name"))) {
 		    IUSaveText (&tvp->tp[i], pcdataXMLEle(ep));
@@ -515,5 +553,5 @@
 	/* match each oneLight with one ILight */
 	for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) {
-	    if (!strcmp (tagXMLEle(ep), "oneLight")) {
+        if (!strcmp (tagXMLEle(ep)+3, "Light")) {
 		const char *name = findXMLAttValu (ep, "name");
 		for (i = 0; i < lvp->nlp; i++) {
@@ -554,5 +592,5 @@
 	/* match each oneSwitch with one ISwitch */
 	for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) {
-	    if (!strcmp (tagXMLEle(ep), "oneSwitch")) {
+        if (!strcmp (tagXMLEle(ep)+3, "Switch")) {
 		const char *name = findXMLAttValu (ep, "name");
 		for (i = 0; i < svp->nsp; i++) {
@@ -594,5 +632,5 @@
 	/* match each oneBLOB with one IBLOB */
 	for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) {
-	    if (!strcmp (tagXMLEle(ep), "oneBLOB")) {
+        if (!strcmp (tagXMLEle(ep)+3, "BLOB")) {
 		const char *name = findXMLAttValu (ep, "name");
 		for (i = 0; i < bvp->nbp; i++) {
Index: /BAORadio/libindi/libindi/indiserver.c
===================================================================
--- /BAORadio/libindi/libindi/indiserver.c	(revision 696)
+++ /BAORadio/libindi/libindi/indiserver.c	(revision 697)
@@ -790,6 +790,9 @@
                 else if (strstr(token, "\"") || strstr(token, "'"))
                 {
-		    strncat(tDev, ++token, sizeof(tDev)-strlen(tDev)-1);
-                    while (token = strsep(&cp, delm) )
+                    strncat(tDev, ++token, sizeof(tDev)-strlen(tDev)-1);
+
+                    if ( tDev[strlen(tDev)-2] == '\"' || tDev[strlen(tDev)-2] == '\'')
+                        tDev[strlen(tDev)-2] = '\0';
+                   else while (token = strsep(&cp, delm) )
                    {
                      strcat(tDev, " ");
@@ -797,5 +800,5 @@
                      if ( (tp=strchr(tDev, '\"')) || (tp=strchr(tDev, '\'')))
                      {
-                         //tDev[strlen(tDev)-1] = '\0';
+                         tDev[strlen(tDev)-1] = '\0';
                          *tp='\0';
                          break;
@@ -818,4 +821,8 @@
                       {
                        strncat(tConfig, ++token, sizeof(tConfig)-strlen(tDev)-1);
+
+                       if ( tConfig[strlen(tConfig)-2] == '\"' || tConfig[strlen(tConfig)-2] == '\'')
+                           tConfig[strlen(tConfig)-2] = '\0';
+
                        while (token = strsep(&cp, delm) )
                        {
@@ -825,5 +832,5 @@
                           if ( (tp=strchr(tConfig, '\"')) || (tp=strchr(tConfig, '\'')))
                           {
-                                 //tConfig[strlen(tConfig)-1] = '\0';
+                               tConfig[strlen(tConfig)-1] = '\0';
                               *tp = '\0';
                               break;
Index: /BAORadio/libindi/libindi/libindi.pro
===================================================================
--- /BAORadio/libindi/libindi/libindi.pro	(revision 696)
+++ /BAORadio/libindi/libindi/libindi.pro	(revision 697)
@@ -4,4 +4,5 @@
 
 TEMPLATE = app
+CONFIG += debug
 TARGET = 
 DEPENDPATH += . \
@@ -39,5 +40,4 @@
 # Input
 HEADERS += base64.h \
-           config.h \
            eventloop.h \
            fq.h \
@@ -163,12 +163,12 @@
            communs/ServerSocket.cpp \
            communs/Socket.cpp \
-           examples/tutorial_ccdpreview.c \
-           examples/tutorial_client.cpp \
-           examples/tutorial_dome.c \
-           examples/tutorial_four.cpp \
-           examples/tutorial_one.c \
-           examples/tutorial_rain.c \
-           examples/tutorial_three.c \
-           examples/tutorial_two.c \
+#           examples/tutorial_ccdpreview.c \
+#           examples/tutorial_client.cpp \
+#           examples/tutorial_dome.c \
+#           examples/tutorial_four.cpp \
+#           examples/tutorial_one.c \
+#           examples/tutorial_rain.c \
+#           examples/tutorial_three.c \
+#           examples/tutorial_two.c \
            libs/indicom.c \
            libs/lilxml.c \
@@ -179,12 +179,12 @@
            drivers/ccd/ccd_simulator.cpp \
            drivers/ccd/fli_ccd.c \
-           drivers/filter_wheel/filter_simulator.cpp \
-           drivers/filter_wheel/fli_wheel.c \
-           drivers/filter_wheel/trutech_wheel.c \
-           drivers/focuser/fli_pdf.c \
-           drivers/focuser/robofocus.c \
-           drivers/focuser/robofocus.cpp \
-           drivers/focuser/robofocusdriver.c \
-           drivers/focuser/tcfs.cpp \
+#           drivers/filter_wheel/filter_simulator.cpp \
+#           drivers/filter_wheel/fli_wheel.c \
+#           drivers/filter_wheel/trutech_wheel.c \
+#           drivers/focuser/fli_pdf.c \
+#           drivers/focuser/robofocus.c \
+#           drivers/focuser/robofocus.cpp \
+#           drivers/focuser/robofocusdriver.c \
+#           drivers/focuser/tcfs.cpp \
            drivers/telescope/BAO.cpp \
            drivers/telescope/celestrongps.cpp \
@@ -210,11 +210,11 @@
            drivers/telescope/telescope_simulator.cpp \
            drivers/telescope/temmadriver.c \
-           drivers/video/indi_lpi.cpp \
-           drivers/video/indi_philips.cpp \
-           drivers/video/indi_v4l.cpp \
-           drivers/video/stv.c \
-           drivers/video/stvdriver.c \
-           drivers/video/v4ldriver.cpp \
-           drivers/video/v4lphilips.cpp \
+#           drivers/video/indi_lpi.cpp \
+#           drivers/video/indi_philips.cpp \
+#           drivers/video/indi_v4l.cpp \
+#           drivers/video/stv.c \
+#           drivers/video/stvdriver.c \
+#           drivers/video/v4ldriver.cpp \
+#           drivers/video/v4lphilips.cpp \
            Indi_Stellarium/src/Connection.cpp \
            Indi_Stellarium/src/Listener.cpp \
@@ -235,11 +235,11 @@
            libs/indibase/inditelescope.cpp \
            libs/indibase/indiusbdevice.cpp \
-           libs/webcam/ccvt_c2.c \
-           libs/webcam/ccvt_misc.c \
-           libs/webcam/port.cpp \
-           libs/webcam/PPort.cpp \
-           libs/webcam/v4l1_base.cpp \
-           libs/webcam/v4l1_pwc.cpp \
-           libs/webcam/v4l2_base.cpp \
+#           libs/webcam/ccvt_c2.c \
+#           libs/webcam/ccvt_misc.c \
+#           libs/webcam/port.cpp \
+#           libs/webcam/PPort.cpp \
+#           libs/webcam/v4l1_base.cpp \
+#           libs/webcam/v4l1_pwc.cpp \
+#           libs/webcam/v4l2_base.cpp \
            libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c \
            libindi_build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp
Index: /BAORadio/libindi/libindi/libs/indibase/baseclient.cpp
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/baseclient.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/baseclient.cpp	(revision 697)
@@ -25,7 +25,8 @@
 #include <netinet/in.h>
 #include <netdb.h>
+#include <fcntl.h>
 
 #include "baseclient.h"
-#include "basedriver.h"
+#include "basedevice.h"
 #include "indicom.h"
 
@@ -46,5 +47,5 @@
 INDI::BaseClient::~BaseClient()
 {
-    close(sockfd);
+
 }
 
@@ -65,4 +66,5 @@
     struct sockaddr_in serv_addr;
     struct hostent *hp;
+    int sflags=0;
 
     /* lookup host address */
@@ -85,4 +87,8 @@
     }
 
+//    sflags=fcntl(sockfd,F_GETFL,0);         // Get socket flags
+//    fcntl(sockfd,F_SETFL, sflags | O_NONBLOCK);   // Add non-blocking flag
+
+
     /* connect */
     if (::connect (sockfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr))<0)
@@ -95,4 +101,10 @@
     svrwfp = fdopen (sockfd, "w");
 
+    if (svrwfp == NULL)
+    {
+        perror("fdopen");
+        return false;
+    }
+
     int result = pthread_create( &listen_thread, NULL, &INDI::BaseClient::listenHelper, this);
 
@@ -103,6 +115,6 @@
     }
 
+    sConnected = true;
     serverConnected();
-    sConnected = true;
 
     return true;
@@ -111,6 +123,12 @@
 bool INDI::BaseClient::disconnectServer()
 {
+   // IDLog("Server disconnected called\n");
     if (sConnected == false)
         return true;
+
+    sConnected = false;
+
+    //IDLog("Closing socket fd!\n");
+    close(sockfd);
 
     if (svrwfp != NULL)
@@ -118,11 +136,18 @@
    svrwfp = NULL;
 
-   close(sockfd);
-
-    serverDisconnected();
-
-    sConnected = false;
-
-    return true;
+   pthread_join(listen_thread, NULL);
+
+   return true;
+}
+
+
+void INDI::BaseClient::connectDevice(const char *deviceName)
+{
+    setDriverConnection(true, deviceName);
+}
+
+void INDI::BaseClient::disconnectDevice(const char *deviceName)
+{
+        setDriverConnection(false, deviceName);
 }
 
@@ -130,5 +155,5 @@
 void INDI::BaseClient::setDriverConnection(bool status, const char *deviceName)
 {
-    INDI::BaseDriver *drv = getDriver(deviceName);
+    INDI::BaseDevice *drv = getDevice(deviceName);
     ISwitchVectorProperty *drv_connection = NULL;
 
@@ -156,5 +181,5 @@
         drv_connection->sp[1].s = ISS_OFF;
 
-        sendNewSwitch(drv_connection, &(drv_connection->sp[0]));
+        sendNewSwitch(drv_connection);
     }
     else
@@ -169,15 +194,15 @@
         drv_connection->sp[1].s = ISS_ON;
 
-        sendNewSwitch(drv_connection, &(drv_connection->sp[1]));
-
-    }
-}
-
-
-INDI::BaseDriver * INDI::BaseClient::getDriver(const char * deviceName)
-{
-    vector<INDI::BaseDriver *>::const_iterator devi;
+        sendNewSwitch(drv_connection);
+
+    }
+}
+
+
+INDI::BaseDevice * INDI::BaseClient::getDevice(const char * deviceName)
+{
+    vector<INDI::BaseDevice *>::const_iterator devi;
     for ( devi = cDevices.begin(); devi != cDevices.end(); devi++)
-        if (!strcmp(deviceName, (*devi)->deviceName()))
+        if (!strcmp(deviceName, (*devi)->getDeviceName()))
             return (*devi);
 
@@ -193,7 +218,15 @@
 void INDI::BaseClient::listenINDI()
 {
+    char buffer[MAXINDIBUF];
     char msg[MAXRBUF];
-    char buffer[MAXINDIBUF];
+
     int n=0, err_code=0;
+    struct timeval tv;
+    fd_set rs;
+    FD_ZERO(&rs);
+
+    tv.tv_sec  = 1;
+    tv.tv_usec = 0;//500000;
+
 
     if (cDeviceNames.empty())
@@ -208,22 +241,42 @@
     fflush (svrwfp);
 
+    FD_SET(sockfd, &rs);
+
     lillp = newLilXML();
+
 
     /* read from server, exit if find all requested properties */
     while (sConnected)
     {
-        n = read(sockfd, buffer, MAXINDIBUF);
-
-        if (n ==0)
+        n = select (sockfd+1, &rs, NULL, NULL, &tv);
+
+        if (n < 0)
         {
-            perror ("read");
-            fprintf (stderr,"INDI server %s/%d disconnected\n", cServer.c_str(), cPort);
-            serverDisconnected();
-            return;
+            fprintf (stderr,"INDI server %s/%d disconnected.\n", cServer.c_str(), cPort);
+            close(sockfd);
+            break;
         }
+
+        n = recv(sockfd, buffer, MAXINDIBUF, MSG_DONTWAIT);
+        if (n<=0)
+        {
+
+            if (n==0)
+            {
+                fprintf (stderr,"INDI server %s/%d disconnected.\n", cServer.c_str(), cPort);
+                close(sockfd);
+                break;
+            }
+            else
+                continue;
+        }
+
 
         for (int i=0; i < n; i++)
         {
+            //IDLog("Getting #%d bytes in for loop, calling readXMLEle for byte %d\n", n, i);
             XMLEle *root = readXMLEle (lillp, buffer[i], msg);
+            //IDLog("############# BLOCK # POST READ XML ELE #####################\n");
+
             if (root)
             {
@@ -233,5 +286,5 @@
                      if (err_code != INDI_PROPERTY_DUPLICATED)
                      {
-                         IDLog("Dispatch command error: %s\n", msg);
+                         IDLog("Dispatch command error(%d): %s\n", err_code, msg);
                          prXMLEle (stderr, root, 0);
                      }
@@ -248,4 +301,13 @@
     }
 
+    //IDLog("Termindating Listen therad!\n");
+    delLilXML(lillp);
+
+    //IDLog("sConnected value at termination is: %s\n", (sConnected ? "True" : "False"));
+    serverDisconnected( (sConnected == false) ? 0 : -1);
+    sConnected = false;
+
+    pthread_exit(0);
+
 }
 
@@ -258,5 +320,5 @@
 
     /* Get the device, if not available, create it */
-    INDI::BaseDriver *dp = findDev (root, 1, errmsg);
+    INDI::BaseDevice *dp = findDev (root, 1, errmsg);
     if (dp == NULL)
     {
@@ -264,4 +326,10 @@
         return INDI_DEVICE_NOT_FOUND;
     }
+
+    // FIXME REMOVE THIS
+
+    // Ignore echoed newXXX
+    if (strstr(tagXMLEle(root), "new"))
+        return 0;
 
     if ((!strcmp (tagXMLEle(root), "defTextVector"))  ||
@@ -289,5 +357,5 @@
 {
     XMLAtt *ap;
-    INDI::BaseDriver *dp;
+    INDI::BaseDevice *dp;
 
     /* dig out device and optional property name */
@@ -296,5 +364,5 @@
         return INDI_DEVICE_NOT_FOUND;
 
-    checkMsg(root, dp);
+    dp->checkMessage(root);
 
     ap = findXMLAtt (root, "name");
@@ -302,17 +370,24 @@
     /* Delete property if it exists, otherwise, delete the whole device */
     if (ap)
-        return dp->removeProperty(valuXMLAtt(ap));
+    {
+        INDI::Property *rProp = dp->getProperty(valuXMLAtt(ap));
+        removeProperty(rProp);
+        int errCode = dp->removeProperty(valuXMLAtt(ap), errmsg);
+
+        return errCode;
+    }
     // delete the whole device
     else
-        return removeDevice(dp->deviceName(), errmsg);
+        return removeDevice(dp->getDeviceName(), errmsg);
 }
 
 int INDI::BaseClient::removeDevice( const char * devName, char * errmsg )
 {
-    std::vector<INDI::BaseDriver *>::iterator devicei;
+    std::vector<INDI::BaseDevice *>::iterator devicei;
 
     for (devicei =cDevices.begin(); devicei != cDevices.end();)
     {
-      if (strcmp(devName, (*devicei)->deviceName()))
+
+      if (!strcmp(devName, (*devicei)->getDeviceName()))
       {
           delete *devicei;
@@ -328,12 +403,12 @@
 }
 
-INDI::BaseDriver * INDI::BaseClient::findDev( const char * devName, char * errmsg )
-{
-
-    std::vector<INDI::BaseDriver *>::const_iterator devicei;
+INDI::BaseDevice * INDI::BaseClient::findDev( const char * devName, char * errmsg )
+{
+
+    std::vector<INDI::BaseDevice *>::const_iterator devicei;
 
     for (devicei = cDevices.begin(); devicei != cDevices.end(); devicei++)
     {
-        if (!strcmp(devName, (*devicei)->deviceName()))
+        if (!strcmp(devName, (*devicei)->getDeviceName()))
          return (*devicei);
 
@@ -345,8 +420,8 @@
 
 /* add new device */
-INDI::BaseDriver * INDI::BaseClient::addDevice (XMLEle *dep, char * errmsg)
+INDI::BaseDevice * INDI::BaseClient::addDevice (XMLEle *dep, char * errmsg)
 {
     //devicePtr dp(new INDI::BaseDriver());
-    INDI::BaseDriver *dp = new INDI::BaseDriver();
+    INDI::BaseDevice *dp = new INDI::BaseDevice();
     XMLAtt *ap;
     char * device_name;
@@ -367,5 +442,5 @@
     cDevices.push_back(dp);
 
-    newDevice(device_name);
+    newDevice(dp);
 
     /* ok */
@@ -373,8 +448,8 @@
 }
 
-INDI::BaseDriver * INDI::BaseClient::findDev (XMLEle *root, int create, char * errmsg)
+INDI::BaseDevice * INDI::BaseClient::findDev (XMLEle *root, int create, char * errmsg)
 {
     XMLAtt *ap;
-    INDI::BaseDriver *dp;
+    INDI::BaseDevice *dp;
     char *dn;
 
@@ -407,49 +482,12 @@
 int INDI::BaseClient::messageCmd (XMLEle *root, char * errmsg)
 {
-    checkMsg (root, findDev (root, 0, errmsg));
+    INDI::BaseDevice *dp =findDev (root, 0, errmsg);
+
+    if (dp)
+        dp->checkMessage(root);
+
     return (0);
 }
 
-/* add message to queue
- * N.B. don't put carriage control in msg, we take care of that.
- */
-void INDI::BaseClient::checkMsg (XMLEle *root, INDI::BaseDriver *dp)
-{
-    XMLAtt *ap;
-    ap = findXMLAtt(root, "message");
-
-    if (ap)
-        doMsg(root, dp);
-}
-
-/* Store msg in queue */
-void INDI::BaseClient::doMsg (XMLEle *msg, INDI::BaseDriver *dp)
-{
-    XMLAtt *message;
-    XMLAtt *time_stamp;
-    char msgBuffer[MAXRBUF];
-
-    if (dp == NULL)
-        return;
-
-    /* prefix our timestamp if not with msg */
-    time_stamp = findXMLAtt (msg, "timestamp");
-
-    if (time_stamp)
-        snprintf(msgBuffer, MAXRBUF, "%s ", valuXMLAtt(time_stamp));
-    else
-        snprintf(msgBuffer, MAXRBUF, "%s ", timestamp());
-
-    /* finally! the msg */
-    message = findXMLAtt(msg, "message");
-
-    if (!message) return;
-
-    // Prepend to the log
-   dp->addMessage(msgBuffer);
-   dp->addMessage(valuXMLAtt(message));
-   dp->addMessage("\n");
-\
-}
 
 void INDI::BaseClient::sendNewText (ITextVectorProperty *tvp)
@@ -471,4 +509,28 @@
 }
 
+void INDI::BaseClient::sendNewText (const char * deviceName, const char * propertyName, const char* elementName, const char *text)
+{
+
+    INDI::BaseDevice *drv = getDevice(deviceName);
+
+    if (drv == NULL)
+        return;
+
+    ITextVectorProperty *tvp = drv->getText(propertyName);
+
+    if (tvp == NULL)
+        return;
+
+    IText * tp = IUFindText(tvp, elementName);
+
+    if (tp == NULL)
+        return;
+
+    tvp->s = IPS_BUSY;
+    IUSaveText(tp, text);
+
+    sendNewText(tvp);
+}
+
 void INDI::BaseClient::sendNewNumber (INumberVectorProperty *nvp)
 {
@@ -489,18 +551,83 @@
 }
 
-void INDI::BaseClient::sendNewSwitch (ISwitchVectorProperty *svp, ISwitch *sp)
-{
+void INDI::BaseClient::sendNewNumber (const char *deviceName, const char *propertyName, const char* elementName, double value)
+{
+    INDI::BaseDevice *drv = getDevice(deviceName);
+
+    if (drv == NULL)
+        return;
+
+    INumberVectorProperty *nvp = drv->getNumber(propertyName);
+
+    if (nvp == NULL)
+        return;
+
+    INumber * np = IUFindNumber(nvp, elementName);
+
+    if (np == NULL)
+        return;
+
+    np->value = value;
+    nvp->s = IPS_BUSY;
+
+    sendNewNumber(nvp);
+
+}
+
+void INDI::BaseClient::sendNewSwitch (ISwitchVectorProperty *svp)
+{
+    ISwitch *onSwitch = IUFindOnSwitch(svp);
+
     fprintf(svrwfp, "<newSwitchVector\n");
 
     fprintf(svrwfp, "  device='%s'\n", svp->device);
     fprintf(svrwfp, "  name='%s'>\n", svp->name);
-    fprintf(svrwfp, "  <oneSwitch\n");
-    fprintf(svrwfp, "    name='%s'>\n", sp->name);
-    fprintf(svrwfp, "      %s\n", (sp->s == ISS_ON) ? "On" : "Off");
-    fprintf(svrwfp, "  </oneSwitch>\n");
+
+    if (svp->r == ISR_1OFMANY && onSwitch)
+    {
+        fprintf(svrwfp, "  <oneSwitch\n");
+        fprintf(svrwfp, "    name='%s'>\n", onSwitch->name);
+        fprintf(svrwfp, "      %s\n", (onSwitch->s == ISS_ON) ? "On" : "Off");
+        fprintf(svrwfp, "  </oneSwitch>\n");
+    }
+    else
+    {
+        for (int i=0; i < svp->nsp; i++)
+        {
+            fprintf(svrwfp, "  <oneSwitch\n");
+            fprintf(svrwfp, "    name='%s'>\n", svp->sp[i].name);
+            fprintf(svrwfp, "      %s\n", (svp->sp[i].s == ISS_ON) ? "On" : "Off");
+            fprintf(svrwfp, "  </oneSwitch>\n");
+
+        }
+    }
 
     fprintf(svrwfp, "</newSwitchVector>\n");
 
     fflush(svrwfp);
+}
+
+void INDI::BaseClient::sendNewSwitch (const char *deviceName, const char *propertyName, const char *elementName)
+{
+    INDI::BaseDevice *drv = getDevice(deviceName);
+
+    if (drv == NULL)
+        return;
+
+    ISwitchVectorProperty *svp = drv->getSwitch(propertyName);
+
+    if (svp == NULL)
+        return;
+
+    ISwitch * sp = IUFindSwitch(svp, elementName);
+
+    if (sp == NULL)
+        return;
+
+    sp->s = ISS_ON;
+    svp->s = IPS_BUSY;
+
+    sendNewSwitch(svp);
+
 }
 
@@ -513,5 +640,5 @@
 }
 
-void INDI::BaseClient::sendOneBlob( const char *blobName, unsigned int blobSize, const char *blobFormat, unsigned char * blobBuffer)
+void INDI::BaseClient::sendOneBlob( const char *blobName, unsigned int blobSize, const char *blobFormat, void * blobBuffer)
 {
     fprintf(svrwfp, "  <oneBLOB\n");
@@ -521,5 +648,5 @@
 
     for (unsigned i = 0; i < blobSize; i += 72)
-        fprintf(svrwfp, "    %.72s\n", blobBuffer+i);
+        fprintf(svrwfp, "    %.72s\n", ((char *) blobBuffer+i));
 
     fprintf(svrwfp, "   </oneBLOB>\n");
Index: /BAORadio/libindi/libindi/libs/indibase/baseclient.h
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/baseclient.h	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/baseclient.h	(revision 697)
@@ -38,5 +38,5 @@
    BaseClient enables accelerated development of INDI Clients by providing a framework that facilitates communication, device
    handling, and event notification. By subclassing BaseClient, clients can quickly connect to an INDI server, and query for
-   a set of INDI::BaseDriver devices, and read and write properties seamlessly. Event driven programming is possible due to
+   a set of INDI::BaseDevice devices, and read and write properties seamlessly. Event driven programming is possible due to
    notifications upon reception of new devices or properties.
 
@@ -52,5 +52,5 @@
 public:
     enum { INDI_DEVICE_NOT_FOUND=-1, INDI_PROPERTY_INVALID=-2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR=-4 };
-    //typedef boost::shared_ptr<INDI::BaseDriver> devicePtr;
+    //typedef boost::shared_ptr<INDI::BaseDevice> devicePtr;
 
     BaseClient();
@@ -67,5 +67,5 @@
         A client may select to receive notifications of only a specific device or a set of devices.
         If the client encounters any of the devices set via this function, it will create a corresponding
-        INDI::BaseDriver object to handle them. If no devices are watched, then all devices owned by INDI server
+        INDI::BaseDevice object to handle them. If no devices are watched, then all devices owned by INDI server
         will be created and handled.
     */
@@ -87,19 +87,22 @@
     bool disconnectServer();
 
-    /** \brief Connect/Disconnect to INDI driver
-        \param status If true, the client will attempt to turn on CONNECTION property within the driver (i.e. turn on the device).
-         Otherwise, CONNECTION will be turned off.
+    /** \brief Connect to INDI driver
         \param deviceName Name of the device to connect to.
     */
-    void setDriverConnection(bool status, const char *deviceName);
+    void connectDevice(const char *deviceName);
+
+    /** \brief Disconnect INDI driver
+        \param deviceName Name of the device to disconnect.
+    */
+    void disconnectDevice(const char *deviceName);
 
     /** \param deviceName Name of device to search for in the list of devices owned by INDI server,
          \returns If \e deviceName exists, it returns an instance of the device. Otherwise, it returns NULL.
     */
-    INDI::BaseDriver * getDriver(const char * deviceName);
+    INDI::BaseDevice * getDevice(const char * deviceName);
 
     /** \returns Returns a vector of all devices created in the client.
     */
-    const vector<INDI::BaseDriver *> & getDrivers() const { return cDevices; }
+    const vector<INDI::BaseDevice *> & getDevices() const { return cDevices; }
 
     /** \brief Set Binary Large Object policy mode
@@ -125,43 +128,57 @@
     static void * listenHelper(void *context);
 
-protected:
-
-    /** \brief Dispatch command received from INDI server to respective devices handled by the client */
-    int dispatchCommand(XMLEle *root, char* errmsg);
-
-    /** \brief Remove device */
-    int removeDevice( const char * devName, char * errmsg );
-
-    /** \brief Delete property command */
-    int delPropertyCmd (XMLEle *root, char * errmsg);
-
-    /** \brief Find and return a particular device */
-    INDI::BaseDriver * findDev( const char * devName, char * errmsg);
-    /** \brief Add a new device */
-    INDI::BaseDriver * addDevice (XMLEle *dep, char * errmsg);
-    /** \brief Find a device, and if it doesn't exist, create it if create is set to 1 */
-    INDI::BaseDriver * findDev (XMLEle *root, int create, char * errmsg);
-
-    /**  Process messages */
-    int messageCmd (XMLEle *root, char * errmsg);
-    /**  Process messages */
-    void checkMsg (XMLEle *root, INDI::BaseDriver *dp);
-    /**  Process messages */
-    void doMsg (XMLEle *msg, INDI::BaseDriver *dp);
+    const char * getHost() { return cServer.c_str();}
+    int getPort() { return cPort; }
 
     /** \brief Send new Text command to server */
     void sendNewText (ITextVectorProperty *pp);
+    /** \brief Send new Text command to server */
+    void sendNewText (const char * deviceName, const char * propertyName, const char* elementName, const char *text);
     /** \brief Send new Number command to server */
     void sendNewNumber (INumberVectorProperty *pp);
+    /** \brief Send new Number command to server */
+    void sendNewNumber (const char * deviceName, const char *propertyName, const char* elementName, double value);
     /** \brief Send new Switch command to server */
-    void sendNewSwitch (ISwitchVectorProperty *pp, ISwitch *lp);
+    void sendNewSwitch (ISwitchVectorProperty *pp);
+    /** \brief Send new Switch command to server */
+    void sendNewSwitch (const char * deviceName, const char *propertyName, const char *elementName);
+
     /** \brief Send opening tag for BLOB command to server */
     void startBlob( const char *devName, const char *propName, const char *timestamp);
     /** \brief Send ONE blob content to server */
-    void sendOneBlob( const char *blobName, unsigned int blobSize, const char *blobFormat, unsigned char * blobBuffer);
+    void sendOneBlob( const char *blobName, unsigned int blobSize, const char *blobFormat, void * blobBuffer);
     /** \brief Send closing tag for BLOB command to server */
     void finishBlob();
 
+protected:
+
+    /** \brief Dispatch command received from INDI server to respective devices handled by the client */
+    int dispatchCommand(XMLEle *root, char* errmsg);
+
+    /** \brief Remove device */
+    int removeDevice( const char * devName, char * errmsg );
+
+    /** \brief Delete property command */
+    int delPropertyCmd (XMLEle *root, char * errmsg);
+
+    /** \brief Find and return a particular device */
+    INDI::BaseDevice * findDev( const char * devName, char * errmsg);
+    /** \brief Add a new device */
+    INDI::BaseDevice * addDevice (XMLEle *dep, char * errmsg);
+    /** \brief Find a device, and if it doesn't exist, create it if create is set to 1 */
+    INDI::BaseDevice * findDev (XMLEle *root, int create, char * errmsg);
+
+    /**  Process messages */
+    int messageCmd (XMLEle *root, char * errmsg);
+
+
 private:
+
+    /** \brief Connect/Disconnect to INDI driver
+        \param status If true, the client will attempt to turn on CONNECTION property within the driver (i.e. turn on the device).
+         Otherwise, CONNECTION will be turned off.
+        \param deviceName Name of the device to connect to.
+    */
+    void setDriverConnection(bool status, const char *deviceName);
 
     // Listen to INDI server and process incoming messages
@@ -171,5 +188,5 @@
     pthread_t listen_thread;
 
-    vector<INDI::BaseDriver *> cDevices;
+    vector<INDI::BaseDevice *> cDevices;
     vector<string> cDeviceNames;
 
Index: /BAORadio/libindi/libindi/libs/indibase/indibase.h
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/indibase.h	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/indibase.h	(revision 697)
@@ -33,6 +33,6 @@
     class BaseMediator;
     class BaseClient;
-    class BaseDriver;
-    class DefaultDriver;
+    class BaseDevice;
+    class DefaultDevice;
     class FilterInterface;
     class GuiderInterface;
@@ -41,6 +41,18 @@
     class FilterWheel;
     class Focuser;
-    class USBDevice;   
+    class USBDevice;
+    class Property;
 }
+
+/*! INDI property type */
+typedef enum
+{
+    INDI_NUMBER, /*!< INumberVectorProperty. */
+    INDI_SWITCH, /*!< ISwitchVectorProperty. */
+    INDI_TEXT,   /*!< ITextVectorProperty. */
+    INDI_LIGHT,  /*!< ILightVectorProperty. */
+    INDI_BLOB,    /*!< IBLOBVectorProperty. */
+    INDI_UNKNOWN
+} INDI_TYPE;
 
 
@@ -56,11 +68,19 @@
         \param device_name Name of the new device
     */
-    virtual void newDevice(const char *device_name)  =0;
+    virtual void newDevice(INDI::BaseDevice *dp)  =0;
 
     /** \brief Emmited when a new property is created for an INDI driver.
-        \param device_name Name of the device
-        \param property_name Name of the new property
+        \param property Pointer to the Property Container
+
     */
-    virtual void newProperty(const char *device_name, const char *property_name)  =0;
+    virtual void newProperty(INDI::Property *property)  =0;
+
+
+    /** \brief Emmited when a property is deleted for an INDI driver.
+        \param property Pointer to the Property Container to remove.
+
+    */
+    virtual void removeProperty(INDI::Property *property)  =0;
+
 
     /** \brief Emmited when a new BLOB value arrives from INDI server.
@@ -89,4 +109,9 @@
     virtual void newLight(ILightVectorProperty *lvp) =0;
 
+    /** \brief Emmited when a new message arrives from INDI server.
+        \param dp pointer to the INDI device the message is sent to.
+    */
+    virtual void newMessage(INDI::BaseDevice *dp) =0;
+
     /** \brief Emmited when the server is connected.
     */
@@ -94,6 +119,7 @@
 
     /** \brief Emmited when the server gets disconnected.
+        \param exit_code 0 if client was requested to disconnect from server. -1 if connection to server is terminated due to remote server disconnection.
     */
-    virtual void serverDisconnected() =0;
+    virtual void serverDisconnected(int exit_code) =0;
 };
 
Index: /BAORadio/libindi/libindi/libs/indibase/indiccd.cpp
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/indiccd.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/indiccd.cpp	(revision 697)
@@ -162,15 +162,15 @@
     HasSt4Port=false;
     InExposure=false;
-    TelescopeTP = new ITextVectorProperty;
+    ActiveDeviceTP = new ITextVectorProperty;
 }
 
 INDI::CCD::~CCD()
 {
-    delete TelescopeTP;
+    delete ActiveDeviceTP;
 }
 
 bool INDI::CCD::initProperties()
 {
-    DefaultDriver::initProperties();   //  let the base class flesh in what it wants
+    DefaultDevice::initProperties();   //  let the base class flesh in what it wants
 
     // PRIMARY CCD Init
@@ -180,5 +180,5 @@
     IUFillNumber(&PrimaryCCD.ImageFrameN[2],"WIDTH","Width","%4.0f",0,1392.0,0,1392.0);
     IUFillNumber(&PrimaryCCD.ImageFrameN[3],"HEIGHT","Height","%4.0f",0,1040,0,1040);
-    IUFillNumberVector(PrimaryCCD.ImageFrameNP,PrimaryCCD.ImageFrameN,4,deviceName(),"CCD_FRAME","Frame",IMAGE_SETTINGS_TAB,IP_RW,60,IPS_IDLE);
+    IUFillNumberVector(PrimaryCCD.ImageFrameNP,PrimaryCCD.ImageFrameN,4,getDeviceName(),"CCD_FRAME","Frame",IMAGE_SETTINGS_TAB,IP_RW,60,IPS_IDLE);
 
     IUFillSwitch(&PrimaryCCD.FrameTypeS[0],"FRAME_LIGHT","Light",ISS_ON);
@@ -186,12 +186,12 @@
     IUFillSwitch(&PrimaryCCD.FrameTypeS[2],"FRAME_DARK","Dark",ISS_OFF);
     IUFillSwitch(&PrimaryCCD.FrameTypeS[3],"FRAME_FLAT","Flat",ISS_OFF);
-    IUFillSwitchVector(PrimaryCCD.FrameTypeSP,PrimaryCCD.FrameTypeS,4,deviceName(),"CCD_FRAME_TYPE","FrameType",IMAGE_SETTINGS_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
+    IUFillSwitchVector(PrimaryCCD.FrameTypeSP,PrimaryCCD.FrameTypeS,4,getDeviceName(),"CCD_FRAME_TYPE","FrameType",IMAGE_SETTINGS_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
 
     IUFillNumber(&PrimaryCCD.ImageExposureN[0],"CCD_EXPOSURE_VALUE","Duration (s)","%5.2f",0,36000,0,1.0);
-    IUFillNumberVector(PrimaryCCD.ImageExposureNP,PrimaryCCD.ImageExposureN,1,deviceName(),"CCD_EXPOSURE_REQUEST","Expose",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
+    IUFillNumberVector(PrimaryCCD.ImageExposureNP,PrimaryCCD.ImageExposureN,1,getDeviceName(),"CCD_EXPOSURE_REQUEST","Expose",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
 
     IUFillNumber(&PrimaryCCD.ImageBinN[0],"HOR_BIN","X","%2.0f",1,4,1,1);
     IUFillNumber(&PrimaryCCD.ImageBinN[1],"VER_BIN","Y","%2.0f",1,4,1,1);
-    IUFillNumberVector(PrimaryCCD.ImageBinNP,PrimaryCCD.ImageBinN,2,deviceName(),"CCD_BINNING","Binning",IMAGE_SETTINGS_TAB,IP_RW,60,IPS_IDLE);
+    IUFillNumberVector(PrimaryCCD.ImageBinNP,PrimaryCCD.ImageBinN,2,getDeviceName(),"CCD_BINNING","Binning",IMAGE_SETTINGS_TAB,IP_RW,60,IPS_IDLE);
 
     IUFillNumber(&PrimaryCCD.ImagePixelSizeN[0],"CCD_MAX_X","Resolution x","%4.0f",1,40,0,6.45);
@@ -201,12 +201,12 @@
     IUFillNumber(&PrimaryCCD.ImagePixelSizeN[4],"CCD_PIXEL_SIZE_Y","Pixel size Y","%5.2f",1,40,0,6.45);
     IUFillNumber(&PrimaryCCD.ImagePixelSizeN[5],"CCD_BITSPERPIXEL","Bits per pixel","%3.0f",1,40,0,6.45);
-    IUFillNumberVector(PrimaryCCD.ImagePixelSizeNP,PrimaryCCD.ImagePixelSizeN,6,deviceName(),"CCD_INFO","Ccd Information",IMAGE_INFO_TAB,IP_RO,60,IPS_IDLE);
+    IUFillNumberVector(PrimaryCCD.ImagePixelSizeNP,PrimaryCCD.ImagePixelSizeN,6,getDeviceName(),"CCD_INFO","Ccd Information",IMAGE_INFO_TAB,IP_RO,60,IPS_IDLE);
 
     IUFillSwitch(&PrimaryCCD.CompressS[0],"COMPRESS","Compress",ISS_OFF);
     IUFillSwitch(&PrimaryCCD.CompressS[1],"RAW","Raw",ISS_ON);
-    IUFillSwitchVector(PrimaryCCD.CompressSP,PrimaryCCD.CompressS,2,deviceName(),"COMPRESSION","Image",IMAGE_SETTINGS_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
+    IUFillSwitchVector(PrimaryCCD.CompressSP,PrimaryCCD.CompressS,2,getDeviceName(),"COMPRESSION","Image",IMAGE_SETTINGS_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
 
     IUFillBLOB(&PrimaryCCD.FitsB,"CCD1","Image","");
-    IUFillBLOBVector(PrimaryCCD.FitsBP,&PrimaryCCD.FitsB,1,deviceName(),"CCD1","Image Data",OPTIONS_TAB,IP_RO,60,IPS_IDLE);
+    IUFillBLOBVector(PrimaryCCD.FitsBP,&PrimaryCCD.FitsB,1,getDeviceName(),"CCD1","Image Data",OPTIONS_TAB,IP_RO,60,IPS_IDLE);
 
     // GUIDER CCD Init
@@ -216,5 +216,5 @@
     IUFillNumber(&GuideCCD.ImageFrameN[2],"WIDTH","Width","%4.0f",0,1392.0,0,1392.0);
     IUFillNumber(&GuideCCD.ImageFrameN[3],"HEIGHT","Height","%4.0f",0,1040,0,1040);
-    IUFillNumberVector(GuideCCD.ImageFrameNP,GuideCCD.ImageFrameN,4,deviceName(),"GUIDE_FRAME","Frame",GUIDE_HEAD_TAB,IP_RW,60,IPS_IDLE);
+    IUFillNumberVector(GuideCCD.ImageFrameNP,GuideCCD.ImageFrameN,4,getDeviceName(),"GUIDE_FRAME","Frame",GUIDE_HEAD_TAB,IP_RW,60,IPS_IDLE);
 
     IUFillNumber(&GuideCCD.ImagePixelSizeN[0],"Image_MAX_X","Resolution x","%4.0f",1,40,0,6.45);
@@ -224,27 +224,33 @@
     IUFillNumber(&GuideCCD.ImagePixelSizeN[4],"Image_PIXEL_SIZE_Y","Pixel size Y","%5.2f",1,40,0,6.45);
     IUFillNumber(&GuideCCD.ImagePixelSizeN[5],"Image_BITSPERPIXEL","Bits per pixel","%3.0f",1,40,0,6.45);
-    IUFillNumberVector(GuideCCD.ImagePixelSizeNP,GuideCCD.ImagePixelSizeN,6,deviceName(),"GUIDE_INFO",GUIDE_HEAD_TAB,GUIDE_HEAD_TAB,IP_RO,60,IPS_IDLE);
+    IUFillNumberVector(GuideCCD.ImagePixelSizeNP,GuideCCD.ImagePixelSizeN,6,getDeviceName(),"GUIDE_INFO",GUIDE_HEAD_TAB,GUIDE_HEAD_TAB,IP_RO,60,IPS_IDLE);
 
     IUFillNumber(&GuideCCD.ImageExposureN[0],"GUIDER_EXPOSURE_VALUE","Duration (s)","%5.2f",0,36000,0,1.0);
-    IUFillNumberVector(GuideCCD.ImageExposureNP,GuideCCD.ImageExposureN,1,deviceName(),"GUIDER_EXPOSURE","Image",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
+    IUFillNumberVector(GuideCCD.ImageExposureNP,GuideCCD.ImageExposureN,1,getDeviceName(),"GUIDER_EXPOSURE","Image",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
 
     IUFillSwitch(&GuideCCD.CompressS[0],"GCOMPRESS","Compress",ISS_OFF);
     IUFillSwitch(&GuideCCD.CompressS[1],"GRAW","Raw",ISS_ON);
-    IUFillSwitchVector(GuideCCD.CompressSP,GuideCCD.CompressS,2,deviceName(),"GCOMPRESSION","Image",GUIDE_HEAD_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
+    IUFillSwitchVector(GuideCCD.CompressSP,GuideCCD.CompressS,2,getDeviceName(),"GCOMPRESSION","Image",GUIDE_HEAD_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
 
     IUFillBLOB(&GuideCCD.FitsB,"CCD2","Guider Image","");
-    IUFillBLOBVector(GuideCCD.FitsBP,&GuideCCD.FitsB,1,deviceName(),"CCD2","Image Data",OPTIONS_TAB,IP_RO,60,IPS_IDLE);
+    IUFillBLOBVector(GuideCCD.FitsBP,&GuideCCD.FitsB,1,getDeviceName(),"CCD2","Image Data",OPTIONS_TAB,IP_RO,60,IPS_IDLE);
 
     // CCD Class Init
 
-    IUFillText(&TelescopeT[0],"ACTIVE_TELESCOPE","Telescope","");
-    IUFillTextVector(TelescopeTP,TelescopeT,1,deviceName(),"ACTIVE_DEVICES","Snoop Scope",OPTIONS_TAB,IP_RW,60,IPS_IDLE);
+    IUFillText(&ActiveDeviceT[0],"ACTIVE_TELESCOPE","Telescope","Telescope Simulator");
+    IUFillText(&ActiveDeviceT[1],"ACTIVE_FOCUSER","Focuser","Focuser Simulator");
+    IUFillTextVector(ActiveDeviceTP,ActiveDeviceT,2,getDeviceName(),"ACTIVE_DEVICES","Snoop devices",OPTIONS_TAB,IP_RW,60,IPS_IDLE);
 
     IUFillNumber(&EqN[0],"RA_PEC","Ra (hh:mm:ss)","%010.6m",0,24,0,0);
     IUFillNumber(&EqN[1],"DEC_PEC","Dec (dd:mm:ss)","%010.6m",-90,90,0,0);
-    IUFillNumberVector(&EqNP,EqN,2,"","EQUATORIAL_PEC","EQ PEC","Main Control",IP_RW,60,IPS_IDLE);
+    IUFillNumberVector(&EqNP,EqN,2,ActiveDeviceT[0].text,"EQUATORIAL_PEC","EQ PEC","Main Control",IP_RW,60,IPS_IDLE);
+
+    IDSnoopDevice(ActiveDeviceT[0].text,"EQUATORIAL_PEC");
+    IDSnoopDevice(ActiveDeviceT[0].text,"TELESCOPE_PARAMETERS");
+    IDSnoopDevice(ActiveDeviceT[1].text,"FWHM");
+
 
     // Guider Interface
-    initGuiderProperties(deviceName(), GUIDE_CONTROL_TAB);
+    initGuiderProperties(getDeviceName(), GUIDE_CONTROL_TAB);
 
     return true;
@@ -257,5 +263,5 @@
     //IDLog("INDI::CCD IsGetProperties with %s\n",dev);
 
-    DefaultDriver::ISGetProperties(dev);
+    DefaultDevice::ISGetProperties(dev);
 
     return;
@@ -296,5 +302,5 @@
         }
         defineSwitch(PrimaryCCD.FrameTypeSP);
-        defineText(TelescopeTP);
+        defineText(ActiveDeviceTP);
     }
     else
@@ -321,10 +327,10 @@
         }
         deleteProperty(PrimaryCCD.FrameTypeSP->name);
-        deleteProperty(TelescopeTP->name);
+        deleteProperty(ActiveDeviceTP->name);
     }
     return true;
 }
 
-void INDI::CCD::ISSnoopDevice (XMLEle *root)
+bool INDI::CCD::ISSnoopDevice (XMLEle *root)
  {
      //fprintf(stderr," ################# CCDSim handling snoop ##############\n");
@@ -346,4 +352,6 @@
         //fprintf(stderr,"Snoop Failed\n");
      }
+
+     return true;
  }
 
@@ -353,20 +361,23 @@
     //IDLog("IndiTelescope got %d new text items name %s\n",n,name);
     //  first check if it's for our device
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         //  This is for our device
         //  Now lets see if it's something we process here
-        if(strcmp(name,TelescopeTP->name)==0)
+        if(strcmp(name,ActiveDeviceTP->name)==0)
         {
             int rc;
             //IDLog("calling update text\n");
-            TelescopeTP->s=IPS_OK;
-            rc=IUUpdateText(TelescopeTP,texts,names,n);
+            ActiveDeviceTP->s=IPS_OK;
+            rc=IUUpdateText(ActiveDeviceTP,texts,names,n);
             //IDLog("update text returns %d\n",rc);
             //  Update client display
-            IDSetText(TelescopeTP,NULL);
+            IDSetText(ActiveDeviceTP,NULL);
             saveConfig();
-            IUFillNumberVector(&EqNP,EqN,2,TelescopeT[0].text,"EQUATORIAL_PEC","EQ PEC",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
-            IDSnoopDevice(TelescopeT[0].text,"EQUATORIAL_PEC");
+            IUFillNumberVector(&EqNP,EqN,2,ActiveDeviceT[0].text,"EQUATORIAL_PEC","EQ PEC",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
+
+            IDSnoopDevice(ActiveDeviceT[0].text,"EQUATORIAL_PEC");
+            IDSnoopDevice(ActiveDeviceT[0].text,"TELESCOPE_PARAMETERS");
+            IDSnoopDevice(ActiveDeviceT[1].text,"FWHM");
             //  We processed this one, so, tell the world we did it
             return true;
@@ -375,5 +386,5 @@
     }
 
-    return INDI::DefaultDriver::ISNewText(dev,name,texts,names,n);
+    return INDI::DefaultDevice::ISNewText(dev,name,texts,names,n);
 }
 
@@ -382,5 +393,5 @@
     //  first check if it's for our device
     //IDLog("INDI::CCD::ISNewNumber %s\n",name);
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         //  This is for our device
@@ -497,5 +508,6 @@
             //IDSetNumber(GuiderFrameNP,NULL);
 
-            IDLog("GuiderFrame set to %4.0f,%4.0f %4.0f x %4.0f\n",
+            if (isDebug())
+                IDLog("GuiderFrame set to %4.0f,%4.0f %4.0f x %4.0f\n",
                   GuideCCD.ImageFrameN[0].value,GuideCCD.ImageFrameN[1].value,GuideCCD.ImageFrameN[2].value,GuideCCD.ImageFrameN[3].value);
             //GSubX=GuiderFrameN[0].value;
@@ -517,5 +529,6 @@
             IDSetNumber(GuideNSP,NULL);
 
-            fprintf(stderr,"GuideNorthSouth set to %7.3f,%7.3f\n", GuideNS[0].value,GuideNS[1].value);
+            if (isDebug())
+                fprintf(stderr,"GuideNorthSouth set to %7.3f,%7.3f\n", GuideNS[0].value,GuideNS[1].value);
 
             if(GuideNS[0].value != 0)
@@ -542,6 +555,6 @@
             IDSetNumber(GuideEWP,NULL);
 
-            fprintf(stderr,"GuiderEastWest set to %6.3f,%6.3f\n",
-                  GuideEW[0].value,GuideEW[1].value);
+            if (isDebug())
+                fprintf(stderr,"GuiderEastWest set to %6.3f,%6.3f\n", GuideEW[0].value,GuideEW[1].value);
 
             if(GuideEW[0].value != 0)
@@ -564,5 +577,5 @@
     //  if we didn't process it, continue up the chain, let somebody else
     //  give it a shot
-    return DefaultDriver::ISNewNumber(dev,name,values,names,n);
+    return DefaultDevice::ISNewNumber(dev,name,values,names,n);
 }
 
@@ -570,5 +583,5 @@
 {
 
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
 
@@ -623,5 +636,5 @@
 
     // let the default driver have a crack at it
-    return DefaultDriver::ISNewSwitch(dev, name, states, names, n);
+    return DefaultDevice::ISNewSwitch(dev, name, states, names, n);
 }
 
@@ -789,5 +802,5 @@
 {
     //  lets try sending a ccd preview
-    //IDLog("Enter Uploadfile with %d total sending via %s\n",total,FitsBP->name);
+
     PrimaryCCD.FitsB.blob=fitsdata;
     PrimaryCCD.FitsB.bloblen=total;
@@ -795,4 +808,5 @@
     strcpy(PrimaryCCD.FitsB.format,".fits");
     PrimaryCCD.FitsBP->s=IPS_OK;
+    //IDLog("Enter Uploadfile with %d total sending via %s, and format %s\n",total,PrimaryCCD.FitsB.name, PrimaryCCD.FitsB.format);
     IDSetBLOB(PrimaryCCD.FitsBP,NULL);
 
Index: /BAORadio/libindi/libindi/libs/indibase/indiccd.h
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/indiccd.h	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/indiccd.h	(revision 697)
@@ -23,5 +23,5 @@
 #include <fitsio.h>
 
-#include "defaultdriver.h"
+#include "defaultdevice.h"
 #include "indiguiderinterface.h"
 
@@ -122,5 +122,5 @@
 \author Gerry Rozema, Jasem Mutlaq
 */
-class INDI::CCD : public INDI::DefaultDriver, INDI::GuiderInterface
+class INDI::CCD : public INDI::DefaultDevice, INDI::GuiderInterface
 {
       public:
@@ -134,5 +134,5 @@
         virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
         virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);
-        virtual void ISSnoopDevice (XMLEle *root);
+        virtual bool ISSnoopDevice (XMLEle *root);
 
      protected:
@@ -240,4 +240,10 @@
         virtual bool GuideWest(float ms);
 
+        /** \brief Add FITS keywords to a fits file
+            \param fptr pointer to a valid FITS file.
+            \note This function is not implemented in INDI::CCD, it must be implemented in the child class
+        */
+        virtual void addFITSKeywords(fitsfile *fptr);
+
         float RA;
         float Dec;
@@ -254,8 +260,7 @@
     INumber EqN[2];
 
-    ITextVectorProperty *TelescopeTP;
-    IText TelescopeT[1];
-
-    void addFITSKeywords(fitsfile *fptr);
+    ITextVectorProperty *ActiveDeviceTP;
+    IText ActiveDeviceT[2];
+
     int uploadfile(void *fitsdata,int total);
 
Index: /BAORadio/libindi/libindi/libs/indibase/indifilterinterface.h
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/indifilterinterface.h	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/indifilterinterface.h	(revision 697)
@@ -53,8 +53,9 @@
     /** \brief Obtains a list of filter names from the hardware and initilizes the FilterNameTP property. The function should check for the number of filters
       available in the filter wheel and build the FilterNameTP property accordingly.
+      \param groupName group name for FilterNameTP property to be created.
       \return True if successful, false if unsupported or failed operation
       \see QSI CCD implementation of the FilterInterface. QSI CCD is available as a 3rd party INDI driver.
     */
-    virtual bool GetFilterNames(const char *deviceName, const char* groupName) = 0;
+    virtual bool GetFilterNames(const char* groupName) = 0;
 
     /** \brief The child class calls this function when the hardware successfully finished selecting a new filter wheel position
Index: /BAORadio/libindi/libindi/libs/indibase/indifilterwheel.cpp
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/indifilterwheel.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/indifilterwheel.cpp	(revision 697)
@@ -35,7 +35,9 @@
 bool INDI::FilterWheel::initProperties()
 {
-    DefaultDriver::initProperties();
+    DefaultDevice::initProperties();
 
-    initFilterProperties(deviceName(), FILTER_TAB);
+    initFilterProperties(getDeviceName(), FILTER_TAB);
+
+    return true;
 }
 
@@ -44,10 +46,10 @@
     //  First we let our parent populate
     //IDLog("INDI::FilterWheel::ISGetProperties %s\n",dev);
-    DefaultDriver::ISGetProperties(dev);
+    DefaultDevice::ISGetProperties(dev);
     if(isConnected())
     {
         defineNumber(FilterSlotNP);
 
-        if (GetFilterNames(deviceName(), FILTER_TAB))
+        if (GetFilterNames(FILTER_TAB))
             defineText(FilterNameTP);
     }
@@ -62,7 +64,7 @@
     if(isConnected())
     {
-        initFilterProperties(deviceName(), FILTER_TAB);
+        //initFilterProperties(getDeviceName(), FILTER_TAB);
         defineNumber(FilterSlotNP);
-        if (GetFilterNames(deviceName(), FILTER_TAB))
+        if (GetFilterNames(FILTER_TAB))
             defineText(FilterNameTP);
     } else
@@ -77,5 +79,5 @@
 bool INDI::FilterWheel::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
 {
-    return DefaultDriver::ISNewSwitch(dev, name, states, names,n);
+    return DefaultDevice::ISNewSwitch(dev, name, states, names,n);
 }
 
@@ -84,5 +86,5 @@
     //  first check if it's for our device
     //IDLog("INDI::FilterWheel::ISNewNumber %s\n",name);
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         //  This is for our device
@@ -119,5 +121,5 @@
     //  if we didn't process it, continue up the chain, let somebody else
     //  give it a shot
-    return DefaultDriver::ISNewNumber(dev,name,values,names,n);
+    return DefaultDevice::ISNewNumber(dev,name,values,names,n);
 }
 
@@ -127,5 +129,5 @@
     //IDLog("INDI::FilterWheel got %d new text items name %s\n",n,name);
     //  first check if it's for our device
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         //  This is for our device
@@ -151,5 +153,5 @@
     }
 
-    return DefaultDriver::ISNewText(dev,name,texts,names,n);
+    return DefaultDevice::ISNewText(dev,name,texts,names,n);
 }
 
@@ -170,13 +172,7 @@
 }
 
-void INDI::FilterWheel::ISSnoopDevice (XMLEle *root)
+
+bool INDI::FilterWheel::GetFilterNames(const char* groupName)
 {
- return;
-}
-
-
-bool INDI::FilterWheel::GetFilterNames(const char *deviceName, const char* groupName)
-{
-    INDI_UNUSED(deviceName);
     INDI_UNUSED(groupName);
     return false;
Index: /BAORadio/libindi/libindi/libs/indibase/indifilterwheel.h
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/indifilterwheel.h	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/indifilterwheel.h	(revision 697)
@@ -20,5 +20,5 @@
 #define INDI_FILTERWHEEL_H
 
-#include "defaultdriver.h"
+#include "defaultdevice.h"
 #include "indifilterinterface.h"
 
@@ -32,5 +32,5 @@
 \see INDI::FilterInterface
 */
-class INDI::FilterWheel: public INDI::DefaultDriver, public INDI::FilterInterface
+class INDI::FilterWheel: public INDI::DefaultDevice, public INDI::FilterInterface
 {
 protected:
@@ -47,5 +47,4 @@
         virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n);
         virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);      
-        virtual void ISSnoopDevice (XMLEle *root);
 
    protected:
@@ -54,5 +53,5 @@
     virtual bool SelectFilter(int);
     virtual bool SetFilterNames();
-    virtual bool GetFilterNames(const char *deviceName, const char* groupName);
+    virtual bool GetFilterNames(const char* groupName);
 
 };
Index: /BAORadio/libindi/libindi/libs/indibase/indifocuser.cpp
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/indifocuser.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/indifocuser.cpp	(revision 697)
@@ -38,15 +38,15 @@
 bool INDI::Focuser::initProperties()
 {
-    DefaultDriver::initProperties();   //  let the base class flesh in what it wants
+    DefaultDevice::initProperties();   //  let the base class flesh in what it wants
 
     IUFillNumber(&FocusSpeedN[0],"FOCUS_SPEED_VALUE","Focus Speed","%3.0f",0.0,255.0,1.0,255.0);
-    IUFillNumberVector(FocusSpeedNP,FocusSpeedN,1,deviceName(),"FOCUS_SPEED","Speed",MAIN_CONTROL_TAB,IP_RW,60,IPS_OK);
+    IUFillNumberVector(FocusSpeedNP,FocusSpeedN,1,getDeviceName(),"FOCUS_SPEED","Speed",MAIN_CONTROL_TAB,IP_RW,60,IPS_OK);
 
     IUFillNumber(&FocusTimerN[0],"FOCUS_TIMER_VALUE","Focus Timer","%4.0f",0.0,1000.0,10.0,1000.0);
-    IUFillNumberVector(FocusTimerNP,FocusTimerN,1,deviceName(),"FOCUS_TIMER","Timer",MAIN_CONTROL_TAB,IP_RW,60,IPS_OK);
+    IUFillNumberVector(FocusTimerNP,FocusTimerN,1,getDeviceName(),"FOCUS_TIMER","Timer",MAIN_CONTROL_TAB,IP_RW,60,IPS_OK);
 
     IUFillSwitch(&FocusMotionS[0],"FOCUS_INWARD","Focus In",ISS_ON);
     IUFillSwitch(&FocusMotionS[1],"FOCUS_OUTWARD","Focus Out",ISS_OFF);
-    IUFillSwitchVector(FocusMotionSP,FocusMotionS,2,deviceName(),"FOCUS_MOTION","Direction",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_OK);
+    IUFillSwitchVector(FocusMotionSP,FocusMotionS,2,getDeviceName(),"FOCUS_MOTION","Direction",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_OK);
 
     return 0;
@@ -56,5 +56,5 @@
 {
     //  First we let our parent populate
-    DefaultDriver::ISGetProperties(dev);
+    DefaultDevice::ISGetProperties(dev);
 
     return;
@@ -82,5 +82,5 @@
 {
     //  first check if it's for our device
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         //  This is for our device
@@ -127,5 +127,5 @@
 
 
-    return DefaultDriver::ISNewNumber(dev,name,values,names,n);
+    return DefaultDevice::ISNewNumber(dev,name,values,names,n);
 }
 
@@ -133,5 +133,5 @@
 {
 
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         //  This one is for us
@@ -150,15 +150,10 @@
 
     //  Nobody has claimed this, so, ignore it
-    return DefaultDriver::ISNewSwitch(dev,name,states,names,n);
+    return DefaultDevice::ISNewSwitch(dev,name,states,names,n);
 }
 
 bool INDI::Focuser::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
 {
-    return DefaultDriver::ISNewText(dev, name, texts, names, n);
-}
-
-void INDI::Focuser::ISSnoopDevice (XMLEle *root)
-{
- return;
+    return DefaultDevice::ISNewText(dev, name, texts, names, n);
 }
 
@@ -172,2 +167,7 @@
 }
 
+bool INDI::Focuser::ISSnoopDevice (XMLEle *root)
+{
+    return false;
+}
+
Index: /BAORadio/libindi/libindi/libs/indibase/indifocuser.h
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/indifocuser.h	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/indifocuser.h	(revision 697)
@@ -20,5 +20,5 @@
 #define INDIFOCUSSER_H
 
-#include "defaultdriver.h"
+#include "defaultdevice.h"
 
 /**
@@ -30,5 +30,5 @@
 \author Gerry Rozema
 */
-class INDI::Focuser : public INDI::DefaultDriver
+class INDI::Focuser : public INDI::DefaultDevice
 {
     public:
@@ -44,5 +44,5 @@
         virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
         virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);
-        virtual void ISSnoopDevice (XMLEle *root);
+        virtual bool ISSnoopDevice (XMLEle *root);
 
     protected:
Index: /BAORadio/libindi/libindi/libs/indibase/inditelescope.cpp
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/inditelescope.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/inditelescope.cpp	(revision 697)
@@ -46,4 +46,5 @@
     MovementWESP = new ISwitchVectorProperty;
     ConfigSV = new ISwitchVectorProperty;
+    ScopeParametersNP = new INumberVectorProperty;
 
 }
@@ -60,46 +61,51 @@
     delete MovementWESP;
     delete ConfigSV;
+    delete ScopeParametersNP;
 }
 
 bool INDI::Telescope::initProperties()
 {
-    DefaultDriver::initProperties();
+    DefaultDevice::initProperties();
 
     IUFillNumber(&EqN[0],"RA","RA (hh:mm:ss)","%010.6m",0,24,0,0);
     IUFillNumber(&EqN[1],"DEC","DEC (dd:mm:ss)","%010.6m",-90,90,0,0);
-    IUFillNumberVector(EqNV,EqN,2,deviceName(),"EQUATORIAL_EOD_COORD","Eq. Coordinates",MAIN_CONTROL_TAB,IP_RO,60,IPS_IDLE);
+    IUFillNumberVector(EqNV,EqN,2,getDeviceName(),"EQUATORIAL_EOD_COORD","Eq. Coordinates",MAIN_CONTROL_TAB,IP_RO,60,IPS_IDLE);
 
     IUFillNumber(&EqReqN[0],"RA","RA (hh:mm:ss)","%010.6m",0,24,0,0);
     IUFillNumber(&EqReqN[1],"DEC","DEC (dd:mm:ss)","%010.6m",-90,90,0,0);
-    IUFillNumberVector(EqReqNV,EqReqN,2,deviceName(),"EQUATORIAL_EOD_COORD_REQUEST","GOTO",MAIN_CONTROL_TAB,IP_WO,60,IPS_IDLE);
+    IUFillNumberVector(EqReqNV,EqReqN,2,getDeviceName(),"EQUATORIAL_EOD_COORD_REQUEST","GOTO",MAIN_CONTROL_TAB,IP_WO,60,IPS_IDLE);
 
     IUFillNumber(&LocationN[0],"LAT","Lat (dd:mm:ss)","%010.6m",-90,90,0,0.0);
     IUFillNumber(&LocationN[1],"LONG","Lon (dd:mm:ss)","%010.6m",-180,180,0,0.0 );
-    IUFillNumberVector(LocationNV,LocationN,2,deviceName(),"GEOGRAPHIC_COORD","Scope Location",SITE_TAB,IP_RW,60,IPS_OK);
+    IUFillNumberVector(LocationNV,LocationN,2,getDeviceName(),"GEOGRAPHIC_COORD","Scope Location",SITE_TAB,IP_RW,60,IPS_OK);
 
     IUFillSwitch(&CoordS[0],"TRACK","Track",ISS_OFF);
     IUFillSwitch(&CoordS[1],"SLEW","Slew",ISS_OFF);
     IUFillSwitch(&CoordS[2],"SYNC","Sync",ISS_OFF);
-    IUFillSwitchVector(CoordSV,CoordS,3,deviceName(),"ON_COORD_SET","On Set",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
+    IUFillSwitchVector(CoordSV,CoordS,3,getDeviceName(),"ON_COORD_SET","On Set",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
 
     IUFillSwitch(&ConfigS[0], "CONFIG_LOAD", "Load", ISS_OFF);
     IUFillSwitch(&ConfigS[1], "CONFIG_SAVE", "Save", ISS_OFF);
     IUFillSwitch(&ConfigS[2], "CONFIG_DEFAULT", "Default", ISS_OFF);
-    IUFillSwitchVector(ConfigSV, ConfigS, 3, deviceName(), "CONFIG_PROCESS", "Configuration", "Options", IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
+    IUFillSwitchVector(ConfigSV, ConfigS, 3, getDeviceName(), "CONFIG_PROCESS", "Configuration", "Options", IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
 
 
     IUFillSwitch(&ParkS[0],"PARK","Park",ISS_OFF);
-    IUFillSwitchVector(ParkSV,ParkS,1,deviceName(),"TELESCOPE_PARK","Park",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
+    IUFillSwitchVector(ParkSV,ParkS,1,getDeviceName(),"TELESCOPE_PARK","Park",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
 
     IUFillText(&PortT[0],"PORT","Port","/dev/ttyUSB0");
-    IUFillTextVector(PortTV,PortT,1,deviceName(),"DEVICE_PORT","Ports",OPTIONS_TAB,IP_RW,60,IPS_IDLE);
+    IUFillTextVector(PortTV,PortT,1,getDeviceName(),"DEVICE_PORT","Ports",OPTIONS_TAB,IP_RW,60,IPS_IDLE);
 
     IUFillSwitch(&MovementNSS[MOTION_NORTH], "MOTION_NORTH", "North", ISS_OFF);
     IUFillSwitch(&MovementNSS[MOTION_SOUTH], "MOTION_SOUTH", "South", ISS_OFF);
-    IUFillSwitchVector(MovementNSSP, MovementNSS, 2, deviceName(),"TELESCOPE_MOTION_NS", "North/South", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
+    IUFillSwitchVector(MovementNSSP, MovementNSS, 2, getDeviceName(),"TELESCOPE_MOTION_NS", "North/South", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
 
     IUFillSwitch(&MovementWES[MOTION_WEST], "MOTION_WEST", "West", ISS_OFF);
     IUFillSwitch(&MovementWES[MOTION_EAST], "MOTION_EAST", "East", ISS_OFF);
-    IUFillSwitchVector(MovementWESP, MovementWES, 2, deviceName(),"TELESCOPE_MOTION_WE", "West/East", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
+    IUFillSwitchVector(MovementWESP, MovementWES, 2, getDeviceName(),"TELESCOPE_MOTION_WE", "West/East", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
+
+    IUFillNumber(&ScopeParametersN[0],"TELESCOPE_APERTURE","Aperture (mm)","%g",50,4000,0,0.0);
+    IUFillNumber(&ScopeParametersN[1],"TELESCOPE_FOCAL_LENGTH","Focal Length (mm)","%g",100,10000,0,0.0 );
+    IUFillNumberVector(ScopeParametersNP,ScopeParametersN,2,getDeviceName(),"TELESCOPE_PARAMETERS","Scope Properties",OPTIONS_TAB,IP_RW,60,IPS_OK);
 
     TrackState=SCOPE_PARKED;
@@ -111,5 +117,5 @@
     //  First we let our parent populate
     //IDLog("INDI::Telescope::ISGetProperties %s\n",dev);
-    DefaultDriver::ISGetProperties(dev);
+    DefaultDevice::ISGetProperties(dev);
 
     //  We may need the port set before we can connect
@@ -128,4 +134,5 @@
         defineSwitch(MovementWESP);
 		defineSwitch(ConfigSV);
+        defineNumber(ScopeParametersNP);
 
     }
@@ -136,4 +143,5 @@
 {
     defineText(PortTV);
+
     if(isConnected())
     {
@@ -146,8 +154,9 @@
         defineNumber(LocationNV);
         defineSwitch(ParkSV);
-
-    } else
-    {
-        //IDLog("INDI::Telescope deleting properties\n");
+        defineNumber(ScopeParametersNP);
+
+    }
+    else
+    {
         deleteProperty(CoordSV->name);
         deleteProperty(EqNV->name);
@@ -157,7 +166,8 @@
         deleteProperty(LocationNV->name);
         deleteProperty(ParkSV->name);
-
-        //initProperties();
-    }
+        deleteProperty(ScopeParametersNP->name);
+
+    }
+
 	defineSwitch(ConfigSV);
 
@@ -217,5 +227,5 @@
 {
     //  if we get here, our mount doesn't support sync
-    IDMessage(deviceName(),"Mount does not support Sync");
+    IDMessage(getDeviceName(),"Mount does not support Sync");
     return false;
 }
@@ -223,5 +233,5 @@
 bool INDI::Telescope::MoveNS(TelescopeMotionNS dir)
 {
-    IDMessage(deviceName(),"Mount does not support North/South motion");
+    IDMessage(getDeviceName(),"Mount does not support North/South motion");
     IUResetSwitch(MovementNSSP);
     MovementNSSP->s = IPS_IDLE;
@@ -232,5 +242,5 @@
 bool INDI::Telescope::MoveWE(TelescopeMotionWE dir)
 {
-    IDMessage(deviceName(),"Mount does not support West/East motion");
+    IDMessage(getDeviceName(),"Mount does not support West/East motion");
     IUResetSwitch(MovementWESP);
     MovementWESP->s = IPS_IDLE;
@@ -247,5 +257,5 @@
     //IDLog("INDI::Telescope got %d new text items name %s\n",n,name);
     //  first check if it's for our device
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         //  This is for our device
@@ -275,9 +285,9 @@
             //  We processed this one, so, tell the world we did it
             return true;
-        }
-
-    }
-
-    return DefaultDriver::ISNewText(dev,name,texts,names,n);
+        }    
+
+    }
+
+    return DefaultDevice::ISNewText(dev,name,texts,names,n);
 }
 
@@ -289,5 +299,5 @@
     //  first check if it's for our device
     //IDLog("INDI::Telescope::ISNewNumber %s\n",name);
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         if(strcmp(name,"EQUATORIAL_EOD_COORD_REQUEST")==0)
@@ -348,9 +358,20 @@
             IDSetNumber(LocationNV,NULL);
         }
-    }
-
-
-
-    return DefaultDriver::ISNewNumber(dev,name,values,names,n);
+
+        if(strcmp(name,"TELESCOPE_PARAMETERS")==0)
+        {
+            ScopeParametersNP->s = IPS_OK;
+
+            IUUpdateNumber(ScopeParametersNP,values,names,n);
+            IDSetNumber(ScopeParametersNP,NULL);
+
+            return true;
+        }
+
+    }
+
+
+
+    return DefaultDevice::ISNewNumber(dev,name,values,names,n);
 }
 
@@ -365,5 +386,5 @@
     //}
 
-    if(strcmp(dev,deviceName())==0)
+    if(strcmp(dev,getDeviceName())==0)
     {
         //  This one is for us
@@ -420,5 +441,5 @@
 
     //  Nobody has claimed this, so, ignore it
-    return DefaultDriver::ISNewSwitch(dev,name,states,names,n);
+    return DefaultDevice::ISNewSwitch(dev,name,states,names,n);
 }
 
@@ -466,5 +487,5 @@
         //if (isDebug())
             IDLog("Failed to connect o port %s. Error: %s", port, errorMsg);
-        IDMessage(deviceName(), "Failed to connect to port %s. Error: %s", port, errorMsg);
+        IDMessage(getDeviceName(), "Failed to connect to port %s. Error: %s", port, errorMsg);
 
         return false;
@@ -481,5 +502,5 @@
     {
         //  We got a valid scope status read
-        IDMessage(deviceName(),"Telescope is online.");
+        IDMessage(getDeviceName(),"Telescope is online.");
         return rc;
     }
@@ -488,5 +509,5 @@
     //  So, we need to close our handle and send error messages
     close(PortFD);
-    //IDMessage(deviceName(),"Didn't find a synscan mount on Serial Port");
+    //IDMessage(getDeviceName(),"Didn't find a synscan mount on Serial Port");
 
     return false;
@@ -502,5 +523,5 @@
 
     close(PortFD);
-    IDMessage(deviceName(),"Telescope is offline.");
+    IDMessage(getDeviceName(),"Telescope is offline.");
 
     return true;
Index: /BAORadio/libindi/libindi/libs/indibase/inditelescope.h
===================================================================
--- /BAORadio/libindi/libindi/libs/indibase/inditelescope.h	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indibase/inditelescope.h	(revision 697)
@@ -20,5 +20,5 @@
 #define INDI_TELESCOPE_H
 
-#include "defaultdriver.h"
+#include "defaultdevice.h"
 
 /**
@@ -42,5 +42,5 @@
 \see TelescopeSimulator and SynScan drivers for examples of implementations of INDI::Telescope.
 */
-class INDI::Telescope : public INDI::DefaultDriver
+class INDI::Telescope : public INDI::DefaultDevice
 {
     private:
@@ -173,4 +173,7 @@
         ISwitchVectorProperty *MovementWESP;
 
+        INumber ScopeParametersN[2];
+        INumberVectorProperty *ScopeParametersNP;
+
 
 };
Index: /BAORadio/libindi/libindi/libs/indicom.c
===================================================================
--- /BAORadio/libindi/libindi/libs/indicom.c	(revision 696)
+++ /BAORadio/libindi/libindi/libs/indicom.c	(revision 697)
@@ -1151,4 +1151,15 @@
 }
 
+/* Find index of the ON member of an ISwitchVectorProperty */
+int IUFindOnSwitchIndex(const ISwitchVectorProperty *svp)
+{
+        int i;
+
+        for (i = 0; i < svp->nsp; i++)
+            if (svp->sp[i].s == ISS_ON)
+                return i;
+        return -1;
+}
+
 /* Set all switches to off */
 void
Index: /BAORadio/libindi/libindi/libs/lilxml.c
===================================================================
--- /BAORadio/libindi/libindi/libs/lilxml.c	(revision 696)
+++ /BAORadio/libindi/libindi/libs/lilxml.c	(revision 697)
@@ -15,5 +15,5 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 #endif
Index: /BAORadio/libindi/libindi/libs/webcam/v4l2_base.cpp
===================================================================
--- /BAORadio/libindi/libindi/libs/webcam/v4l2_base.cpp	(revision 696)
+++ /BAORadio/libindi/libindi/libs/webcam/v4l2_base.cpp	(revision 697)
@@ -218,5 +218,5 @@
 
 		if (-1 == xioctl (fd, VIDIOC_QBUF, &buf))
-			return errno_exit ("VIDIOC_QBUF", errmsg);
+            return errno_exit ("ReadFrame IO_METHOD_MMAP: VIDIOC_QBUF", errmsg);
 
 		break;
@@ -253,5 +253,5 @@
 
 		if (-1 == xioctl (fd, VIDIOC_QBUF, &buf))
-			errno_exit ("VIDIOC_QBUF", errmsg);
+            errno_exit ("ReadFrame IO_METHOD_USERPTR: VIDIOC_QBUF", errmsg);
 
 		break;
@@ -303,5 +303,6 @@
 
 	case IO_METHOD_MMAP:
-		for (i = 0; i < n_buffers; ++i) {
+        for (i = 0; i < n_buffers; ++i)
+        {
             		struct v4l2_buffer buf;
 
@@ -313,8 +314,8 @@
 
         		if (-1 == xioctl (fd, VIDIOC_QBUF, &buf))
-                    		return errno_exit ("VIDIOC_QBUF", errmsg);
+                            return errno_exit ("StartCapturing IO_METHOD_MMAP: VIDIOC_QBUF", errmsg);
 
 		}
-		
+
 		type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 
@@ -340,5 +341,5 @@
 
         		if (-1 == xioctl (fd, VIDIOC_QBUF, &buf))
-                    		return errno_exit ("VIDIOC_QBUF", errmsg);
+                            return errno_exit ("StartCapturing IO_METHOD_USERPTR: VIDIOC_QBUF", errmsg);
 		}
 
