Changeset 697


Ignore:
Timestamp:
Oct 22, 2012, 4:20:40 PM (12 years ago)
Author:
frichard
Message:

-Passage de la version 0.9 à la version 0.9.5 de la biliothèque libindi
-correction d'un bug affectant la commande 'm'
-vérification des fuites de mémoire et débogage complet

Location:
BAORadio/libindi/libindi
Files:
67 edited

Legend:

Unmodified
Added
Removed
  • BAORadio/libindi/libindi/.directory

    r695 r697  
    11[Dolphin]
    2 Timestamp=2012,9,13,22,1,51
     2Timestamp=2012,10,21,16,15,23
     3Version=3
    34
    45[Settings]
    5 HiddenFilesShown=true
    66ShowDotFiles=false
  • BAORadio/libindi/libindi/.kdev4/libindi.kdev4

    r693 r697  
    33
    44[CMake]
    5 BuildDirs=/home/richard/libindi/libindi_build
     5Build Directory Count=3
    66CMakeDir=/usr/share/cmake-2.8/Modules
    7 Current CMake Binary=file:///usr/bin/cmake
    8 CurrentBuildDir=file:///home/richard/libindi/libindi_build
    9 CurrentBuildType=
    10 CurrentInstallDir=file:///usr
     7Current Build Directory Index=2
    118ProjectRootRelative=./
     9
     10[CMake][CMake Build Directory 0]
     11Build Directory Path=file:///home/richard/libindi/libindi_build
     12Build Type=Release
     13CMake Binary=file:///usr/bin/cmake
     14Install Directory=file:///usr/local
     15
     16[CMake][CMake Build Directory 1]
     17Build Directory Path=file:///home/richard/BAORadio/libindi/libindi/build
     18Build Type=Debug
     19CMake Binary=file:///usr/bin/cmake
     20Environment Profile=
     21Extra Arguments=
     22Install Directory=file:///usr/local
     23
     24[CMake][CMake Build Directory 2]
     25Build Directory Path=file:///home/richard/BAORadio/libindi/libindi/libindi_build
     26Build Type=
     27CMake Binary=file:///usr/bin/cmake
     28Environment Profile=
     29Extra Arguments=
     30Install Directory=file:///usr
     31
     32[Launch]
     33Launch Configurations=Launch Configuration 0
     34
     35[Launch][Launch Configuration 0]
     36Configured Launch Modes=execute
     37Configured Launchers=nativeAppLauncher
     38Name=Nouvelle configuration Application native
     39Type=Native Application
     40
     41[Launch][Launch Configuration 0][Data]
     42Arguments=/home/richard/BAORadio/libindi/libindi/libindi_build/indi_BAO
     43Debugger Shell=
     44Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00)
     45Dependency Action=Nothing
     46Display Demangle Names=true
     47Display Static Members=false
     48EnvironmentGroup=default
     49Executable=file:///home/richard/BAORadio/libindi/libindi/libindi_build/indiserver
     50External Terminal=konsole --noclose --workdir %workdir -e %exe
     51GDB Path=
     52Project Target=libindi,indi_BAO
     53Remote GDB Config Script=
     54Remote GDB Run Script=
     55Remote GDB Shell Script=
     56Start With=ApplicationOutput
     57Use External Terminal=false
     58Working Directory=file:///home/richard/BAORadio/libindi/libindi/libindi_build
     59isExecutable=true
     60
     61[MakeBuilder]
     62Install As Root=true
     63Su Command=2
    1264
    1365[Project]
  • BAORadio/libindi/libindi/BAOTest/BAOtest_main.cpp

    r695 r697  
    1818#include <netinet/in.h>
    1919
    20 //#define POSITIONS_DIRECT 
     20
     21// Faut-il simuler grossiÚrement le mouvement de l'antenne  qui ne va pas directement sur l'objet ?
     22
     23#define POSITIONS_DIRECTES false
     24
     25// Erreurs aléatoires ?
     26
     27#define ERREURS_ALEATOIRES false
     28
     29// Erreurs du type : le microcontrÃŽleur envoie une trame incomplÚte...
     30
     31#define ERREURS_TRAMES false
     32
     33// Affichage ?
     34
     35#define AFFICHAGE true
     36
     37// Au bout de combien de trames en moyenne arrive une erreur ?
     38
     39#define ERREURS 10
     40
    2141
    2242using namespace std;
     
    7797        result.y=atoi(str.substr(7, 4).c_str());
    7898
    79         if (str[1]=='f') result.x=-result.x;
     99        if (str[1]=='f') result.x=-result.x;
    80100
    81101        if (str[6]=='f') result.y=-result.y;
     
    128148***************************************************************************************/
    129149
    130 #define ERREURS 10
     150
    131151
    132152int main ( int argc, char *argv[] )
     
    135155    char cIP;
    136156    char IP[20];
    137     bool Aleat;
    138 
    139     // Parametres sups
    140     bool ErreursAleatoires=false;
    141     bool Affichage=true;
     157    bool Erreurs_Aleatoires;
     158    bool Erreurs_Trames;
     159
    142160
    143161    // Position PARK
    144     Pos.x=0;
    145     Pos.y=0;
    146 
    147     NouvPos.x=100;
    148     NouvPos.y=100;
     162   
     163    Pos.x     = 0;
     164    Pos.y     = 0;
     165
     166    NouvPos.x = 100;
     167    NouvPos.y = 100;
    149168
    150169    //init nbs aléatoires
    151     if (ErreursAleatoires) srand(time(NULL));
     170   
     171    if (ERREURS_ALEATOIRES) srand(time(NULL));
    152172
    153173
     
    159179    std::cout <<  "1)-  192.168.0.1\n";
    160180    std::cout <<  "2)-  127.0.0.1\n\n? ";
    161     std::cin >> cIP;
     181   
     182    std::cin  >>  cIP;
    162183
    163184    if (cIP=='1') strcpy(IP, "192.168.0.1");
     
    173194
    174195        std::string reply;
    175         std::string asks,memasks;
     196        std::string asks, memasks;
    176197        char chaine[5000];
    177198
     
    182203
    183204            int pos=asks.find("\n");
     205           
    184206            memasks=asks;
    185207
    186208            while ((pos!=string::npos) && (asks.length()>1))
    187209            {
    188                 memasks=asks.substr(pos+1);
    189                 asks=asks.substr(0,pos);
     210                memasks = asks.substr(pos+1);
     211                asks    = asks.substr(0,pos);
    190212
    191213                strcpy(chaine, "");
    192214
    193 #ifndef POSITIONS_DIRECT
    194                 if (abs(Pos.x - NouvPos.x) < 5 )
    195                 {
    196                     if (Pos.x - NouvPos.x < 0) Pos.x--;
    197                     if (Pos.x - NouvPos.x > 0) Pos.x++;
    198                 }
    199                 else
    200                 {
    201                     Pos.x -= (NouvPos.x - Pos.x) / 6.0;
    202                 }
    203 
    204                 if (abs(Pos.y - NouvPos.y) < 5 )
    205                 {
    206                     if (Pos.y - NouvPos.y < 0) Pos.y--;
    207                     if (Pos.y - NouvPos.y > 0) Pos.y++;
    208                 }
    209                 else
    210                 {
    211                     Pos.y -= (NouvPos.y - Pos.y) / 6.0;
    212                 }
    213 #endif
     215                if ( !POSITIONS_DIRECTES)
     216                {
     217                    if (abs(Pos.x - NouvPos.x) < 5 )
     218                    {
     219                        if (Pos.x - NouvPos.x < 0) Pos.x--;
     220                        if (Pos.x - NouvPos.x > 0) Pos.x++;
     221                    }
     222                    else
     223                    {
     224                        Pos.x -= (NouvPos.x - Pos.x) / 6.0;
     225                    }
     226
     227                    if (abs(Pos.y - NouvPos.y) < 5 )
     228                    {
     229                        if (Pos.y - NouvPos.y < 0) Pos.y--;
     230                        if (Pos.y - NouvPos.y > 0) Pos.y++;
     231                    }
     232                    else
     233                    {
     234                        Pos.y -= (NouvPos.y - Pos.y) / 6.0;
     235                    }
     236                }
     237
     238                Erreurs_Aleatoires = false;
     239
     240                if (ERREURS_ALEATOIRES) Erreurs_Aleatoires = rand()%ERREURS == 1;
     241               
     242                Erreurs_Trames = false;
     243
     244                if (ERREURS_TRAMES) Erreurs_Trames = rand()%ERREURS == 1;
    214245               
    215 
    216                 if (ErreursAleatoires) Aleat=rand()%ERREURS != 1;
    217                 else Aleat=1;
    218 
    219                 if (Affichage) std::cout <<  "Pilote BAO : " << asks << "\n" ;
     246                int position_erreur = 2 + rand() % 3;
     247               
     248               
     249                if (AFFICHAGE) std::cout <<  "Pilote BAO : " << asks << "\n" ;
    220250
    221251
     
    224254
    225255                    strcpy(chaine,"ACK/POSITION\n");
    226                     client_socket << chaine;
    227 
    228                     if (Affichage) std::cout <<  "Microcontrôleur : " << chaine;
    229 
    230                     if (Aleat)
     256                   
     257                    if (Erreurs_Trames) { strncpy(chaine, chaine, position_erreur ); chaine[position_erreur] = '\n'; chaine[position_erreur + 1] = 0; }
     258                   
     259                    client_socket << chaine;
     260
     261                    if (AFFICHAGE) std::cout <<  "Microcontrôleur : " << chaine;
     262
     263                    if (!Erreurs_Aleatoires)
    231264                    {
    232265                        sprintf(chaine, "POSITION/%05i/%05i/\n", Pos.x, Pos.y);
     
    240273                if (asks.find("G")!=string::npos)
    241274                {
    242 #ifndef POSITIONS_DIRECT
    243                  NouvPos = ExtractPosition2(asks);
     275                    if (!POSITIONS_DIRECTES)
     276                    {
     277                        NouvPos = ExtractPosition2(asks);
    244278
    245279                        NouvPos.x += Pos.x;
    246280                        NouvPos.y += Pos.y;
    247 #else
    248                
    249                Pos2 = ExtractPosition2(asks);
    250                Pos.x-=Pos2.x;
    251                Pos.y-=Pos2.y;
    252 #endif
     281                    }
     282                    else
     283                    {
     284
     285                        Pos2 = ExtractPosition2(asks);
     286                       
     287                        Pos.x -= Pos2.x;
     288                        Pos.y -= Pos2.y;
     289                    }
     290                   
    253291                    strcpy(chaine,"ACK/GOTO/\n");
    254                     client_socket << chaine;
    255 
    256                     if (Affichage)
     292                   
     293                    if (Erreurs_Trames) { strncpy(chaine, chaine, position_erreur ); chaine[position_erreur] = '\n'; chaine[position_erreur + 1] = 0; }
     294                   
     295                    client_socket << chaine;
     296
     297                    if (AFFICHAGE)
    257298                    {
    258299                        std::cout <<  "Microcontrôleur : " << chaine;
     
    261302                    }
    262303
    263                     if (Aleat)
     304                    if (!Erreurs_Aleatoires)
    264305                    {
    265306                        strcpy(chaine, "OK/GOTO/\n");
     
    273314                if (asks.find("Z")!=string::npos)
    274315                {
    275 
    276316                    strcpy(chaine, "ACK/PARK\n");
    277                     client_socket << chaine;
    278 
    279                     if (Affichage) std::cout <<  "Microcontrôleur : " << chaine;
    280 
    281                     if (Aleat)
     317                   
     318                    if (Erreurs_Trames) { strncpy(chaine, chaine, position_erreur ); chaine[position_erreur] = '\n'; chaine[position_erreur + 1] = 0; }
     319                   
     320                    client_socket << chaine;
     321
     322                    if (AFFICHAGE) std::cout <<  "Microcontrôleur : " << chaine;
     323
     324                    if (!Erreurs_Aleatoires)
    282325                    {
    283326                        strcpy(chaine, "OK/PARK/\n");
     
    293336
    294337                    strcpy(chaine,"ACK/ABORT\n");
    295                     client_socket << chaine;
    296 
    297                     if (Affichage) std::cout <<  "Microcontrôleur : " << chaine;
    298 
    299                     if (Aleat)
     338                   
     339                    if (Erreurs_Trames) { strncpy(chaine, chaine, position_erreur ); chaine[position_erreur] = '\n'; chaine[position_erreur + 1] = 0; }
     340                   
     341                    client_socket << chaine;
     342
     343                    if (AFFICHAGE) std::cout <<  "Microcontrôleur : " << chaine;
     344
     345                    if (!Erreurs_Aleatoires)
    300346                    {
    301347                        strcpy(chaine, "OK/ABORT/\n");
     
    307353                }
    308354
    309                 if (strlen(chaine)>1)
    310                 {
    311                     client_socket << chaine;
    312 
    313                     if (Affichage)
     355                if ( strlen(chaine) >1 )
     356                {
     357                    if (Erreurs_Trames) { strncpy(chaine, chaine, position_erreur ); chaine[position_erreur] = '\n'; chaine[position_erreur + 1] = 0; }
     358                 
     359                    client_socket << chaine;
     360
     361                    if (AFFICHAGE)
    314362                    {
    315363                        std::cout <<  "Microcontrôleur : " << chaine;
     
    319367                }
    320368
    321                 asks=memasks;
    322                 pos=asks.find("\n");
     369                asks = memasks;
     370               
     371                pos  = asks.find("\n");
    323372            }
    324373
  • BAORadio/libindi/libindi/BAOcontrol/BAOcontrol.pro

    r695 r697  
    11######################################################################
    2 # Automatically generated by qmake (2.01a) Thu Sep 27 14:47:45 2012
     2# Automatically generated by qmake (2.01a) lun. oct. 22 16:02:51 2012
    33######################################################################
    44
  • BAORadio/libindi/libindi/BAOcontrol/Makefile

    r695 r697  
    11#############################################################################
    22# Makefile for building: BAOcontrol
    3 # Generated by qmake (2.01a) (Qt 4.8.1) on: Thu Sep 27 14:47:45 2012
     3# Generated by qmake (2.01a) (Qt 4.8.3) on: lun. oct. 22 16:02:51 2012
    44# Project:  BAOcontrol.pro
    55# Template: app
  • BAORadio/libindi/libindi/BAOcontrol/baocontrol.cpp

    r695 r697  
    177177    a=15.0*(18.0+36.0/60.0+56.3/3600.0)*Pidiv180;
    178178    b=(38.0+47.0/60.0+3.1/3600.0)*Pidiv180;
    179    
     179
    180180    a= 3.61082;
    181181    b=0.860677;
     
    192192    a22=5.55106;
    193193    b22=0.699053;
    194    
     194
    195195    a=4.87356;
    196196    b=0.676912;
     
    198198    b22=0.579795;
    199199
    200    
     200
    201201    a=3.73351;
    202202    b=0.334748;
    203203    a22=3.61661;
    204204    b22=0.241758;
    205    
     205
    206206
    207207    //a=15.0*(18.0+37.0/60.0+22.0/3600.0)*Pidiv180;
     
    259259    AfficherLog(os.str(), true);
    260260    */
    261    
     261
    262262
    263263
     
    609609{
    610610    stringstream os;
    611     struct timeval tv;
    612 
    613     // Tant que l'utilisateur n'a pas tapé la commande 'exit'
    614 
    615 
    616     {
    617         // On actualise le jour julien et le temps sidéral local
    618 
    619         UpdateTime();
    620 
    621         // On récupÚre le jour julien
    622 
    623         double JJ = GetJJ();
    624 
    625 
    626         // Faut-il exécuter un fichier de mouvements ?
    627 
    628         if (run && numobjets > 1 && runnum < numobjets)
    629         {
    630             // On lance le mouvement numéro runnum si la date et l'heure correspondent au début
    631             // de son exécution et que ce mouvement n'a pas été encore réalisé
    632 
    633             if ( JJ >= objets[runnum].JJ && !objets[runnum].exec )
    634             {
    635                 // petit message pour l'utilisateur au début de l'exécution du tout premier mouvement
    636 
    637                 if ( runnum == 1 ) AfficherLog("Début de l'exécution du fichier de mouvements\n\n", true);
    638 
    639                 os << "Suivi de l'objet n°" << runnum << endl;
    640 
    641                 AfficherLog(&os, true);
    642 
    643                 // on note que le mouvement est en cours d'exécution
    644                 // ou qu'il a été déjà exécuté
    645 
    646                 objets[runnum].exec = true;
    647 
    648                 // on pointe l'objet correspondant
    649 
    650                 Goto( objets[runnum].ad, objets[runnum].de, Transit, J2000 );
    651             }
    652 
    653 
    654             // On arrive à la fin de l'exécution du mouvements runnum
    655 
    656             if (JJ >= objets[runnum].JJ + objets[runnum].Duree / 3600.0 / 24.0 )
    657             {
    658                 // On interrompt le mouvement
    659 
    660                 Abort();
    661 
    662                 // S'il s'agit du dernier mouvement -> Fin de la commande run
    663 
    664                 if ( runnum + 1 >= numobjets )
    665                 {
    666                     AfficherLog("Fin de l'execution du fichier de mouvements\n\n", true);
    667 
    668                     // on réaffiche le prompt
    669 
    670                     cout << endl;
    671                     ChoixCouleurs==1 ? cout << blue1 : cout << blue2;
    672                     cout << ">";
    673 
    674                     // on réinitialise toutes les variables impliquées dans la commande run
    675 
    676                     run         = false;
    677                     runnum      = 1;
    678                     numobjets   = 1;
    679 
    680                     // On sort du programme dans le cas de BAOControl -r fileName
    681 
    682                     NoExit = !exitrun;
    683                 }
    684                 else
    685                 {
    686                     // on passe au mouvement suivant
    687 
    688                     runnum++;
    689                 }
    690             }
    691         }
    692 
    693         // on lit et affiche la réponse des micro-contrÃŽleurs
    694 
    695         LireReponse();
    696 
    697         // pause de 100 ms
    698 
    699         // usleep(100000);
    700     }
    701 
     611   // struct timeval tv;
     612
     613
     614    // On actualise le jour julien et le temps sidéral local
     615
     616    UpdateTime();
     617
     618    // On récupÚre le jour julien
     619
     620    double JJ = GetJJ();
     621
     622    // Faut-il exécuter un fichier de mouvements ?
     623
     624    if (run && numobjets > 1 && runnum < numobjets)
     625    {
     626        // On lance le mouvement numéro runnum si la date et l'heure correspondent au début
     627        // de son exécution et que ce mouvement n'a pas été encore réalisé
     628
     629        if ( JJ >= objets[runnum].JJ && !objets[runnum].exec )
     630        {
     631            // petit message pour l'utilisateur au début de l'exécution du tout premier mouvement
     632
     633            if ( runnum == 1 ) AfficherLog("Début de l'exécution du fichier de mouvements\n\n", true);
     634
     635            os << "Suivi de l'objet n°" << runnum << endl;
     636
     637            AfficherLog(&os, true);
     638
     639            // on note que le mouvement est en cours d'exécution
     640            // ou qu'il a été déjà exécuté
     641
     642            objets[runnum].exec = true;
     643
     644            // on pointe l'objet correspondant
     645
     646            Goto( objets[runnum].ad, objets[runnum].de, Transit, J2000 );
     647        }
     648
     649
     650        // On arrive à la fin de l'exécution du mouvements runnum
     651
     652        if (JJ >= objets[runnum].JJ + objets[runnum].Duree / 3600.0 / 24.0 )
     653        {
     654            // On interrompt le mouvement
     655
     656            Abort();
     657
     658            // S'il s'agit du dernier mouvement -> Fin de la commande run
     659
     660            if ( runnum + 1 >= numobjets )
     661            {
     662                AfficherLog("Fin de l'execution du fichier de mouvements\n\n", true);
     663
     664                // on réaffiche le prompt
     665
     666                cout << endl;
     667                ChoixCouleurs==1 ? cout << blue1 : cout << blue2;
     668                cout << ">";
     669
     670                // on réinitialise toutes les variables impliquées dans la commande run
     671
     672                run             = false;
     673                runnum  = 1;
     674                numobjets       = 1;
     675
     676                // On sort du programme dans le cas de BAOControl -r fileName
     677
     678                NoExit = !exitrun;
     679            }
     680            else
     681            {
     682                // on passe au mouvement suivant
     683
     684                runnum++;
     685            }
     686        }
     687    }
     688
     689    // on lit et affiche la réponse des micro-contrÃŽleurs
     690
     691    LireReponse();
     692
     693    // pause de 100 ms
     694
     695    // usleep(100000);
    702696
    703697}
     
    10491043            return true;
    10501044        }
    1051        
     1045
    10521046        if (commande == "R")
    10531047        {
     
    17041698            // et donc la magnitude < MAGNITUDEMAXETOILESCALIBRATION
    17051699
    1706             if ( Etoiles[i].selectionnee = ((Etoiles[i].ha > (HAUTMIN + 5.0 ) * Pidiv180) && (Etoiles[i].mag < MAGNITUDEMAXETOILESCALIBRATION)) )
     1700            Etoiles[i].selectionnee = ((Etoiles[i].ha > (HAUTMIN + 5.0 ) * Pidiv180) && (Etoiles[i].mag < MAGNITUDEMAXETOILESCALIBRATION));
     1701
     1702            if ( Etoiles[i].selectionnee )
    17071703            {
    17081704                os.width(20);
     
    18211817        // L'utilisateur a fait suivre la commande goto de l'indication J2000
    18221818
    1823         if (J2000 = (chaine.find("j2000") != string::npos))
     1819        J2000 = (chaine.find("j2000") != string::npos);
     1820
     1821        if ( J2000 )
    18241822        {
    18251823            AfficherLog("Prise en compte de la précession, de la nutation et de l'aberration...\n", true);
     
    21752173            if (!EnvoyerCommande((string)commande, &Message))
    21762174            {
    2177                 ErreurLog("Erreur ! La commande n'a pas un format correct !\n\n");
     2175                ErreurLog("Erreur ! La commande ne semble pas avoir été executée par l'antenne ou n'a pas un format correct !\n\n");
    21782176            }
    21792177            else
  • BAORadio/libindi/libindi/BAOcontrol/baoqt.cpp

    r695 r697  
    112112#endif
    113113
     114#ifdef LAL
     115    ui->lineEditIP->setText("134.158.88.199");
     116#else
    114117    ui->lineEditIP->setText("127.0.0.1");
    115     //ui->lineEditIP->setText("134.158.88.199");
     118#endif
    116119
    117120    ui->lineEdit_2->setText((QString("BAORadio, LAL, version ").append(VERSION)).toStdString().c_str());
     
    135138    timer->start(100);
    136139}
     140
    137141
    138142BAOqt::~BAOqt()
  • BAORadio/libindi/libindi/CMakeLists.txt

    r642 r697  
    66set(CMAKE_INDI_VERSION_MAJOR 0)
    77set(CMAKE_INDI_VERSION_MINOR 9)
    8 set(CMAKE_INDI_VERSION_RELEASE 0)
     8set(CMAKE_INDI_VERSION_RELEASE 5)
    99set(CMAKE_INDI_VERSION_STRING "${CMAKE_INDI_VERSION_MAJOR}.${CMAKE_INDI_VERSION_MINOR}.${CMAKE_INDI_VERSION_RELEASE}")
    1010
     
    8989
    9090set (indiclient_SRCS
    91         ${CMAKE_SOURCE_DIR}/libs/indibase/basedriver.cpp
     91        ${CMAKE_SOURCE_DIR}/libs/indibase/basedevice.cpp
    9292        ${CMAKE_SOURCE_DIR}/libs/indibase/baseclient.cpp
     93        ${CMAKE_SOURCE_DIR}/libs/indibase/indiproperty.cpp
    9394    )
    9495
    9596set (indidriver_SRCS
    96         ${CMAKE_SOURCE_DIR}/libs/indibase/basedriver.cpp
    97         ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdriver.cpp
     97        ${CMAKE_SOURCE_DIR}/libs/indibase/basedevice.cpp
     98        ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdevice.cpp
     99        ${CMAKE_SOURCE_DIR}/libs/indibase/indiproperty.cpp
    98100        ${CMAKE_SOURCE_DIR}/libs/indibase/indiccd.cpp
    99101        ${CMAKE_SOURCE_DIR}/libs/indibase/inditelescope.cpp
     
    104106        ${CMAKE_SOURCE_DIR}/libs/indibase/indifilterinterface.cpp
    105107
     108
     109
    106110    )
    107111
     
    165169########## TELESCOPE GROUP ##########
    166170#####################################
    167 
    168 ########### LX200 Basic #############
    169 set(lx200basic_SRCS
    170    ${indimain_SRCS}
    171    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    172    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200basic.cpp )
    173 
    174 add_executable(indi_lx200basic ${lx200basic_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    175 
    176 if (NOVA_FOUND)
    177   target_link_libraries(indi_lx200basic ${NOVA_LIBRARIES})
    178 endif (NOVA_FOUND)
    179 
    180 install(TARGETS indi_lx200basic RUNTIME DESTINATION bin )
    181 
    182 #################################################################################
    183 
    184 ########### LX200 Generic ###########
    185 set(lx200generic_SRCS
    186    ${indimain_SRCS}
    187    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    188    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200autostar.cpp
    189    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200_16.cpp
    190    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200gps.cpp
    191    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200generic.cpp
    192    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200classic.cpp
    193    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200apdriver.c
    194    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200ap.cpp
    195    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200fs2.cpp)
    196 
    197 add_executable(indi_lx200generic ${lx200generic_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
    198 
    199 target_link_libraries(indi_lx200generic  m )
    200 
    201 if (NOVA_FOUND)
    202   target_link_libraries(indi_lx200generic ${NOVA_LIBRARIES})
    203 endif (NOVA_FOUND)
    204 
    205 install(TARGETS indi_lx200generic RUNTIME DESTINATION bin )
    206 
    207 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_lx200generic_symlink.cmake
    208 "exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200classic)\n
    209 exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200autostar)\n
    210 exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200_16)\n
    211 exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200gps)\n
    212 exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200ap)\n
    213 exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200fs2)\n
    214 ")
    215 set_target_properties(indi_lx200generic PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/make_lx200generic_symlink.cmake)
    216 #################################################################################
    217 
    218 ########### Celestron GPS ############
    219 set(celestrongps_SRCS
    220    ${indimain_SRCS}
    221    ${CMAKE_SOURCE_DIR}/drivers/telescope/celestronprotocol.c
    222    ${CMAKE_SOURCE_DIR}/drivers/telescope/celestrongps.cpp )
    223 
    224 add_executable(indi_celestron_gps ${celestrongps_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    225 
    226 target_link_libraries(indi_celestron_gps m )
    227 
    228 
    229 if (NOVA_FOUND)
    230   target_link_libraries(indi_celestron_gps ${NOVA_LIBRARIES})
    231 endif (NOVA_FOUND)
    232 
    233 install(TARGETS indi_celestron_gps RUNTIME DESTINATION bin )
    234 
    235 #################################################################################
    236 
    237 ########### Orion Atlas #############
    238 set(orionatlas_SRCS
    239    ${indimain_SRCS}
    240    ${CMAKE_SOURCE_DIR}/drivers/telescope/orionatlas.cpp )
    241 
    242 add_executable(indi_orion_atlas ${orionatlas_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
    243 
    244 #target_link_libraries(indi_orion_atlas ${KDE4_KDECORE_LIBS})
    245 
    246 if (NOVA_FOUND)
    247   target_link_libraries(indi_orion_atlas ${NOVA_LIBRARIES})
    248 endif (NOVA_FOUND)
    249 
    250 install(TARGETS indi_orion_atlas RUNTIME DESTINATION bin )
    251 
    252 #################################################################################
    253 
    254 ########### Takahashi Temma ##########
    255 if (NOVA_FOUND)
    256 
    257 set(temma_SRCS
    258    ${indimain_SRCS}
    259    ${CMAKE_SOURCE_DIR}/drivers/telescope/temmadriver.c )
    260 
    261 add_executable(indi_temma ${temma_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
    262 
    263 target_link_libraries(indi_temma  ${NOVA_LIBRARIES} m )
    264 
    265 install(TARGETS indi_temma RUNTIME DESTINATION bin )
    266 
    267 endif (NOVA_FOUND)
    268 #################################################################################
    269 
    270 ########### Sky Commander #############
    271 set(skycommander_SRCS
    272    ${indimain_SRCS}
    273    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    274    ${CMAKE_SOURCE_DIR}/drivers/telescope/skycommander.c )
    275 
    276 add_executable(indi_skycommander ${skycommander_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
    277 
    278 target_link_libraries(indi_skycommander  m )
    279 
    280 if (NOVA_FOUND)
    281   target_link_libraries(indi_skycommander ${NOVA_LIBRARIES})
    282 endif (NOVA_FOUND)
    283 
    284 install(TARGETS indi_skycommander  RUNTIME DESTINATION bin )
    285 
    286 #################################################################################
    287 
    288 ########### Intelliscope ###############
    289 set(intelliscope_SRCS
    290    ${indimain_SRCS}
    291    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    292    ${CMAKE_SOURCE_DIR}/drivers/telescope/intelliscope.c )
    293 
    294 add_executable(indi_intelliscope ${intelliscope_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    295 
    296 target_link_libraries(indi_intelliscope  m )
    297 
    298 if (NOVA_FOUND)
    299   target_link_libraries(indi_intelliscope ${NOVA_LIBRARIES})
    300 endif (NOVA_FOUND)
    301 
    302 install(TARGETS indi_intelliscope RUNTIME DESTINATION bin )
    303171
    304172########### BAO ###############
     
    325193
    326194install(TARGETS indi_BAO RUNTIME DESTINATION bin )
    327 ########### Syncscan ###############
    328 set(synscan_SRCS
    329    ${indimain_SRCS}
    330    ${CMAKE_SOURCE_DIR}/drivers/telescope/synscanmount.cpp )
    331 
    332 add_executable(indi_synscan ${synscan_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    333 
    334 target_link_libraries(indi_synscan indidriver m z)
    335 
    336 if (NOVA_FOUND)
    337   target_link_libraries(indi_synscan ${NOVA_LIBRARIES})
    338 endif (NOVA_FOUND)
    339 
    340 install(TARGETS indi_synscan RUNTIME DESTINATION bin )
    341 
    342 ########### Magellan I #############
    343 set(magellan_SRCS
    344    ${indimain_SRCS}
    345    ${CMAKE_SOURCE_DIR}/drivers/telescope/magellandriver.c
    346    ${CMAKE_SOURCE_DIR}/drivers/telescope/magellan1.cpp )
    347 
    348 add_executable(indi_magellan1 ${magellan_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    349 
    350 if (NOVA_FOUND)
    351   target_link_libraries(indi_magellan1 ${NOVA_LIBRARIES})
    352 endif (NOVA_FOUND)
    353 
    354 install(TARGETS indi_magellan1 RUNTIME DESTINATION bin )
    355 
    356 ########### IEQ45 #############
    357 set(ieq45_SRCS
    358    ${indimain_SRCS}
    359    ${CMAKE_SOURCE_DIR}/drivers/telescope/ieq45driver.c
    360    ${CMAKE_SOURCE_DIR}/drivers/telescope/ieq45.cpp )
    361 
    362 add_executable(indi_ieq45 ${ieq45_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    363 
    364 if (NOVA_FOUND)
    365   target_link_libraries(indi_ieq45 ${NOVA_LIBRARIES})
    366 endif (NOVA_FOUND)
    367 
    368 install(TARGETS indi_ieq45 RUNTIME DESTINATION bin )
    369 
    370 ########### Telescope Simulator ##############
    371 set(telescopesimulator_SRCS
    372         ${indimain_SRCS}
    373         ${CMAKE_SOURCE_DIR}/drivers/telescope/telescope_simulator.cpp
    374    )
    375 
    376 add_executable(indi_simulator_telescope ${telescopesimulator_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    377 
    378 target_link_libraries(indi_simulator_telescope indidriver ${CFITSIO_LIBRARIES} m z pthread)
    379 
    380 if (NOVA_FOUND)
    381   target_link_libraries(indi_simulator_telescope ${NOVA_LIBRARIES})
    382 endif (NOVA_FOUND)
    383 
    384 install(TARGETS indi_simulator_telescope RUNTIME DESTINATION bin )
    385 
    386 ########### CCD Simulator ##############
    387 if (CFITSIO_FOUND)
    388 
    389 set(ccdsimulator_SRCS
    390         ${indimain_SRCS}
    391         ${CMAKE_SOURCE_DIR}/drivers/ccd/ccd_simulator.cpp
    392    )
    393 
    394 add_executable(indi_simulator_ccd ${ccdsimulator_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    395 
    396 target_link_libraries(indi_simulator_ccd indidriver ${CFITSIO_LIBRARIES} m z pthread)
    397 
    398 if (NOVA_FOUND)
    399   target_link_libraries(indi_simulator_ccd ${NOVA_LIBRARIES})
    400 endif (NOVA_FOUND)
    401 
    402 install(TARGETS indi_simulator_ccd RUNTIME DESTINATION bin )
    403 
    404 endif (CFITSIO_FOUND)
    405 
    406 
    407 #####################################
    408 ########## FOCUSER GROUP ############
    409 #####################################
    410 
    411 #################################################################################
    412 
    413 ################ Robo Focuser ################
    414 
    415 set(robofocus_SRCS
    416         ${indimain_SRCS}
    417         ${CMAKE_SOURCE_DIR}/drivers/focuser/robofocus.cpp
    418    )
    419 
    420 add_executable(indi_robo_focus ${robofocus_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    421 
    422 target_link_libraries(indi_robo_focus indidriver m z)
    423 
    424 if (NOVA_FOUND)
    425   target_link_libraries(indi_robo_focus ${NOVA_LIBRARIES})
    426 endif (NOVA_FOUND)
    427 
    428 install(TARGETS indi_robo_focus RUNTIME DESTINATION bin )
    429 
    430 ################ Optec TCF-S ################
    431 
    432 set(tcfs_SRCS
    433         ${indimain_SRCS}
    434         ${CMAKE_SOURCE_DIR}/drivers/focuser/tcfs.cpp
    435    )
    436 
    437 add_executable(indi_tcfs_focus ${tcfs_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    438 
    439 target_link_libraries(indi_tcfs_focus indidriver m z)
    440 
    441 if (NOVA_FOUND)
    442   target_link_libraries(indi_tcfs_focus ${NOVA_LIBRARIES})
    443 endif (NOVA_FOUND)
    444 
    445 install(TARGETS indi_tcfs_focus RUNTIME DESTINATION bin )
    446 
    447 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_tcfs_symlink.cmake
    448 "exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_tcfs_focus \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_tcfs3_focus)\n")
    449 set_target_properties(indi_tcfs_focus PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/make_tcfs_symlink.cmake)
    450 
    451 #################################################################################
    452 
    453 #####################################
    454 ######## FILTER WHEEL GROUP #########
    455 #####################################
    456 
    457 ########## True Technology Wheel ############
    458 set(trutechwheel_SRCS
    459         ${indimain_SRCS}
    460         ${CMAKE_SOURCE_DIR}/drivers/filter_wheel/trutech_wheel.c
    461    )
    462 
    463 add_executable(indi_trutech_wheel ${trutechwheel_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
    464 
    465 target_link_libraries(indi_trutech_wheel  m)
    466 
    467 if (NOVA_FOUND)
    468   target_link_libraries(indi_trutech_wheel ${NOVA_LIBRARIES})
    469 endif (NOVA_FOUND)
    470 
    471 install(TARGETS indi_trutech_wheel RUNTIME DESTINATION bin )
    472 
    473 ########### Filter Simulator ##############
    474 set(filtersimulator_SRCS
    475         ${indimain_SRCS}
    476         ${CMAKE_SOURCE_DIR}/drivers/filter_wheel/filter_simulator.cpp
    477    )
    478 
    479 add_executable(indi_simulator_wheel ${filtersimulator_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    480 
    481 target_link_libraries(indi_simulator_wheel indidriver ${CFITSIO_LIBRARIES} m z pthread)
    482 
    483 if (NOVA_FOUND)
    484   target_link_libraries(indi_simulator_wheel ${NOVA_LIBRARIES})
    485 endif (NOVA_FOUND)
    486 
    487 install(TARGETS indi_simulator_wheel RUNTIME DESTINATION bin )
    488 
    489 #################################################################################
    490 
    491 #########################################
    492 ########### VIDEO GROUP   ###############
    493 #########################################
    494 
    495 ########### STV #######################
    496 if (CFITSIO_FOUND)
    497 if (NOVA_FOUND)
    498 
    499 set(stv_SRCS
    500    ${indimain_SRCS}
    501    ${CMAKE_SOURCE_DIR}/drivers/video/stvdriver.c
    502    ${CMAKE_SOURCE_DIR}/drivers/video/stv.c )
    503 
    504 add_executable(indi_sbig_stv ${stv_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    505 
    506 target_link_libraries(indi_sbig_stv z m ${NOVA_LIBRARIES} ${CFITSIO_LIBRARIES})
    507 
    508 install(TARGETS indi_sbig_stv RUNTIME DESTINATION bin )
    509 
    510 endif (NOVA_FOUND)
    511 endif(CFITSIO_FOUND)
    512 
    513 #################################################################################
    514 
    515 ### Meade Lunar Planetary Imager ########
    516 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    517 if (CFITSIO_FOUND)
    518 
    519 ADD_DEFINITIONS(-DHAVE_LINUX_VIDEODEV2_H)
    520 
    521 set(meade_lpi_SRCS
    522         ${indimain_SRCS}
    523         ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
    524         ${CMAKE_SOURCE_DIR}/drivers/video/indi_lpi.cpp
    525    )
    526 
    527 add_executable(indi_meade_lpi ${meade_lpi_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    528 
    529 target_link_libraries(indi_meade_lpi z ${CFITSIO_LIBRARIES})
    530 
    531 if (NOVA_FOUND)
    532   target_link_libraries(indi_meade_lpi ${NOVA_LIBRARIES})
    533 endif (NOVA_FOUND)
    534 
    535 install(TARGETS indi_meade_lpi RUNTIME DESTINATION bin )
    536 
    537 endif (CFITSIO_FOUND)
    538 endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    539 
    540 #################################################################################
    541 
    542 ########### V4L Philips ##############
    543 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    544 if (CFITSIO_FOUND)
    545 
    546 set(v4lphilips_SRCS
    547         ${indimain_SRCS}
    548         ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
    549         ${CMAKE_SOURCE_DIR}/drivers/video/v4lphilips.cpp
    550         ${CMAKE_SOURCE_DIR}/drivers/video/indi_philips.cpp
    551 )
    552 
    553 add_executable(indi_v4l_philips ${v4lphilips_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    554 
    555 target_link_libraries(indi_v4l_philips m z ${CFITSIO_LIBRARIES})
    556 
    557 if (NOVA_FOUND)
    558   target_link_libraries(indi_v4l_philips ${NOVA_LIBRARIES})
    559 endif (NOVA_FOUND)
    560 
    561 install(TARGETS indi_v4l_philips RUNTIME DESTINATION bin )
    562 
    563 endif (CFITSIO_FOUND)
    564 endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    565 
    566 #################################################################################
    567 
    568 ########### Generic V4L Driver ###############
    569 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    570 if (CFITSIO_FOUND)
    571 
    572 set(v4ldriver_SRCS
    573         ${indimain_SRCS}
    574         ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
    575         ${CMAKE_SOURCE_DIR}/drivers/video/indi_v4l.cpp
    576    )
    577 
    578 add_executable(indi_v4l_generic ${v4ldriver_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    579 
    580 target_link_libraries(indi_v4l_generic m z ${CFITSIO_LIBRARIES})
    581 
    582 if (NOVA_FOUND)
    583   target_link_libraries(indi_v4l_generic ${NOVA_LIBRARIES})
    584 endif (NOVA_FOUND)
    585 
    586 install(TARGETS indi_v4l_generic RUNTIME DESTINATION bin )
    587 
    588 endif (CFITSIO_FOUND)
    589 endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    590195
    591196#################################################################################
     
    647252install(TARGETS indi_eval RUNTIME DESTINATION bin )
    648253
    649 #################################################################################
    650 ## Build Examples. Not installation
    651 ########### Tutorial one ##############
    652 set(tutorialone_SRCS
    653         ${indimain_SRCS}
    654         ${CMAKE_SOURCE_DIR}/examples/tutorial_one.c
    655    )
    656 
    657 add_executable(tutorial_one ${tutorialone_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
    658 
    659 target_link_libraries(tutorial_one  m)
    660 
    661 if (NOVA_FOUND)
    662   target_link_libraries(tutorial_one ${NOVA_LIBRARIES})
    663 endif (NOVA_FOUND)
    664 
    665 ########### Tutorial two ##############
    666 set(tutorialtwo_SRCS
    667         ${indimain_SRCS}
    668         ${CMAKE_SOURCE_DIR}/examples/tutorial_two.c
    669    )
    670 
    671 add_executable(tutorial_two ${tutorialtwo_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
    672 
    673 target_link_libraries(tutorial_two  m)
    674 
    675 if (NOVA_FOUND)
    676   target_link_libraries(tutorial_two ${NOVA_LIBRARIES})
    677 endif (NOVA_FOUND)
    678 
    679 ########### Tutorial three ##############
    680 set(tutorialthree_SRCS
    681         ${indimain_SRCS}
    682         ${CMAKE_SOURCE_DIR}/examples/tutorial_three.c
    683    )
    684 
    685 add_executable(tutorial_three ${tutorialthree_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
    686 
    687 target_link_libraries(tutorial_three m z)
    688 
    689 if (NOVA_FOUND)
    690   target_link_libraries(tutorial_three ${NOVA_LIBRARIES})
    691 endif (NOVA_FOUND)
    692 
    693 ########### Tutorial four ##############
    694 if (CFITSIO_FOUND)
    695 
    696 set(tutorialfour_SRCS
    697         ${indimain_SRCS}
    698         ${CMAKE_SOURCE_DIR}/examples/tutorial_four.cpp
    699    )
    700 
    701 add_executable(tutorial_four ${tutorialfour_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    702 
    703 target_link_libraries(tutorial_four indidriver ${CFITSIO_LIBRARIES} m z pthread)
    704 
    705 if (NOVA_FOUND)
    706   target_link_libraries(tutorial_four ${NOVA_LIBRARIES})
    707 endif (NOVA_FOUND)
    708 
    709 endif (CFITSIO_FOUND)
    710 
    711 ########### Tutorial dome ##############
    712 set(tutorialdome_SRCS
    713         ${indimain_SRCS}
    714         ${CMAKE_SOURCE_DIR}/examples/tutorial_dome.c
    715    )
    716 
    717 add_executable(tutorial_dome ${tutorialdome_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
    718 
    719 target_link_libraries(tutorial_dome  m)
    720 
    721 if (NOVA_FOUND)
    722   target_link_libraries(tutorial_dome ${NOVA_LIBRARIES})
    723 endif (NOVA_FOUND)
    724 
    725 ########### Tutorial rain ##############
    726 set(tutorialrain_SRCS
    727         ${indimain_SRCS}
    728         ${CMAKE_SOURCE_DIR}/examples/tutorial_rain.c
    729    )
    730 
    731 add_executable(tutorial_rain ${tutorialrain_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
    732 
    733 target_link_libraries(tutorial_rain  m)
    734 
    735 if (NOVA_FOUND)
    736   target_link_libraries(tutorial_rain ${NOVA_LIBRARIES})
    737 endif (NOVA_FOUND)
    738 
    739 
    740 ########### Client Tutorial ##############
    741 set(tutorialclient_SRCS
    742         ${CMAKE_SOURCE_DIR}/examples/tutorial_client.cpp
    743    )
    744 
    745 add_executable(tutorial_client ${tutorialclient_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
    746 
    747 target_link_libraries(tutorial_client indiclient m)
    748 
    749 if (NOVA_FOUND)
    750   target_link_libraries(tutorial_client ${NOVA_LIBRARIES})
    751 endif (NOVA_FOUND)
     254
    752255
    753256#################################################################################
     
    756259
    757260install( FILES indiapi.h indidevapi.h base64.h eventloop.h indidriver.h ${CMAKE_SOURCE_DIR}/libs/lilxml.h ${CMAKE_SOURCE_DIR}/libs/indibase/indibase.h
    758 ${CMAKE_SOURCE_DIR}/libs/indibase/basedriver.h  ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdriver.h
     261${CMAKE_SOURCE_DIR}/libs/indibase/basedevice.h  ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdevice.h
    759262${CMAKE_SOURCE_DIR}/libs/indibase/indiccd.h  ${CMAKE_SOURCE_DIR}/libs/indibase/indifilterwheel.h
    760263${CMAKE_SOURCE_DIR}/libs/indibase/indifocuser.h  ${CMAKE_SOURCE_DIR}/libs/indibase/inditelescope.h
    761264${CMAKE_SOURCE_DIR}/libs/indibase/baseclient.h ${CMAKE_SOURCE_DIR}/libs/indibase/indiguiderinterface.h
    762 ${CMAKE_SOURCE_DIR}/libs/indibase/indifilterinterface.h
     265${CMAKE_SOURCE_DIR}/libs/indibase/indifilterinterface.h ${CMAKE_SOURCE_DIR}/libs/indibase/indiproperty.h
    763266${CMAKE_SOURCE_DIR}/libs/indicom.h ${CMAKE_SOURCE_DIR}/libs/indibase/indiusbdevice.h
    764267 DESTINATION ${INCLUDE_INSTALL_DIR}/libindi COMPONENT Devel)
  • BAORadio/libindi/libindi/ChangeLog

    r642 r697  
     1From 0.9 to 0.95
     2
     3      # Focuser simulator driver.
     4      # CCD, Telescope, Focuser, and Filter simulators improvements including periodic error effects, FWHM, and more.
     5      # Major improvements to INDI Base Library and INDI Client Library.
     6      # Fixed minor bugs in LX200 Generic, LX200 FS2, Magellan, and Celestron drivers.
     7      # Minor bugfixes and improvements.
     8     
    19From 0.8 to 0.9
    210
  • BAORadio/libindi/libindi/Changelog-BAORadio

    r692 r697  
     1Version 0.6.4
     2#Nouvelles fonctions / modifications
     3-Utilisation de la version 0.9.5 dela bibliothÚque libindi
     4#Corrections bugs
     5-Correction de l'erreur concernant la commande 'm'
     6
     7
    18Version 0.6.1
    29#Nouvelles fonctions / modifications
  • BAORadio/libindi/libindi/Makefile

    r693 r697  
    11#############################################################################
    22# Makefile for building: libindi
    3 # Generated by qmake (2.01a) (Qt 4.7.4) on: mar. juil. 10 03:01:50 2012
     3# Generated by qmake (2.01a) (Qt 4.8.3) on: lun. oct. 22 02:49:51 2012
    44# Project:  libindi.pro
    55# Template: app
    6 # Command: /usr/bin/qmake -o Makefile libindi.pro
     6# Command: /usr/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile libindi.pro
    77#############################################################################
    88
     
    1111CC            = gcc
    1212CXX           = g++
    13 DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
    14 CFLAGS        = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
    15 CXXFLAGS      = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
    16 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.
     13DEFINES       = -DQT_WEBKIT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
     14CFLAGS        = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
     15CXXFLAGS      = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
     16INCPATH       = -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.
    1717LINK          = g++
    18 LFLAGS        = -m64 -Wl,-O1
    19 LIBS          = $(SUBLIBS)  -L/usr/lib64 -lQtGui -L/usr/lib64 -L/usr/X11R6/lib64 -lQtCore -lpthread
     18LFLAGS        =
     19LIBS          = $(SUBLIBS)  -L/usr/lib/x86_64-linux-gnu -lQtGui -lQtCore -lpthread
    2020AR            = ar cqs
    2121RANLIB        =
     
    7272                communs/ServerSocket.cpp \
    7373                communs/Socket.cpp \
    74                 examples/tutorial_ccdpreview.c \
    75                 examples/tutorial_client.cpp \
    76                 examples/tutorial_dome.c \
    77                 examples/tutorial_four.cpp \
    78                 examples/tutorial_one.c \
    79                 examples/tutorial_rain.c \
    80                 examples/tutorial_three.c \
    81                 examples/tutorial_two.c \
    8274                libs/indicom.c \
    8375                libs/lilxml.c \
     
    8880                drivers/ccd/ccd_simulator.cpp \
    8981                drivers/ccd/fli_ccd.c \
    90                 drivers/filter_wheel/filter_simulator.cpp \
    91                 drivers/filter_wheel/fli_wheel.c \
    92                 drivers/filter_wheel/trutech_wheel.c \
    93                 drivers/focuser/fli_pdf.c \
    94                 drivers/focuser/robofocus.c \
    95                 drivers/focuser/robofocus.cpp \
    96                 drivers/focuser/robofocusdriver.c \
    97                 drivers/focuser/tcfs.cpp \
    9882                drivers/telescope/BAO.cpp \
    9983                drivers/telescope/celestrongps.cpp \
     
    119103                drivers/telescope/telescope_simulator.cpp \
    120104                drivers/telescope/temmadriver.c \
    121                 drivers/video/indi_lpi.cpp \
    122                 drivers/video/indi_philips.cpp \
    123                 drivers/video/indi_v4l.cpp \
    124                 drivers/video/stv.c \
    125                 drivers/video/stvdriver.c \
    126                 drivers/video/v4ldriver.cpp \
    127                 drivers/video/v4lphilips.cpp \
    128105                Indi_Stellarium/src/Connection.cpp \
    129106                Indi_Stellarium/src/Listener.cpp \
     
    144121                libs/indibase/inditelescope.cpp \
    145122                libs/indibase/indiusbdevice.cpp \
    146                 libs/webcam/ccvt_c2.c \
    147                 libs/webcam/ccvt_misc.c \
    148                 libs/webcam/port.cpp \
    149                 libs/webcam/PPort.cpp \
    150                 libs/webcam/v4l1_base.cpp \
    151                 libs/webcam/v4l1_pwc.cpp \
    152                 libs/webcam/v4l2_base.cpp \
    153123                libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c \
    154124                libindi_build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp moc_baoqt.cpp \
     
    185155                ServerSocket.o \
    186156                Socket.o \
    187                 tutorial_ccdpreview.o \
    188                 tutorial_client.o \
    189                 tutorial_dome.o \
    190                 tutorial_four.o \
    191                 tutorial_one.o \
    192                 tutorial_rain.o \
    193                 tutorial_three.o \
    194                 tutorial_two.o \
    195157                indicom.o \
    196158                lilxml.o \
     
    201163                ccd_simulator.o \
    202164                fli_ccd.o \
    203                 filter_simulator.o \
    204                 fli_wheel.o \
    205                 trutech_wheel.o \
    206                 fli_pdf.o \
    207                 robofocus.o \
    208                 robofocus.o \
    209                 robofocusdriver.o \
    210                 tcfs.o \
    211165                BAO.o \
    212166                celestrongps.o \
     
    232186                telescope_simulator.o \
    233187                temmadriver.o \
    234                 indi_lpi.o \
    235                 indi_philips.o \
    236                 indi_v4l.o \
    237                 stv.o \
    238                 stvdriver.o \
    239                 v4ldriver.o \
    240                 v4lphilips.o \
    241188                Connection.o \
    242189                Listener.o \
     
    257204                inditelescope.o \
    258205                indiusbdevice.o \
    259                 ccvt_c2.o \
    260                 ccvt_misc.o \
    261                 port.o \
    262                 PPort.o \
    263                 v4l1_base.o \
    264                 v4l1_pwc.o \
    265                 v4l2_base.o \
    266206                CMakeCCompilerId.o \
    267207                CMakeCXXCompilerId.o \
     
    271211                moc_qledindicator.o \
    272212                moc_selectstars.o
    273 DIST          = /usr/share/qt4/mkspecs/common/g++.conf \
    274                 /usr/share/qt4/mkspecs/common/unix.conf \
     213DIST          = /usr/share/qt4/mkspecs/common/unix.conf \
    275214                /usr/share/qt4/mkspecs/common/linux.conf \
     215                /usr/share/qt4/mkspecs/common/gcc-base.conf \
     216                /usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
     217                /usr/share/qt4/mkspecs/common/g++-base.conf \
     218                /usr/share/qt4/mkspecs/common/g++-unix.conf \
    276219                /usr/share/qt4/mkspecs/qconfig.pri \
    277                 /usr/share/qt4/mkspecs/modules/qt_phonon.pri \
     220                /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
    278221                /usr/share/qt4/mkspecs/features/qt_functions.prf \
    279222                /usr/share/qt4/mkspecs/features/qt_config.prf \
    280223                /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
    281224                /usr/share/qt4/mkspecs/features/default_pre.prf \
    282                 /usr/share/qt4/mkspecs/features/release.prf \
     225                /usr/share/qt4/mkspecs/features/debug.prf \
    283226                /usr/share/qt4/mkspecs/features/default_post.prf \
     227                /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
    284228                /usr/share/qt4/mkspecs/features/warn_on.prf \
    285229                /usr/share/qt4/mkspecs/features/qt.prf \
     
    322266$(TARGET): ui_baoqt.h ui_liste.h ui_map.h ui_selectstars.h $(OBJECTS) 
    323267        $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
    324 
    325 Makefile: libindi.pro  /usr/share/qt4/mkspecs/default/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
    326                 /usr/share/qt4/mkspecs/common/unix.conf \
     268        { 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
     269
     270Makefile: libindi.pro  /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \
    327271                /usr/share/qt4/mkspecs/common/linux.conf \
     272                /usr/share/qt4/mkspecs/common/gcc-base.conf \
     273                /usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
     274                /usr/share/qt4/mkspecs/common/g++-base.conf \
     275                /usr/share/qt4/mkspecs/common/g++-unix.conf \
    328276                /usr/share/qt4/mkspecs/qconfig.pri \
    329                 /usr/share/qt4/mkspecs/modules/qt_phonon.pri \
     277                /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
    330278                /usr/share/qt4/mkspecs/features/qt_functions.prf \
    331279                /usr/share/qt4/mkspecs/features/qt_config.prf \
    332280                /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
    333281                /usr/share/qt4/mkspecs/features/default_pre.prf \
    334                 /usr/share/qt4/mkspecs/features/release.prf \
     282                /usr/share/qt4/mkspecs/features/debug.prf \
    335283                /usr/share/qt4/mkspecs/features/default_post.prf \
     284                /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
    336285                /usr/share/qt4/mkspecs/features/warn_on.prf \
    337286                /usr/share/qt4/mkspecs/features/qt.prf \
     
    343292                /usr/share/qt4/mkspecs/features/lex.prf \
    344293                /usr/share/qt4/mkspecs/features/include_source_dir.prf \
    345                 /usr/lib64/libQtGui.prl \
    346                 /usr/lib64/libQtCore.prl
    347         $(QMAKE) -o Makefile libindi.pro
    348 /usr/share/qt4/mkspecs/common/g++.conf:
     294                /usr/lib/x86_64-linux-gnu/libQtGui.prl \
     295                /usr/lib/x86_64-linux-gnu/libQtCore.prl
     296        $(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile libindi.pro
    349297/usr/share/qt4/mkspecs/common/unix.conf:
    350298/usr/share/qt4/mkspecs/common/linux.conf:
     299/usr/share/qt4/mkspecs/common/gcc-base.conf:
     300/usr/share/qt4/mkspecs/common/gcc-base-unix.conf:
     301/usr/share/qt4/mkspecs/common/g++-base.conf:
     302/usr/share/qt4/mkspecs/common/g++-unix.conf:
    351303/usr/share/qt4/mkspecs/qconfig.pri:
    352 /usr/share/qt4/mkspecs/modules/qt_phonon.pri:
     304/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
    353305/usr/share/qt4/mkspecs/features/qt_functions.prf:
    354306/usr/share/qt4/mkspecs/features/qt_config.prf:
    355307/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
    356308/usr/share/qt4/mkspecs/features/default_pre.prf:
    357 /usr/share/qt4/mkspecs/features/release.prf:
     309/usr/share/qt4/mkspecs/features/debug.prf:
    358310/usr/share/qt4/mkspecs/features/default_post.prf:
     311/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
    359312/usr/share/qt4/mkspecs/features/warn_on.prf:
    360313/usr/share/qt4/mkspecs/features/qt.prf:
     
    366319/usr/share/qt4/mkspecs/features/lex.prf:
    367320/usr/share/qt4/mkspecs/features/include_source_dir.prf:
    368 /usr/lib64/libQtGui.prl:
    369 /usr/lib64/libQtCore.prl:
     321/usr/lib/x86_64-linux-gnu/libQtGui.prl:
     322/usr/lib/x86_64-linux-gnu/libQtCore.prl:
    370323qmake:  FORCE
    371         @$(QMAKE) -o Makefile libindi.pro
     324        @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile libindi.pro
    372325
    373326dist:
    374327        @$(CHK_DIR_EXISTS) .tmp/libindi1.0.0 || $(MKDIR) .tmp/libindi1.0.0
    375         $(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
     328        $(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
    376329
    377330
     
    415368                BAOcontrol/Server.hpp \
    416369                BAOcontrol/baoqt.h
    417         /usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/baoqt.h -o moc_baoqt.cpp
     370        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/baoqt.h -o moc_baoqt.cpp
    418371
    419372moc_liste.cpp: BAOcontrol/liste.h
    420         /usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/liste.h -o moc_liste.cpp
     373        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/liste.h -o moc_liste.cpp
    421374
    422375moc_map.cpp: communs/const.h \
    423376                BAOcontrol/map.h
    424         /usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/map.h -o moc_map.cpp
     377        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/map.h -o moc_map.cpp
    425378
    426379moc_qledindicator.cpp: BAOcontrol/qledindicator.h
    427         /usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/qledindicator.h -o moc_qledindicator.cpp
     380        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/qledindicator.h -o moc_qledindicator.cpp
    428381
    429382moc_selectstars.cpp: BAOcontrol/ui_selectstars.h \
    430383                BAOcontrol/selectstars.h
    431         /usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/selectstars.h -o moc_selectstars.cpp
     384        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/selectstars.h -o moc_selectstars.cpp
    432385
    433386compiler_rcc_make_all:
     
    442395        -$(DEL_FILE) ui_baoqt.h ui_liste.h ui_map.h ui_selectstars.h
    443396ui_baoqt.h: BAOcontrol/baoqt.ui
    444         /usr/bin/uic BAOcontrol/baoqt.ui -o ui_baoqt.h
     397        /usr/bin/uic-qt4 BAOcontrol/baoqt.ui -o ui_baoqt.h
    445398
    446399ui_liste.h: BAOcontrol/liste.ui
    447         /usr/bin/uic BAOcontrol/liste.ui -o ui_liste.h
     400        /usr/bin/uic-qt4 BAOcontrol/liste.ui -o ui_liste.h
    448401
    449402ui_map.h: BAOcontrol/map.ui
    450         /usr/bin/uic BAOcontrol/map.ui -o ui_map.h
     403        /usr/bin/uic-qt4 BAOcontrol/map.ui -o ui_map.h
    451404
    452405ui_selectstars.h: BAOcontrol/selectstars.ui
    453         /usr/bin/uic BAOcontrol/selectstars.ui -o ui_selectstars.h
     406        /usr/bin/uic-qt4 BAOcontrol/selectstars.ui -o ui_selectstars.h
    454407
    455408compiler_yacc_decl_make_all:
     
    634587        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Socket.o communs/Socket.cpp
    635588
    636 tutorial_ccdpreview.o: examples/tutorial_ccdpreview.c indidevapi.h \
    637                 indiapi.h \
    638                 libs/lilxml.h \
    639                 libs/indicom.h \
    640                 eventloop.h \
    641                 base64.h
    642         $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_ccdpreview.o examples/tutorial_ccdpreview.c
    643 
    644 tutorial_client.o: examples/tutorial_client.cpp config.h \
    645                 libs/indibase/baseclient.h \
    646                 indiapi.h \
    647                 indidevapi.h \
    648                 libs/lilxml.h \
    649                 libs/indibase/indibase.h \
    650                 libs/indibase/basedriver.h \
    651                 libs/indicom.h \
    652                 examples/tutorial_client.h
    653         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tutorial_client.o examples/tutorial_client.cpp
    654 
    655 tutorial_dome.o: examples/tutorial_dome.c indidevapi.h \
    656                 indiapi.h \
    657                 libs/lilxml.h \
    658                 eventloop.h \
    659                 libs/indicom.h
    660         $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_dome.o examples/tutorial_dome.c
    661 
    662 tutorial_four.o: examples/tutorial_four.cpp config.h \
    663                 libs/indibase/baseclient.h \
    664                 indiapi.h \
    665                 indidevapi.h \
    666                 libs/lilxml.h \
    667                 libs/indibase/indibase.h \
    668                 libs/indicom.h \
    669                 examples/tutorial_four.h \
    670                 libs/indibase/defaultdriver.h \
    671                 libs/indibase/basedriver.h \
    672                 indidriver.h
    673         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tutorial_four.o examples/tutorial_four.cpp
    674 
    675 tutorial_one.o: examples/tutorial_one.c indidevapi.h \
    676                 indiapi.h \
    677                 libs/lilxml.h \
    678                 eventloop.h \
    679                 libs/indicom.h
    680         $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_one.o examples/tutorial_one.c
    681 
    682 tutorial_rain.o: examples/tutorial_rain.c indidevapi.h \
    683                 indiapi.h \
    684                 libs/lilxml.h \
    685                 eventloop.h \
    686                 libs/indicom.h
    687         $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_rain.o examples/tutorial_rain.c
    688 
    689 tutorial_three.o: examples/tutorial_three.c indidevapi.h \
    690                 indiapi.h \
    691                 libs/lilxml.h \
    692                 libs/indicom.h \
    693                 eventloop.h \
    694                 base64.h
    695         $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_three.o examples/tutorial_three.c
    696 
    697 tutorial_two.o: examples/tutorial_two.c indidevapi.h \
    698                 indiapi.h \
    699                 libs/lilxml.h \
    700                 eventloop.h \
    701                 libs/indicom.h
    702         $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_two.o examples/tutorial_two.c
    703 
    704589indicom.o: libs/indicom.c config.h \
    705590                libs/indicom.h \
     
    730615ccd_simulator.o: drivers/ccd/ccd_simulator.cpp drivers/ccd/ccd_simulator.h \
    731616                libs/indibase/indiccd.h \
    732                 libs/indibase/defaultdriver.h \
    733                 libs/indibase/basedriver.h \
    734                 indiapi.h \
    735                 indidevapi.h \
    736                 libs/lilxml.h \
    737                 libs/indibase/indibase.h \
     617                libs/indibase/defaultdevice.h \
     618                libs/indibase/basedevice.h \
     619                indiapi.h \
     620                indidevapi.h \
     621                libs/lilxml.h \
     622                libs/indibase/indibase.h \
     623                libs/indibase/indiproperty.h \
    738624                indidriver.h \
    739625                libs/indibase/indiguiderinterface.h
     
    746632                libs/indicom.h
    747633        $(CC) -c $(CFLAGS) $(INCPATH) -o fli_ccd.o drivers/ccd/fli_ccd.c
    748 
    749 filter_simulator.o: drivers/filter_wheel/filter_simulator.cpp drivers/filter_wheel/filter_simulator.h \
    750                 libs/indibase/indifilterwheel.h \
    751                 libs/indibase/defaultdriver.h \
    752                 libs/indibase/basedriver.h \
    753                 indiapi.h \
    754                 indidevapi.h \
    755                 libs/lilxml.h \
    756                 libs/indibase/indibase.h \
    757                 indidriver.h \
    758                 libs/indibase/indifilterinterface.h
    759         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o filter_simulator.o drivers/filter_wheel/filter_simulator.cpp
    760 
    761 fli_wheel.o: drivers/filter_wheel/fli_wheel.c indidevapi.h \
    762                 indiapi.h \
    763                 libs/lilxml.h \
    764                 eventloop.h \
    765                 libs/indicom.h
    766         $(CC) -c $(CFLAGS) $(INCPATH) -o fli_wheel.o drivers/filter_wheel/fli_wheel.c
    767 
    768 trutech_wheel.o: drivers/filter_wheel/trutech_wheel.c indidevapi.h \
    769                 indiapi.h \
    770                 libs/lilxml.h \
    771                 eventloop.h \
    772                 libs/indicom.h
    773         $(CC) -c $(CFLAGS) $(INCPATH) -o trutech_wheel.o drivers/filter_wheel/trutech_wheel.c
    774 
    775 fli_pdf.o: drivers/focuser/fli_pdf.c indidevapi.h \
    776                 indiapi.h \
    777                 libs/lilxml.h \
    778                 eventloop.h \
    779                 libs/indicom.h
    780         $(CC) -c $(CFLAGS) $(INCPATH) -o fli_pdf.o drivers/focuser/fli_pdf.c
    781 
    782 robofocus.o: drivers/focuser/robofocus.c indidevapi.h \
    783                 indiapi.h \
    784                 libs/lilxml.h \
    785                 eventloop.h \
    786                 libs/indicom.h \
    787                 drivers/focuser/robofocusdriver.h
    788         $(CC) -c $(CFLAGS) $(INCPATH) -o robofocus.o drivers/focuser/robofocus.c
    789 
    790 robofocus.o: drivers/focuser/robofocus.cpp drivers/focuser/robofocus.h \
    791                 libs/indibase/indifocuser.h \
    792                 libs/indibase/defaultdriver.h \
    793                 libs/indibase/basedriver.h \
    794                 indiapi.h \
    795                 indidevapi.h \
    796                 libs/lilxml.h \
    797                 libs/indibase/indibase.h \
    798                 indidriver.h \
    799                 libs/indicom.h
    800         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o robofocus.o drivers/focuser/robofocus.cpp
    801 
    802 robofocusdriver.o: drivers/focuser/robofocusdriver.c libs/indicom.h \
    803                 indidevapi.h \
    804                 indiapi.h \
    805                 libs/lilxml.h \
    806                 drivers/focuser/robofocusdriver.h
    807         $(CC) -c $(CFLAGS) $(INCPATH) -o robofocusdriver.o drivers/focuser/robofocusdriver.c
    808 
    809 tcfs.o: drivers/focuser/tcfs.cpp libs/indicom.h \
    810                 drivers/focuser/tcfs.h \
    811                 indidevapi.h \
    812                 indiapi.h \
    813                 libs/lilxml.h \
    814                 libs/indibase/defaultdriver.h \
    815                 libs/indibase/basedriver.h \
    816                 libs/indibase/indibase.h \
    817                 indidriver.h
    818         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tcfs.o drivers/focuser/tcfs.cpp
    819634
    820635BAO.o: drivers/telescope/BAO.cpp drivers/telescope/BAO.h \
     
    1003818synscanmount.o: drivers/telescope/synscanmount.cpp drivers/telescope/synscanmount.h \
    1004819                libs/indibase/inditelescope.h \
    1005                 libs/indibase/defaultdriver.h \
    1006                 libs/indibase/basedriver.h \
    1007                 indiapi.h \
    1008                 indidevapi.h \
    1009                 libs/lilxml.h \
    1010                 libs/indibase/indibase.h \
     820                libs/indibase/defaultdevice.h \
     821                libs/indibase/basedevice.h \
     822                indiapi.h \
     823                indidevapi.h \
     824                libs/lilxml.h \
     825                libs/indibase/indibase.h \
     826                libs/indibase/indiproperty.h \
    1011827                indidriver.h \
    1012828                libs/indicom.h
     
    1015831telescope_simulator.o: drivers/telescope/telescope_simulator.cpp drivers/telescope/telescope_simulator.h \
    1016832                libs/indibase/inditelescope.h \
    1017                 libs/indibase/defaultdriver.h \
    1018                 libs/indibase/basedriver.h \
    1019                 indiapi.h \
    1020                 indidevapi.h \
    1021                 libs/lilxml.h \
    1022                 libs/indibase/indibase.h \
     833                libs/indibase/defaultdevice.h \
     834                libs/indibase/basedevice.h \
     835                indiapi.h \
     836                indidevapi.h \
     837                libs/lilxml.h \
     838                libs/indibase/indibase.h \
     839                libs/indibase/indiproperty.h \
    1023840                indidriver.h \
    1024841                libs/indicom.h
     
    1033850                drivers/telescope/temmadriver.h
    1034851        $(CC) -c $(CFLAGS) $(INCPATH) -o temmadriver.o drivers/telescope/temmadriver.c
    1035 
    1036 indi_lpi.o: drivers/video/indi_lpi.cpp drivers/video/v4ldriver.h \
    1037                 indidevapi.h \
    1038                 indiapi.h \
    1039                 libs/lilxml.h \
    1040                 libs/indicom.h \
    1041                 eventloop.h \
    1042                 config.h \
    1043                 libs/webcam/v4l2_base.h \
    1044                 libs/webcam/videodev2.h \
    1045                 libs/webcam/v4l1_base.h \
    1046                 libs/webcam/videodev.h
    1047         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o indi_lpi.o drivers/video/indi_lpi.cpp
    1048 
    1049 indi_philips.o: drivers/video/indi_philips.cpp drivers/video/v4lphilips.h \
    1050                 libs/webcam/v4l1_pwc.h \
    1051                 libs/webcam/videodev.h \
    1052                 libs/webcam/v4l1_base.h \
    1053                 eventloop.h \
    1054                 drivers/video/v4ldriver.h \
    1055                 indidevapi.h \
    1056                 indiapi.h \
    1057                 libs/lilxml.h \
    1058                 libs/indicom.h \
    1059                 config.h \
    1060                 libs/webcam/v4l2_base.h \
    1061                 libs/webcam/videodev2.h
    1062         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o indi_philips.o drivers/video/indi_philips.cpp
    1063 
    1064 indi_v4l.o: drivers/video/indi_v4l.cpp drivers/video/v4ldriver.h \
    1065                 indidevapi.h \
    1066                 indiapi.h \
    1067                 libs/lilxml.h \
    1068                 libs/indicom.h \
    1069                 eventloop.h \
    1070                 config.h \
    1071                 libs/webcam/v4l2_base.h \
    1072                 libs/webcam/videodev2.h \
    1073                 libs/webcam/v4l1_base.h \
    1074                 libs/webcam/videodev.h
    1075         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o indi_v4l.o drivers/video/indi_v4l.cpp
    1076 
    1077 stv.o: drivers/video/stv.c indidevapi.h \
    1078                 indiapi.h \
    1079                 libs/lilxml.h \
    1080                 eventloop.h \
    1081                 libs/indicom.h \
    1082                 config.h \
    1083                 drivers/video/stvdriver.h
    1084         $(CC) -c $(CFLAGS) $(INCPATH) -o stv.o drivers/video/stv.c
    1085 
    1086 stvdriver.o: drivers/video/stvdriver.c drivers/video/stvdriver.h \
    1087                 config.h \
    1088                 libs/indicom.h
    1089         $(CC) -c $(CFLAGS) $(INCPATH) -o stvdriver.o drivers/video/stvdriver.c
    1090 
    1091 v4ldriver.o: drivers/video/v4ldriver.cpp drivers/video/v4ldriver.h \
    1092                 indidevapi.h \
    1093                 indiapi.h \
    1094                 libs/lilxml.h \
    1095                 libs/indicom.h \
    1096                 eventloop.h \
    1097                 config.h \
    1098                 libs/webcam/v4l2_base.h \
    1099                 libs/webcam/videodev2.h \
    1100                 libs/webcam/v4l1_base.h \
    1101                 libs/webcam/videodev.h
    1102         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4ldriver.o drivers/video/v4ldriver.cpp
    1103 
    1104 v4lphilips.o: drivers/video/v4lphilips.cpp drivers/video/v4lphilips.h \
    1105                 libs/webcam/v4l1_pwc.h \
    1106                 libs/webcam/videodev.h \
    1107                 libs/webcam/v4l1_base.h \
    1108                 eventloop.h \
    1109                 drivers/video/v4ldriver.h \
    1110                 indidevapi.h \
    1111                 indiapi.h \
    1112                 libs/lilxml.h \
    1113                 libs/indicom.h \
    1114                 config.h \
    1115                 libs/webcam/v4l2_base.h \
    1116                 libs/webcam/videodev2.h \
    1117                 libs/webcam/pwc-ioctl.h
    1118         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4lphilips.o drivers/video/v4lphilips.cpp
    1119852
    1120853Connection.o: Indi_Stellarium/src/Connection.cpp Indi_Stellarium/src/Connection.hpp \
     
    1175908                libs/lilxml.h \
    1176909                libs/indibase/indibase.h \
    1177                 libs/indibase/basedriver.h \
     910                libs/indibase/basedevice.h \
     911                libs/indibase/indiproperty.h \
    1178912                libs/indicom.h
    1179913        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o baseclient.o libs/indibase/baseclient.cpp
     
    1201935
    1202936indiccd.o: libs/indibase/indiccd.cpp libs/indibase/indiccd.h \
    1203                 libs/indibase/defaultdriver.h \
    1204                 libs/indibase/basedriver.h \
    1205                 indiapi.h \
    1206                 indidevapi.h \
    1207                 libs/lilxml.h \
    1208                 libs/indibase/indibase.h \
     937                libs/indibase/defaultdevice.h \
     938                libs/indibase/basedevice.h \
     939                indiapi.h \
     940                indidevapi.h \
     941                libs/lilxml.h \
     942                libs/indibase/indibase.h \
     943                libs/indibase/indiproperty.h \
    1209944                indidriver.h \
    1210945                libs/indibase/indiguiderinterface.h
     
    1222957
    1223958indifilterwheel.o: libs/indibase/indifilterwheel.cpp libs/indibase/indifilterwheel.h \
    1224                 libs/indibase/defaultdriver.h \
    1225                 libs/indibase/basedriver.h \
    1226                 indiapi.h \
    1227                 indidevapi.h \
    1228                 libs/lilxml.h \
    1229                 libs/indibase/indibase.h \
     959                libs/indibase/defaultdevice.h \
     960                libs/indibase/basedevice.h \
     961                indiapi.h \
     962                indidevapi.h \
     963                libs/lilxml.h \
     964                libs/indibase/indibase.h \
     965                libs/indibase/indiproperty.h \
    1230966                indidriver.h \
    1231967                libs/indibase/indifilterinterface.h
     
    1233969
    1234970indifocuser.o: libs/indibase/indifocuser.cpp libs/indibase/indifocuser.h \
    1235                 libs/indibase/defaultdriver.h \
    1236                 libs/indibase/basedriver.h \
    1237                 indiapi.h \
    1238                 indidevapi.h \
    1239                 libs/lilxml.h \
    1240                 libs/indibase/indibase.h \
     971                libs/indibase/defaultdevice.h \
     972                libs/indibase/basedevice.h \
     973                indiapi.h \
     974                indidevapi.h \
     975                libs/lilxml.h \
     976                libs/indibase/indibase.h \
     977                libs/indibase/indiproperty.h \
    1241978                indidriver.h
    1242979        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o indifocuser.o libs/indibase/indifocuser.cpp
     
    1250987
    1251988inditelescope.o: libs/indibase/inditelescope.cpp libs/indibase/inditelescope.h \
    1252                 libs/indibase/defaultdriver.h \
    1253                 libs/indibase/basedriver.h \
    1254                 indiapi.h \
    1255                 indidevapi.h \
    1256                 libs/lilxml.h \
    1257                 libs/indibase/indibase.h \
     989                libs/indibase/defaultdevice.h \
     990                libs/indibase/basedevice.h \
     991                indiapi.h \
     992                indidevapi.h \
     993                libs/lilxml.h \
     994                libs/indibase/indibase.h \
     995                libs/indibase/indiproperty.h \
    1258996                indidriver.h \
    1259997                libs/indicom.h
     
    12671005        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o indiusbdevice.o libs/indibase/indiusbdevice.cpp
    12681006
    1269 ccvt_c2.o: libs/webcam/ccvt_c2.c libs/webcam/ccvt.h \
    1270                 libs/webcam/ccvt_types.h
    1271         $(CC) -c $(CFLAGS) $(INCPATH) -o ccvt_c2.o libs/webcam/ccvt_c2.c
    1272 
    1273 ccvt_misc.o: libs/webcam/ccvt_misc.c libs/webcam/ccvt.h \
    1274                 libs/webcam/ccvt_types.h
    1275         $(CC) -c $(CFLAGS) $(INCPATH) -o ccvt_misc.o libs/webcam/ccvt_misc.c
    1276 
    1277 port.o: libs/webcam/port.cpp libs/webcam/port.h
    1278         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o port.o libs/webcam/port.cpp
    1279 
    1280 PPort.o: libs/webcam/PPort.cpp libs/webcam/PPort.h \
    1281                 libs/webcam/port.h
    1282         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o PPort.o libs/webcam/PPort.cpp
    1283 
    1284 v4l1_base.o: libs/webcam/v4l1_base.cpp libs/webcam/ccvt.h \
    1285                 libs/webcam/v4l1_base.h \
    1286                 libs/webcam/videodev.h \
    1287                 eventloop.h \
    1288                 indidevapi.h \
    1289                 indiapi.h \
    1290                 libs/lilxml.h
    1291         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4l1_base.o libs/webcam/v4l1_base.cpp
    1292 
    1293 v4l1_pwc.o: libs/webcam/v4l1_pwc.cpp libs/webcam/ccvt.h \
    1294                 libs/webcam/pwc-ioctl.h \
    1295                 libs/webcam/v4l1_pwc.h \
    1296                 libs/webcam/videodev.h \
    1297                 libs/webcam/v4l1_base.h \
    1298                 eventloop.h
    1299         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4l1_pwc.o libs/webcam/v4l1_pwc.cpp
    1300 
    1301 v4l2_base.o: libs/webcam/v4l2_base.cpp libs/webcam/ccvt.h \
    1302                 libs/webcam/v4l2_base.h \
    1303                 libs/webcam/videodev2.h \
    1304                 eventloop.h \
    1305                 indidevapi.h \
    1306                 indiapi.h \
    1307                 libs/lilxml.h
    1308         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4l2_base.o libs/webcam/v4l2_base.cpp
    1309 
    13101007CMakeCCompilerId.o: libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c
    13111008        $(CC) -c $(CFLAGS) $(INCPATH) -o CMakeCCompilerId.o libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c
  • BAORadio/libindi/libindi/bao.sh

    r693 r697  
    2020make clean
    2121rm -f *.cmake *.h *.txt Makefile *.pc
    22 rm -rf CMakeFiles/*
     22rm -rf CMakeFiles
    2323cd ../BAOcontrol
    2424make clean
    25 rm -f *.o *.cpp~ *.h~  BAOtest
     25rm -f *.o *.cpp~ *.h~  BAOcontrol
     26cd ../communs
     27rm -f *.cpp~ *.h~
    2628cd ../BAOTest
    2729make clean
    2830cd ..
     31rm -rf BAOcontrol-build-desktop-Qt_4_8_3__Syst_me__Debug
     32rm -rf BAOcontrol-build-desktop-Qt_4_8_3__Syst_me__Release
     33
     34rm -f /usr/lib/libindi.so
     35rm -f /usr/bin/indiserver
     36rm -f /usr/lib/libindi.so.0
     37rm -f /usr/lib/libindimain.a
     38rm -f /usr/lib/libindidriver.a
     39rm -f /usr/lib/libindiclient.a
     40rm -f /usr/bin/indi_BAO
     41rm -f /usr/bin/indi_getprop
     42rm -f /usr/bin/indi_setprop
     43rm -f /usr/bin/indi_eval
     44rm -f /usr/share/indi/drivers.xml
     45rm -f /usr/share/indi/indi_tcfs_sk.xml
     46rm -f /usr/bin/BAOcontrol
     47rm -f /usr/bin/BAOtest
     48
    2949echo "Les fichiers ont été supprimés";
    3050fi
     
    5575
    5676cd ../BAOcontrol
     77#à réactiver si on ajoute une nouvelle classe à BAOcontrol
    5778qmake -project
    5879qmake
  • BAORadio/libindi/libindi/cmake_modules/FindGPHOTO2.cmake

    r490 r697  
    4545    endif (NOT LIBGPHOTO2_FIND_QUIETLY)
    4646  else (LIBGPHOTO2_FOUND)
    47     if (GLIBPHOTO2_FIND_REQUIRED)
     47    if (LIBGPHOTO2_FIND_REQUIRED)
    4848      message(FATAL_ERROR "libgphoto2 not found.")
    4949    endif (LIBGPHOTO2_FIND_REQUIRED)
  • BAORadio/libindi/libindi/cmake_modules/FindINDI.cmake

    r642 r697  
    3131  )
    3232
    33  find_path(INDI_DATA_DIR drivers.xml
    34     PATHS /usr/share /usr/local/share /opt ${GNUWIN32_DIR}/share
    35     PATH_SUFFIXES indi
     33  find_path(INDI_DATA_DIR drivers.xml
     34    PATHS ${CMAKE_INSTALL_PREFIX} /usr /usr/local /opt /opt/local ${GNUWIN32_DIR}
     35    PATH_SUFFIXES share/indi
    3636  )
    3737
  • BAORadio/libindi/libindi/communs/Socket.cpp

    r644 r697  
    181181        }
    182182    }
     183   
     184    //TODO:: à vérifier   - ajouté le 22/10/2012
     185    return 0;
    183186}
    184187
  • BAORadio/libindi/libindi/communs/alignement.cpp

    r695 r697  
    372372    double EQMQ[4][4];
    373373
    374     Coord a1, a2, a3, m1, m2, m3, c1, c2;
     374    Coord a1, a2, a3, m1, m2, m3;
    375375
    376376    AzHa2XY(aa1.x, aa1.y, &a1.x, &a1.y);
     
    762762    Coord c1, c2, c3, c4, m1, m2, m3, mm1, mm2, mm3, mm,mmm, result;
    763763
    764     double i, j, k, l, m;
     764    double j, k, l, m;
    765765
    766766    double memBC = BC0;
  • BAORadio/libindi/libindi/communs/const.h

    r695 r697  
    88//////////////////////////////////////////
    99
    10 #define VERSION "0.63"
    11 #define VERSION_DATE "28/09/12"
     10#define VERSION "0.64"
     11#define VERSION_DATE "22/10/12"
    1212
    1313//#define ET_UT 0.0
    1414#define ET_UT 66.185
     15
     16//Version à utiliser avec l'antenne du LAL ?
     17
     18#define LAL
    1519
    1620// ParamÚtres de l'instrument
     
    2832
    2933#define MAXLOG 100000
    30 #define MAXOBJETS 1000
     34#define MAXOBJETS 100
    3135#define MAXETOILES 250
    3236#define MAXANTENNES 50
  • BAORadio/libindi/libindi/communs/filetools.cpp

    r644 r697  
    816816        {
    817817
    818           fprintf (pFile, pSection->name);
     818          fprintf (pFile, "%s", pSection->name);
    819819          fprintf (pFile, "\n");
    820820          pKey = pSection->fils;
     
    840840              offset = strlen (pKey->name) + 1;
    841841              strcpy (str + offset, pKey->value);
    842               fprintf (pFile, str);
     842              fprintf (pFile, "%s", str);
    843843              fprintf (pFile, "\n");
    844844              pKey_pred = pKey;
     
    855855  //nettoyage
    856856  fclose (pFile);
     857 
     858  return 0;
    857859}
    858860
     
    954956{
    955957    int ind = 0;
    956     for (ind; (ind < strlen (str)) && (str[ind] != '='); ind++);
     958    for (ind; (ind < (int)strlen (str)) && (str[ind] != '='); ind++);
    957959    if (str[ind] == '=')
    958960        return ind;
  • BAORadio/libindi/libindi/communs/logs.cpp

    r650 r697  
    7171
    7272    if ( Taille(fichier) > TAILLEMAXLOGS ) remove(fichier.c_str());
     73   
     74    pFile = fopen(fichier.c_str(), "a");
    7375
    74     if ( (pFile = fopen(fichier.c_str(), "a")) != NULL)
     76    if ( pFile != NULL)
    7577    {
    7678        time_t rawtime;
    7779        struct tm * timeinfo;
    7880
    79         char buffer[80];
     81        char *buffer;
     82       
     83        buffer = new char[100];
    8084       
    8185        // On sauvegarde la date et l'heure
     
    8387        time ( &rawtime );
    8488        timeinfo = localtime ( &rawtime );
    85         strftime (buffer,80,"%c    ",timeinfo);
    86         fprintf(pFile, buffer);
     89        strftime (buffer, 80, "%c    ",timeinfo);
     90        fprintf(pFile, "%s", buffer);
    8791       
    8892        // On le sauvegarde dans le fichier log
    8993
    90         fprintf(pFile, Message.c_str());
     94        fprintf(pFile, "%s", Message.c_str());
    9195
    9296        fclose(pFile);
     97       
     98        delete [] buffer;
    9399    }
    94100    else
  • BAORadio/libindi/libindi/config.h

    r501 r697  
     1 
  • BAORadio/libindi/libindi/drivers.xml

    r642 r697  
    11<devGroup group="Telescopes">
    2         <device label="BAO" focal_length="" aperture="">
    3                 <driver name="BAO">indi_BAO</driver>
    4                 <version>1.0</version>
    5         </device>
    62        <device label="LX200 Basic" focal_length="" aperture="">
    73                <driver name="LX200 Basic">indi_lx200basic</driver>
     
    122118</devGroup>
    123119<devGroup group="Focusers">
     120        <device label="Focuser Simulator">
     121            <driver name="Focuser Simulator">indi_simulator_focus</driver>
     122            <version>1.0</version>
     123        </device>
    124124        <device label="RoboFocus">
    125125                <driver name="RoboFocus">indi_robo_focus</driver>
     
    153153<devGroup group="Video">
    154154        <device label="Generic Video4Linux">
    155                 <driver name="Video4Linux Generic Device">indi_v4l_generic</driver>
     155                <driver name="Generic Video4Linux">indi_v4l_generic</driver>
    156156                <version>1.0</version>
    157157        </device>
    158158        <device label="Philips Webcam">
    159                 <driver name="Video4Linux Generic Device">indi_v4l_philips</driver>
     159                <driver name="Generic Video4Linux">indi_v4l_philips</driver>
    160160                <version>1.0</version>
    161161        </device>
     
    164164                <version>0.1</version>
    165165        </device>
    166         <device label="SBIG STV">
     166        <device label="STV Guider">
    167167                <driver name="STV Guider">indi_sbig_stv</driver>
    168168                <version>0.1</version>
  • BAORadio/libindi/libindi/drivers/ccd/ccd_simulator.cpp

    r642 r697  
    2424#include <string.h>
    2525
     26#include <memory>
     27
    2628
    2729// We declare an auto pointer to ccdsim.
     
    133135    SetCCDParams(SimulatorSettingsN[0].value,SimulatorSettingsN[1].value,16,SimulatorSettingsN[2].value,SimulatorSettingsN[3].value);
    134136    //  Kwiq
    135     maxnoise=SimulatorSettingsN[10].value;
    136     skyglow=SimulatorSettingsN[11].value;
     137    maxnoise=SimulatorSettingsN[8].value;
     138    skyglow=SimulatorSettingsN[9].value;
    137139    maxval=SimulatorSettingsN[4].value;
    138140    bias=SimulatorSettingsN[5].value;
    139141    limitingmag=SimulatorSettingsN[7].value;
    140142    saturationmag=SimulatorSettingsN[6].value;
    141     focallength=SimulatorSettingsN[8].value;   //  focal length of the telescope in millimeters
    142     OAGoffset=SimulatorSettingsN[12].value;    //  An oag is offset this much from center of scope position (arcminutes);
    143     seeing=SimulatorSettingsN[9].value;        //  we get real fat stars in this one
     143    OAGoffset=SimulatorSettingsN[10].value;    //  An oag is offset this much from center of scope position (arcminutes);
    144144
    145145    nbuf = PrimaryCCD.getXRes() * PrimaryCCD.getYRes() * PrimaryCCD.getBPP();
     
    154154
    155155    int nbuf;
    156     SetupParms();
    157156
    158157    if(HasGuideHead)
     
    191190    IUFillNumber(&SimulatorSettingsN[6],"SIM_SATURATION","Saturation Mag","%4.1f",0,20,0,1.0);
    192191    IUFillNumber(&SimulatorSettingsN[7],"SIM_LIMITINGMAG","Limiting Mag","%4.1f",0,20,0,20);
    193     IUFillNumber(&SimulatorSettingsN[8],"SIM_FOCALLENGTH","Focal Length","%4.0f",0,60000,0,1000);
    194     IUFillNumber(&SimulatorSettingsN[9],"SIM_FWHM","FWHM (arcseconds)","%4.2f",0,60,0,3.5);
    195     IUFillNumber(&SimulatorSettingsN[10],"SIM_NOISE","CCD Noise","%4.0f",0,6000,0,50);
    196     IUFillNumber(&SimulatorSettingsN[11],"SIM_SKYGLOW","Sky Glow (magnitudes)","%4.1f",0,6000,0,19.5);
    197     IUFillNumber(&SimulatorSettingsN[12],"SIM_OAGOFFSET","Oag Offset (arminutes)","%4.1f",0,6000,0,0);
    198     IUFillNumberVector(SimulatorSettingsNV,SimulatorSettingsN,13,deviceName(),"SIMULATOR_SETTINGS","Simulator Settings","Simulator Config",IP_RW,60,IPS_IDLE);
     192    IUFillNumber(&SimulatorSettingsN[8],"SIM_NOISE","CCD Noise","%4.0f",0,6000,0,50);
     193    IUFillNumber(&SimulatorSettingsN[9],"SIM_SKYGLOW","Sky Glow (magnitudes)","%4.1f",0,6000,0,19.5);
     194    IUFillNumber(&SimulatorSettingsN[10],"SIM_OAGOFFSET","Oag Offset (arminutes)","%4.1f",0,6000,0,0);
     195    IUFillNumberVector(SimulatorSettingsNV,SimulatorSettingsN,11,getDeviceName(),"SIMULATOR_SETTINGS","Simulator Settings","Simulator Config",IP_RW,60,IPS_IDLE);
    199196
    200197
     
    202199    IUFillSwitch(&TimeFactorS[1],"10X","10x",ISS_OFF);
    203200    IUFillSwitch(&TimeFactorS[2],"100X","100x",ISS_OFF);
    204     IUFillSwitchVector(TimeFactorSV,TimeFactorS,3,deviceName(),"ON_TIME_FACTOR","Time Factor","Simulator Config",IP_RW,ISR_1OFMANY,60,IPS_IDLE);
    205 
    206 
    207     //loadConfig();
     201    IUFillSwitchVector(TimeFactorSV,TimeFactorS,3,getDeviceName(),"ON_TIME_FACTOR","Time Factor","Simulator Config",IP_RW,ISR_1OFMANY,60,IPS_IDLE);
     202
     203    IUFillNumber(&FWHMN[0],"SIM_FWHM","FWHM (arcseconds)","%4.2f",0,60,0,7.5);
     204    IUFillNumberVector(&FWHMNP,FWHMN,1,"Focuser Simulator", "FWHM","FWHM",OPTIONS_TAB,IP_RO,60,IPS_IDLE);
     205
     206    IUFillNumber(&ScopeParametersN[0],"TELESCOPE_APERTURE","Aperture (mm)","%g",50,4000,0,0.0);
     207    IUFillNumber(&ScopeParametersN[1],"TELESCOPE_FOCAL_LENGTH","Focal Length (mm)","%g",100,10000,0,0.0 );
     208    IUFillNumberVector(&ScopeParametersNP,ScopeParametersN,2,"Telescope Simulator","TELESCOPE_PARAMETERS","Scope Properties",OPTIONS_TAB,IP_RW,60,IPS_OK);
    208209
    209210    return true;
     
    219220    defineNumber(SimulatorSettingsNV);
    220221    defineSwitch(TimeFactorSV);
    221     //IDDefText(&ConfigFileTV, NULL);
    222     //IDDefSwitch(&ConfigSaveRestoreSV, NULL);
    223 
    224222
    225223    return;
     
    231229
    232230    INDI::CCD::updateProperties();
     231
     232    if (isConnected())
     233        SetupParms();
     234
    233235    return true;
    234236}
     
    310312
    311313        PrimaryCCD.setExposure(timeleft);
    312         //ImageExposureN[0].value = timeleft;
    313         //IDSetNumber(ImageExposureNP, NULL);
    314314
    315315        if(timeleft < 1.0)
     
    567567            } else
    568568            {
    569                 IDMessage(deviceName(),"Error looking up stars, is gsc installed with appropriate environment variables set ??");
     569                IDMessage(getDeviceName(),"Error looking up stars, is gsc installed with appropriate environment variables set ??");
    570570                //fprintf(stderr,"Error doing gsc lookup\n");
    571571            }
    572572            if(drawn==0)
    573573            {
    574                 IDMessage(deviceName(),"Got no stars, is gsc installed with appropriate environment variables set ??");
     574                IDMessage(getDeviceName(),"Got no stars, is gsc installed with appropriate environment variables set ??");
    575575
    576576            }
     
    839839    //  first check if it's for our device
    840840    //IDLog("INDI::CCD::ISNewNumber %s\n",name);
    841     if(strcmp(dev,deviceName())==0)
     841    if(strcmp(dev,getDeviceName())==0)
    842842    {
    843843        //  This is for our device
     
    889889    //}
    890890
    891     if(strcmp(dev,deviceName())==0) {
     891    if(strcmp(dev,getDeviceName())==0) {
    892892        //  This one is for us
    893893
     
    924924}
    925925
     926bool CCDSim::ISSnoopDevice (XMLEle *root)
     927{
     928     if (IUSnoopNumber(root,&FWHMNP)==0)
     929     {
     930           seeing = FWHMNP.np[0].value;
     931           IDLog("CCD Simulator: New FWHM value of %g\n", seeing);
     932           return true;
     933     }
     934
     935     if (IUSnoopNumber(root,&ScopeParametersNP)==0)
     936     {
     937           focallength = ScopeParametersNP.np[1].value;
     938           IDLog("CCD Simulator: New focalLength value of %g\n", focallength);
     939           return true;
     940     }
     941
     942     return INDI::CCD::ISSnoopDevice(root);
     943}
  • BAORadio/libindi/libindi/drivers/ccd/ccd_simulator.h

    r642 r697  
    7272
    7373        INumberVectorProperty *SimulatorSettingsNV;
    74         INumber SimulatorSettingsN[13];
     74        INumber SimulatorSettingsN[11];
    7575
    7676        ISwitch TimeFactorS[3];
     
    7878
    7979        bool SetupParms();
     80
     81        //  We are going to snoop these from focuser
     82        INumberVectorProperty FWHMNP;
     83        INumber FWHMN[1];
     84
     85        // We are going to snoop these from telescope
     86        INumber ScopeParametersN[2];
     87        INumberVectorProperty ScopeParametersNP;
    8088
    8189    public:
     
    114122        virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n);
    115123        virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
     124        virtual bool ISSnoopDevice (XMLEle *root);
    116125
    117126};
  • BAORadio/libindi/libindi/drivers/filter_wheel/filter_simulator.cpp

    r642 r697  
    1919#include "filter_simulator.h"
    2020
     21#include <memory>
    2122
    2223// We declare an auto pointer to FilterSim.
     
    99100    CurrentFilter=1;
    100101    MinFilter=1;
    101     MaxFilter=7;
     102    MaxFilter=5;
     103    FilterSlotN[0].max = MaxFilter;
    102104    return true;
    103105}
     
    119121    SelectFilterDone(CurrentFilter);
    120122}
     123
     124bool FilterSim::GetFilterNames(const char* groupName)
     125{
     126    char filterName[MAXINDINAME];
     127    char filterLabel[MAXINDILABEL];
     128
     129    const char *filterDesignation[5] = { "Red", "Green", "Blue", "H Alpha", "Luminosity" };
     130
     131    if (FilterNameT != NULL)
     132        delete FilterNameT;
     133
     134    FilterNameT = new IText[MaxFilter];
     135
     136    for (int i=0; i < MaxFilter; i++)
     137    {
     138        snprintf(filterName, MAXINDINAME, "FILTER_SLOT_NAME_%d", i+1);
     139        snprintf(filterLabel, MAXINDILABEL, "Filter #%d", i+1);
     140        IUFillText(&FilterNameT[i], filterName, filterLabel, filterDesignation[i]);
     141    }
     142
     143    IUFillTextVector(FilterNameTP, FilterNameT, MaxFilter, getDeviceName(), "FILTER_NAME", "Filter", groupName, IP_RW, 0, IPS_IDLE);
     144
     145    return true;
     146}
  • BAORadio/libindi/libindi/drivers/filter_wheel/filter_simulator.h

    r642 r697  
    3838
    3939        virtual bool SetFilterNames() { return false; }
    40         virtual bool GetFilterNames(const char *deviceName, const char* groupName) { return false; }
     40        virtual bool GetFilterNames(const char* groupName);
    4141
    4242
  • BAORadio/libindi/libindi/drivers/focuser/robofocus.cpp

    r646 r697  
    2626#include <string.h>
    2727#include <sys/time.h>
     28#include <unistd.h>
     29#include <memory>
    2830
    2931#define RF_MAX_CMD   9
     
    102104 {
    103105     ISInit();
    104      roboFocus->ISSnoopDevice(root);
    105106 }
    106107
     
    127128    /* Port */
    128129    IUFillText(&PortT[0], "PORT", "Port", "/dev/ttyUSB0");
    129     IUFillTextVector(&PortTP, PortT, 1, deviceName(), "DEVICE_PORT", "Ports", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
     130    IUFillTextVector(&PortTP, PortT, 1, getDeviceName(), "DEVICE_PORT", "Ports", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
    130131
    131132
    132133    /* Focuser temperature */
    133134    IUFillNumber(&TemperatureN[0], "TEMPERATURE", "Celsius", "%6.2f", 0, 65000., 0., 10000.);
    134     IUFillNumberVector(&TemperatureNP, TemperatureN, 1, deviceName(), "FOCUS_TEMPERATURE", "Temperature", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE);
     135    IUFillNumberVector(&TemperatureNP, TemperatureN, 1, getDeviceName(), "FOCUS_TEMPERATURE", "Temperature", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE);
    135136
    136137    /* Settings of the Robofocus */
     
    138139    IUFillNumber(&SettingsN[1], "Step Delay", "Step delay", "%6.0f", 0., 255., 0., 1.0);
    139140    IUFillNumber(&SettingsN[2], "Motor Steps", "Motor steps per tick", "%6.0f", 0., 255., 0., 1.0);
    140     IUFillNumberVector(&SettingsNP, SettingsN, 3, deviceName(), "FOCUS_SETTINGS", "Settings", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
     141    IUFillNumberVector(&SettingsNP, SettingsN, 3, getDeviceName(), "FOCUS_SETTINGS", "Settings", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
    141142
    142143    /* Power Switches of the Robofocus */
     
    145146    IUFillSwitch(&PowerSwitchesS[2], "3", "Switch 3", ISS_OFF);
    146147    IUFillSwitch(&PowerSwitchesS[3], "4", "Switch 4", ISS_ON);
    147     IUFillSwitchVector(&PowerSwitchesSP, PowerSwitchesS, 4, deviceName(), "SWTICHES", "Power", OPTIONS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE);
     148    IUFillSwitchVector(&PowerSwitchesSP, PowerSwitchesS, 4, getDeviceName(), "SWTICHES", "Power", OPTIONS_TAB, IP_RW, ISR_1OFMANY, 0, IPS_IDLE);
    148149
    149150    /* Robofocus should stay within these limits */
    150151    IUFillNumber(&MinMaxPositionN[0], "MINPOS", "Minimum Tick", "%6.0f", 1., 65000., 0., 100. );
    151152    IUFillNumber(&MinMaxPositionN[1], "MAXPOS", "Maximum Tick", "%6.0f", 1., 65000., 0., 55000.);
    152     IUFillNumberVector(&MinMaxPositionNP, MinMaxPositionN, 2, deviceName(), "FOCUS_MINMAXPOSITION", "Extrama", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
     153    IUFillNumberVector(&MinMaxPositionNP, MinMaxPositionN, 2, getDeviceName(), "FOCUS_MINMAXPOSITION", "Extrama", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
    153154
    154155    IUFillNumber(&MaxTravelN[0], "MAXTRAVEL", "Maximum travel", "%6.0f", 1., 64000., 0., 10000.);
    155     IUFillNumberVector(&MaxTravelNP, MaxTravelN, 1, deviceName(), "FOCUS_MAXTRAVEL", "Max. travel", OPTIONS_TAB, IP_RW, 0, IPS_IDLE );
     156    IUFillNumberVector(&MaxTravelNP, MaxTravelN, 1, getDeviceName(), "FOCUS_MAXTRAVEL", "Max. travel", OPTIONS_TAB, IP_RW, 0, IPS_IDLE );
    156157
    157158    /* Set Robofocus position register to the this position */
    158159    IUFillNumber(&SetRegisterPositionN[0], "SETPOS", "Position", "%6.0f", 0, 64000., 0., 0. );
    159     IUFillNumberVector(&SetRegisterPositionNP, SetRegisterPositionN, 1, deviceName(), "FOCUS_REGISTERPOSITION", "Set register", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
     160    IUFillNumberVector(&SetRegisterPositionNP, SetRegisterPositionN, 1, getDeviceName(), "FOCUS_REGISTERPOSITION", "Set register", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
    160161
    161162    /* Backlash */
    162163    IUFillNumber(&SetBacklashN[0], "SETBACKLASH", "Backlash", "%6.0f", -255., 255., 0., 0.);
    163     IUFillNumberVector(&SetBacklashNP, SetBacklashN, 1, deviceName(), "FOCUS_BACKLASH", "Set Register", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
     164    IUFillNumberVector(&SetBacklashNP, SetBacklashN, 1, getDeviceName(), "FOCUS_BACKLASH", "Set Register", OPTIONS_TAB, IP_RW, 0, IPS_IDLE);
    164165
    165166    /* Robofocus` position (RO) */
    166167    IUFillNumber(&PositionN[0], "POSITION", "Tick", "%6.0f", 0, 65000., 0., 10000.);
    167     IUFillNumberVector(&PositionNP, PositionN, 1, deviceName(), "FOCUS_POSITION", "Position", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE);
     168    IUFillNumberVector(&PositionNP, PositionN, 1, getDeviceName(), "FOCUS_POSITION", "Position", MAIN_CONTROL_TAB, IP_RO, 0, IPS_IDLE);
    168169
    169170
    170171    /* Relative and absolute movement */
    171172    IUFillNumber(&RelMovementN[0], "RELMOVEMENT", "Ticks", "%6.0f", -65000., 65000., 0., 100. );
    172     IUFillNumberVector(&RelMovementNP, RelMovementN, 1, deviceName(), "FOCUS_RELMOVEMENT", "Relative GoTo", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
     173    IUFillNumberVector(&RelMovementNP, RelMovementN, 1, getDeviceName(), "FOCUS_RELMOVEMENT", "Relative GoTo", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
    173174
    174175    IUFillNumber(&AbsMovementN[0], "ABSMOVEMENT", "Tick", "%6.0f", 0, 65000., 0., 10000.);
    175     IUFillNumberVector(&AbsMovementNP, AbsMovementN, 1, deviceName(), "FOCUS_ABSMOVEMENT", "Absolute GoTo", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
     176    IUFillNumberVector(&AbsMovementNP, AbsMovementN, 1, getDeviceName(), "FOCUS_ABSMOVEMENT", "Absolute GoTo", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
    176177
    177178
     
    245246            IDLog("Failed to connect o port %s. Error: %s", PortT[0].text, errorMsg);
    246247
    247         IDMessage(deviceName(), "Failed to connect to port %s. Error: %s", PortT[0].text, errorMsg);
     248        IDMessage(getDeviceName(), "Failed to connect to port %s. Error: %s", PortT[0].text, errorMsg);
    248249
    249250        return false;
     
    254255    {
    255256      /* This would be the end*/
    256         IDMessage( deviceName(), "Unknown error while reading Robofocus firmware\n");
     257        IDMessage( getDeviceName(), "Unknown error while reading Robofocus firmware\n");
    257258        return false;
    258259    }
    259260
    260     IDMessage(deviceName(), "Robofocus is online. Getting focus parameters...");
     261    IDMessage(getDeviceName(), "Robofocus is online. Getting focus parameters...");
    261262
    262263    GetFocusParams();
    263264
    264     IDMessage(deviceName(), "RoboFocus paramaters readout complete, focuser ready for use.");
     265    IDMessage(getDeviceName(), "RoboFocus paramaters readout complete, focuser ready for use.");
    265266
    266267    return true;
     
    270271{
    271272    tty_disconnect(PortFD);
    272     IDMessage(deviceName(), "RoboFocus is offline.");
     273    IDMessage(getDeviceName(), "RoboFocus is offline.");
    273274    return true;
    274275}
     
    390391              {
    391392                  IDLog("TTY error detected: %s\n", robofocus_error);
    392                   IDMessage(deviceName(), "TTY error detected: %s\n", robofocus_error);
     393                  IDMessage(getDeviceName(), "TTY error detected: %s\n", robofocus_error);
    393394              }
    394395              return false;
     
    848849bool RoboFocus::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
    849850{
    850     if(strcmp(dev,deviceName())==0)
     851    if(strcmp(dev,getDeviceName())==0)
    851852    {
    852853        // ===================================
     
    870871bool RoboFocus::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
    871872{
    872     if(strcmp(dev,deviceName())==0)
     873    if(strcmp(dev,getDeviceName())==0)
    873874    {
    874875        if (!strcmp (name, PowerSwitchesSP.name))
     
    951952    int nset=0,i=0;
    952953
    953     if(strcmp(dev,deviceName())==0)
     954    if(strcmp(dev,getDeviceName())==0)
    954955    {
    955956
     
    10861087                IDSetNumber(&PositionNP, "Robofocus position recovered %5.0f", currentPosition);
    10871088
    1088                 IDMessage( deviceName(), "Robofocus position recovered resuming normal operation");
     1089                IDMessage( getDeviceName(), "Robofocus position recovered resuming normal operation");
    10891090
    10901091                /* We have to leave here, because new_rpos is not set */
     
    11701171                PositionNP.s = IPS_OK;
    11711172                IDSetNumber(&PositionNP, "Robofocus position recovered %5.0f", currentPosition);
    1172                 IDMessage( deviceName(), "Robofocus position recovered resuming normal operation");
     1173                IDMessage( getDeviceName(), "Robofocus position recovered resuming normal operation");
    11731174                /* We have to leave here, because new_apos is not set */
    11741175                return false;
     
    14051406                PositionNP.s = IPS_OK;
    14061407                IDSetNumber(&PositionNP, "Robofocus position recovered %5.0f", currentPosition);
    1407                 IDMessage( deviceName(), "Robofocus position recovered resuming normal operation");
     1408                IDMessage( getDeviceName(), "Robofocus position recovered resuming normal operation");
    14081409                /* We have to leave here, because new_apos is not set */
    14091410                return true ;
  • BAORadio/libindi/libindi/drivers/focuser/tcfs.cpp

    r642 r697  
    156156    static int propInit=0;
    157157
    158     INDI::DefaultDriver::ISGetProperties(dev);
     158    INDI::DefaultDevice::ISGetProperties(dev);
    159159
    160160    if (propInit == 0)
     
    239239    if (tty_connect(tProp->tp[0].text, 19200, 8, 0, 1, &fd) != TTY_OK)
    240240    {
    241         IDMessage(deviceName(), "Error connecting to port %s. Make sure you have BOTH read and write permission to the port.", tProp->tp[0].text);
     241        IDMessage(getDeviceName(), "Error connecting to port %s. Make sure you have BOTH read and write permission to the port.", tProp->tp[0].text);
    242242        return false;
    243243    }
     
    251251            if (!strcmp(response, "!"))
    252252            {
    253                 IDMessage(deviceName(), "Successfully connected to TCF-S Focuser in Manual Mode.");
     253                IDMessage(getDeviceName(), "Successfully connected to TCF-S Focuser in Manual Mode.");
    254254
    255255                IUResetSwitch(FocusModeSP);
     
    274274    }
    275275
    276     IDMessage(deviceName(), "Error connecting to TCF-S focuser...");
     276    IDMessage(getDeviceName(), "Error connecting to TCF-S focuser...");
    277277    return false;
    278278
     
    316316  {
    317317      resetProperties();
    318       IDMessage(deviceName(), "TCF-S is offline. Connect before issiung any commands.");
     318      IDMessage(getDeviceName(), "TCF-S is offline. Connect before issiung any commands.");
    319319      return false;
    320320  }
     
    355355  }
    356356
    357   return DefaultDriver::ISNewNumber (dev, name, values, names, n);
     357  return DefaultDevice::ISNewNumber (dev, name, values, names, n);
    358358   
    359359}
     
    383383
    384384
    385     return DefaultDriver::ISNewText(dev, name, texts, names, n);
     385    return DefaultDevice::ISNewText(dev, name, texts, names, n);
    386386       
    387387}
     
    396396    ISwitch *current_active_switch = NULL, *target_active_switch = NULL;
    397397    // First process parent!
    398     if (INDI::DefaultDriver::ISNewSwitch(deviceName(), name, states, names, n) == true)
     398    if (INDI::DefaultDevice::ISNewSwitch(getDeviceName(), name, states, names, n) == true)
    399399        return true;
    400400
     
    417417    {
    418418      resetProperties();
    419       IDMessage(deviceName(), "TCF-S is offline. Connect before issiung any commands.");
     419      IDMessage(getDeviceName(), "TCF-S is offline. Connect before issiung any commands.");
    420420      return false;
    421421    }
     
    664664
    665665
    666     return DefaultDriver::ISNewSwitch(dev, name, states, names, n);
     666    return DefaultDevice::ISNewSwitch(dev, name, states, names, n);
    667667}
    668668
  • BAORadio/libindi/libindi/drivers/focuser/tcfs.h

    r642 r697  
    2727#include <indidevapi.h>
    2828#include <indicom.h>
    29 #include <indibase/defaultdriver.h>
     29#include <indibase/defaultdevice.h>
    3030
    3131using namespace std;
     
    3535#define TCFS_ERROR_BUFFER   1024
    3636
    37 class TCFS : public INDI::DefaultDriver
     37class TCFS : public INDI::DefaultDevice
    3838{
    3939
  • BAORadio/libindi/libindi/drivers/telescope/BAO.cpp

    r695 r697  
    652652            else if (chaine[0] == 'M')
    653653            {
    654                 IDSetText(&CommandTP, "Calcul des matrices de correction\n" );
    655 
    656                 if  (Sockets[targetAlignmentIP].AlignementAntenne->nbrcorrections >=3 )
     654                if (targetAlignmentIP != -1)
    657655                {
    658                     Sockets[targetAlignmentIP].AlignementAntenne->AlignementEnCours = 0;
    659                    
    660                     Sockets[targetAlignmentIP].AlignementAntenne->InitParametresInstrument();
    661                    
    662                     Sockets[targetAlignmentIP].AlignementAntenne->CalculerMatriceCorrection(targetRA, targetDEC);
    663                    
    664                      Sockets[targetAlignmentIP].AlignementAntenne->EnregistrementParametresAlignement(
     656                    IDSetText(&CommandTP, "Calcul des matrices de correction\n" );
     657
     658                    if  (Sockets[targetAlignmentIP].AlignementAntenne->nbrcorrections >=3 )
     659                    {
     660                        Sockets[targetAlignmentIP].AlignementAntenne->AlignementEnCours = 0;
     661
     662                        Sockets[targetAlignmentIP].AlignementAntenne->InitParametresInstrument();
     663
     664                        Sockets[targetAlignmentIP].AlignementAntenne->CalculerMatriceCorrection(targetRA, targetDEC);
     665
     666                        Sockets[targetAlignmentIP].AlignementAntenne->EnregistrementParametresAlignement(
     667                            Sockets[targetAlignmentIP].IP,
     668                            "/home/" + (string)getenv("USER") + "/AlignementAntennes.cfg");
     669                    }
     670                    else
     671                    {
     672                        Sockets[targetAlignmentIP].AlignementAntenne->Identity();
     673
     674                        Sockets[targetAlignmentIP].AlignementAntenne->Matrice_ok = false;
     675                    }
     676                }
     677            }
     678            else if (chaine[0] == 'R')
     679            {
     680                if (targetAlignmentIP != -1)
     681                {
     682                    IDSetText(&CommandTP, "Reinitialisation de la matrice de correction\n" );
     683
     684                    Sockets[targetAlignmentIP].AlignementAntenne->InitParametresInstrument();
     685
     686                    Sockets[targetAlignmentIP].AlignementAntenne->Identity();
     687
     688                    Sockets[targetAlignmentIP].AlignementAntenne->Matrice_ok = false;
     689
     690                    Sockets[targetAlignmentIP].AlignementAntenne->EnregistrementParametresAlignement(
    665691                        Sockets[targetAlignmentIP].IP,
    666692                        "/home/" + (string)getenv("USER") + "/AlignementAntennes.cfg");
    667693                }
    668                 else
    669                 {
    670                     Sockets[targetAlignmentIP].AlignementAntenne->Identity();
    671 
    672                     Sockets[targetAlignmentIP].AlignementAntenne->Matrice_ok = false;
    673                 }
    674             }
    675             else if (chaine[0] == 'R')
    676             {
    677                 IDSetText(&CommandTP, "Reinitialisation de la matrice de correction\n" );
    678 
    679                  Sockets[targetAlignmentIP].AlignementAntenne->InitParametresInstrument();
    680                  
    681                  Sockets[targetAlignmentIP].AlignementAntenne->Identity();
    682 
    683                 Sockets[targetAlignmentIP].AlignementAntenne->Matrice_ok = false;
    684                
    685                  Sockets[targetAlignmentIP].AlignementAntenne->EnregistrementParametresAlignement(
    686                         Sockets[targetAlignmentIP].IP,
    687                         "/home/" + (string)getenv("USER") + "/AlignementAntennes.cfg");
    688             }
     694            }
    689695            else if (chaine[0] == 'O')
    690696            {
    691                 IDSetText(&CommandTP, "Optimisation de la geometrie de l antenne\n" );
    692 
    693697                if (targetAlignmentIP != -1)
    694698                {
     699                    IDSetText(&CommandTP, "Optimisation de la geometrie de l antenne\n" );
     700
    695701                    Sockets[targetAlignmentIP].AlignementAntenne->OptimisationGeometrieAntenne(true);
    696702
     
    17981804
    17991805                    double az, ha, ad, de;
    1800                    
     1806
    18011807                    int num = Sockets[i].AlignementAntenne->nbrcorrections;
    18021808
  • BAORadio/libindi/libindi/drivers/telescope/celestrongps.cpp

    r642 r697  
    447447         
    448448          if (IUUpdateSwitch(&OnCoordSetSP, states, names, n) < 0) return;
     449          OnCoordSetSP.s = IPS_OK;
     450          IDSetSwitch(&OnCoordSetSP, NULL);
    449451          currentSet = getOnSwitch(&OnCoordSetSP);
    450452        }
     
    524526         last_move = getOnSwitch(&MovementNSSP);
    525527
    526          if (IUUpdateSwitch(&MovementNSSP, states, names, n) < 0)
    527         IDLog("fixme!!! - IUUpdateSwitch MovementNSSP\n");
    528         //      return;
     528         IUUpdateSwitch(&MovementNSSP, states, names, n);
    529529
    530530        current_move = getOnSwitch(&MovementNSSP);
  • BAORadio/libindi/libindi/drivers/telescope/lx200basic.cpp

    r501 r697  
    4545
    4646const int POLLMS = 1000;                                // Period of update, 1 second.
    47 const char *mydev = "LX200 Basic";                      // Name of our device.
     47char *mydev;                            // Name of our device.
    4848
    4949const char *BASIC_GROUP    = "Main Control";            // Main Group
     
    151151LX200Basic::LX200Basic()
    152152{
     153    mydev = new char[MAXINDIDEVICE];
     154
     155    char *envDev = getenv("INDIDEV");
     156
     157    if (envDev != NULL)
     158        strncpy(mydev, envDev, MAXINDIDEVICE);
     159    else
     160        strncpy(mydev, "LX200 Basic", MAXINDIDEVICE);
     161
    153162   init_properties();
    154163
  • BAORadio/libindi/libindi/drivers/telescope/lx200fs2.cpp

    r646 r697  
    6464
    6565   IDLog("Initilizing from LX200 FS2 device...\n");
    66    IDLog("Driver Version: 2011-01-02\n");
     66   IDLog("Driver Version: 2012-07-22\n");
    6767 
    6868   //enableSimulation(true); 
     
    151151 
    152152  if (FirmwareVerNP.np[0].value < 1.19)
    153         return getLX200RA(fd, &x); // Version 1.18 and below don't support ACK command
     153  {
     154        getLX200RA(fd, &x);
     155        return getLX200DEC(fd, &x); // Version 1.18 and below don't support ACK command
     156  }
    154157  else
    155158        return check_lx200_connection(fd);
     
    216219void LX200Fs2::getBasicData()
    217220{
    218 
    219   // process parent first
    220    LX200Generic::getBasicData();
     221  //LX200Generic::getBasicData()
    221222  // Make sure short
    222223  //checkLX200Format(fd);
  • BAORadio/libindi/libindi/drivers/telescope/lx200generic.cpp

    r642 r697  
    507507
    508508 }
    509 
     509 IEAddTimer (POLLMS, ISPoll, NULL);
    510510}
    511511
    512512void ISGetProperties (const char *dev)
    513 { ISInit(); telescope->ISGetProperties(dev); IEAddTimer (POLLMS, ISPoll, NULL);}
     513{ ISInit(); telescope->ISGetProperties(dev);}
    514514void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
    515515{ ISInit(); telescope->ISNewSwitch(dev, name, states, names, n);}
     
    555555   IDLog("INDI Library v%g\n", INDI_LIBV);
    556556   IDLog("initilizaing from generic LX200 device...\n");
    557    IDLog("Driver Version: 2008-05-21\n");
     557   IDLog("Driver Version: 2012-07-27\n");
    558558 
    559    //enableSimulation(true); 
     559   //enableSimulation(true);
    560560}
    561561
     
    17501750                mountSim();
    17511751                return;
    1752         }
     1752        }
    17531753
    17541754        if ( (err = getLX200RA(fd, &currentRA)) < 0 || (err = getLX200DEC(fd, &currentDEC)) < 0)
     
    17771777        break;
    17781778
    1779         case IPS_BUSY:
     1779        case IPS_BUSY:
    17801780            dx = targetRA - currentRA;
    17811781            dy = targetDEC - currentDEC;
     
    17891789               EquatorialCoordsWNP.s = IPS_OK;
    17901790               IDSetNumber(&EquatorialCoordsWNP, "Slew is complete, target locked...");
    1791               
    1792             break;
     1791                } 
     1792                break;
    17931793
    17941794        case IPS_OK:
     
    18011801}
    18021802
    1803 }
     1803
    18041804// wildi nothing changed in LX200Generic::mountSim
    18051805void LX200Generic::mountSim ()
     
    21172117        }
    21182118       
     2119         tty_disconnect(fd); // Close if already open
    21192120         if (tty_connect(PortTP.tp[0].text, 9600, 8, 0, 1, &fd) != TTY_OK)
    21202121         {
  • BAORadio/libindi/libindi/drivers/telescope/magellan1.cpp

    r646 r697  
    9898void ISInit()
    9999{
     100  static int isInit=0;
     101       
     102  if (isInit)
     103          return;
    100104  if (telescope == NULL)
    101105  {
     
    104108    telescope->setCurrentDeviceName(mydev);
    105109  }
     110 
     111  isInit = 1;
     112  IEAddTimer (POLLMS, ISPoll, NULL);
    106113}
    107114
    108115void ISGetProperties (const char *dev)
    109 { ISInit(); telescope->ISGetProperties(dev); IEAddTimer (POLLMS, ISPoll, NULL);}
     116{ ISInit(); telescope->ISGetProperties(dev);}
    110117
    111118void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
  • BAORadio/libindi/libindi/drivers/telescope/synscanmount.cpp

    r642 r697  
    119119void SynscanMount::ISGetProperties (const char *dev)
    120120{
    121     //if (isDebug())
    122         IDLog("Enter SynscanMount::ISGetProperties %s\n",dev);
    123 
    124121    //  First we let our parent class do it's thing
    125122    INDI::Telescope::ISGetProperties(dev);
     
    147144        //  this is not a correct echo
    148145        //if (isDebug())
    149             IDLog("ReadStatus Echo Fail\n");
    150         IDMessage(deviceName(),"Mount Not Responding");
     146            IDLog("ReadStatus Echo Fail. %s\n", str);
     147        IDMessage(getDeviceName(),"Mount Not Responding");
    151148        return false;
    152149    }
     
    183180            ParkSV->s=IPS_OK;
    184181            IDSetSwitch(ParkSV,NULL);
    185             IDMessage(deviceName(),"Telescope is Parked.");
     182            IDMessage(getDeviceName(),"Telescope is Parked.");
    186183        }
    187184
     
    276273
    277274    TrackState=SCOPE_PARKING;
    278     IDMessage(deviceName(),"Parking Telescope...");
    279     return true;
    280 }
     275    IDMessage(getDeviceName(),"Parking Telescope...");
     276    return true;
     277}
  • BAORadio/libindi/libindi/drivers/telescope/telescope_simulator.cpp

    r642 r697  
    99#include "telescope_simulator.h"
    1010#include "indicom.h"
     11
     12#include <memory>
    1113
    1214// We declare an auto pointer to ScopeSim.
     
    126128    IUFillNumber(&GuideNSN[GUIDE_NORTH], "TIMED_GUIDE_N", "North (sec)", "%g", 0, 10, 0.001, 0);
    127129    IUFillNumber(&GuideNSN[GUIDE_SOUTH], "TIMED_GUIDE_S", "South (sec)", "%g", 0, 10, 0.001, 0);
    128     IUFillNumberVector(GuideNSNP, GuideNSN, 2, deviceName(), "TELESCOPE_TIMED_GUIDE_NS", "Guide North/South", MOTION_TAB, IP_RW, 0, IPS_IDLE);
     130    IUFillNumberVector(GuideNSNP, GuideNSN, 2, getDeviceName(), "TELESCOPE_TIMED_GUIDE_NS", "Guide North/South", MOTION_TAB, IP_RW, 0, IPS_IDLE);
    129131
    130132    /* Property for guider support. How many seconds to guide either westward or eastward? */
    131133    IUFillNumber(&GuideWEN[GUIDE_WEST], "TIMED_GUIDE_W", "West (sec)", "%g", 0, 10, 0.001, 0);
    132134    IUFillNumber(&GuideWEN[GUIDE_EAST], "TIMED_GUIDE_E", "East (sec)", "%g", 0, 10, 0.001, 0);
    133     IUFillNumberVector(GuideWENP, GuideWEN, 2, deviceName(), "TELESCOPE_TIMED_GUIDE_WE", "Guide West/East", MOTION_TAB, IP_RW, 0, IPS_IDLE);
     135    IUFillNumberVector(GuideWENP, GuideWEN, 2, getDeviceName(), "TELESCOPE_TIMED_GUIDE_WE", "Guide West/East", MOTION_TAB, IP_RW, 0, IPS_IDLE);
    134136
    135137    /* Simulated periodic error in RA, DEC */
    136138    IUFillNumber(&EqPECN[RA_AXIS],"RA_PEC","RA (hh:mm:ss)","%010.6m",0,24,0,15.);
    137139    IUFillNumber(&EqPECN[DEC_AXIS],"DEC_PEC","DEC (dd:mm:ss)","%010.6m",-90,90,0,15.);
    138     IUFillNumberVector(EqPECNV,EqPECN,2,deviceName(),"EQUATORIAL_PEC","Periodic Error",MOTION_TAB,IP_RO,60,IPS_IDLE);
     140    IUFillNumberVector(EqPECNV,EqPECN,2,getDeviceName(),"EQUATORIAL_PEC","Periodic Error",MOTION_TAB,IP_RO,60,IPS_IDLE);
    139141
    140142    /* Enable client to manually add periodic error northward or southward for simulation purposes */
    141143    IUFillSwitch(&PECErrNSS[MOTION_NORTH], "PEC_N", "North", ISS_OFF);
    142144    IUFillSwitch(&PECErrNSS[MOTION_SOUTH], "PEC_S", "South", ISS_OFF);
    143     IUFillSwitchVector(PECErrNSSP, PECErrNSS, 2, deviceName(),"PEC_NS", "PE N/S", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
     145    IUFillSwitchVector(PECErrNSSP, PECErrNSS, 2, getDeviceName(),"PEC_NS", "PE N/S", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
    144146
    145147    /* Enable client to manually add periodic error westward or easthward for simulation purposes */
    146148    IUFillSwitch(&PECErrWES[MOTION_WEST], "PEC_W", "West", ISS_OFF);
    147149    IUFillSwitch(&PECErrWES[MOTION_EAST], "PEC_E", "East", ISS_OFF);
    148     IUFillSwitchVector(PECErrWESP, PECErrWES, 2, deviceName(),"PEC_WE", "PE W/E", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
     150    IUFillSwitchVector(PECErrWESP, PECErrWES, 2, getDeviceName(),"PEC_WE", "PE W/E", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
    149151
    150152    /* How fast do we guide compared to sideral rate */
    151153    IUFillNumber(&GuideRateN[RA_AXIS], "GUIDE_RATE_WE", "W/E Rate", "%g", 0, 1, 0.1, 0.3);
    152154    IUFillNumber(&GuideRateN[DEC_AXIS], "GUIDE_RATE_NS", "N/S Rate", "%g", 0, 1, 0.1, 0.3);
    153     IUFillNumberVector(GuideRateNP, GuideRateN, 2, deviceName(), "GUIDE_RATE", "Guiding Rate", MOTION_TAB, IP_RW, 0, IPS_IDLE);
     155    IUFillNumberVector(GuideRateNP, GuideRateN, 2, getDeviceName(), "GUIDE_RATE", "Guiding Rate", MOTION_TAB, IP_RW, 0, IPS_IDLE);
     156
     157    // Let's simulate it to be an F/10 8" telescope
     158    ScopeParametersN[0].value = 203;
     159    ScopeParametersN[1].value = 2000;
     160
     161    TrackState=SCOPE_IDLE;
    154162
    155163    /* Add debug controls so we may debug driver if necessary */
     
    197205        deleteProperty(EqPECNV->name);
    198206        deleteProperty(PECErrNSSP->name);
    199         deleteProperty(PECErrNSSP->name);
     207        deleteProperty(PECErrWESP->name);
    200208        deleteProperty(GuideRateNP->name);
    201209    }
     
    218226}
    219227
    220 bool ScopeSim::Connect(char *)
    221 {
    222     return true;
     228bool ScopeSim::Connect(char *port)
     229{
     230   return true;
    223231}
    224232
     
    292300    switch (TrackState)
    293301    {
    294     case SCOPE_IDLE:
     302    /*case SCOPE_IDLE:
    295303        EqNV->s = IPS_IDLE;
    296         break;
     304        break;*/
    297305    case SCOPE_SLEWING:
    298306    case SCOPE_PARKING:
     
    340348
    341349                EqNV->s = IPS_OK;
    342                 IDMessage(deviceName(), "Telescope slew is complete. Tracking...");
     350                IDMessage(getDeviceName(), "Telescope slew is complete. Tracking...");
    343351            }
    344352            else
     
    346354                TrackState = SCOPE_PARKED;
    347355                EqNV->s = IPS_IDLE;
    348                 IDMessage(deviceName(), "Telescope parked successfully.");
     356                IDMessage(getDeviceName(), "Telescope parked successfully.");
    349357            }
    350358        }
     
    352360        break;
    353361
     362    case SCOPE_IDLE:
    354363    case SCOPE_TRACKING:
    355364        /* tracking */
     
    491500    EqNV->s    = IPS_BUSY;
    492501
    493     IDMessage(deviceName(), "Slewing to RA: %s - DEC: %s", RAStr, DecStr);
     502    IDMessage(getDeviceName(), "Slewing to RA: %s - DEC: %s", RAStr, DecStr);
    494503    return true;
     504}
     505
     506bool ScopeSim::Sync(double ra, double dec)
     507{
     508    currentRA  = ra;
     509    currentDEC = dec;
     510
     511    EqPECN[RA_AXIS].value = ra;
     512    EqPECN[DEC_AXIS].value = dec;
     513    IDSetNumber(EqPECNV, NULL);
     514
     515    IDMessage(getDeviceName(), "Sync is successful.");
     516
     517    TrackState = SCOPE_IDLE;
     518    EqReqNV->s = IPS_OK;
     519    EqNV->s    = IPS_OK;
     520
     521
     522    NewRaDec(currentRA, currentDEC);
    495523}
    496524
     
    501529    Parked=true;
    502530    TrackState = SCOPE_PARKING;
    503     IDMessage(deviceName(), "Parking telescope in progress...");
     531    IDMessage(getDeviceName(), "Parking telescope in progress...");
    504532    return true;
    505533}
     
    509537    //  first check if it's for our device
    510538
    511     if(strcmp(dev,deviceName())==0)
     539    if(strcmp(dev,getDeviceName())==0)
    512540    {
    513541        //  This is for our device
     
    517545
    518546             // Unless we're in track mode, we don't obey guide commands.
    519              if (TrackState != SCOPE_TRACKING)
    520              {
    521                 GuideNSNP->s = IPS_IDLE;
    522                  IDSetNumber(GuideNSNP, NULL);
    523                  return true;
    524              }
     547             //if (TrackState != SCOPE_TRACKING)
     548             //{
     549                // GuideNSNP->s = IPS_IDLE;
     550                 //IDSetNumber(GuideNSNP, NULL);
     551                 //return true;
     552             //}
    525553
    526554             IUUpdateNumber(GuideNSNP, values, names, n);
     
    532560         {
    533561             // Unless we're in track mode, we don't obey guide commands.
    534              if (TrackState != SCOPE_TRACKING)
    535              {
    536                  GuideWENP->s = IPS_IDLE;
    537                  IDSetNumber(GuideWENP, NULL);
    538                  return true;
    539              }
     562             //if (TrackState != SCOPE_TRACKING)
     563             //{
     564                 //GuideWENP->s = IPS_IDLE;
     565                 //IDSetNumber(GuideWENP, NULL);
     566                 //return true;
     567             //}
    540568
    541569             IUUpdateNumber(GuideWENP, values, names, n);
     
    566594    //}
    567595
    568     if(strcmp(dev,deviceName())==0)
     596    if(strcmp(dev,getDeviceName())==0)
    569597    {
    570598        if(strcmp(name,"PEC_NS")==0)
  • BAORadio/libindi/libindi/drivers/telescope/telescope_simulator.h

    r642 r697  
    1818        INumber GuideNSN[2];
    1919        INumberVectorProperty *GuideNSNP;
    20 
    2120
    2221        INumber GuideWEN[2];
     
    5655        bool Goto(double,double);
    5756        bool Park();
     57        bool Sync(double ra, double dec);
    5858
    5959};
  • BAORadio/libindi/libindi/drivers/telescope/temmadriver.c

    r642 r697  
    3434#include <config.h>
    3535
    36 #include <libnova.h>
     36//le fichier include était à l'origine <libnova.h>
     37#include <libnova/libnova.h>
    3738
    3839#include "indicom.h"
  • BAORadio/libindi/libindi/drivers/video/indi_v4l.cpp

    r490 r697  
    3030  {
    3131    MainCam = new V4L_Driver();
    32     MainCam->initProperties("Video4Linux Generic Device");
     32    MainCam->initProperties("Generic Video4Linux");
    3333    MainCam->initCamBase();
    3434  }
  • BAORadio/libindi/libindi/drivers/video/v4ldriver.cpp

    r642 r697  
    7474  /* Expose */
    7575  IUFillNumber(&ExposeTimeN[0], "CCD_EXPOSURE_VALUE", "Duration (s)", "%5.2f", 0., 36000., 0.5, 1.);
    76   IUFillNumberVector(&ExposeTimeNP, ExposeTimeN, NARRAY(ExposeTimeN), dev, "CCD_EXPOSURE", "Expose", COMM_GROUP, IP_RW, 60, IPS_IDLE);
     76  IUFillNumberVector(&ExposeTimeNP, ExposeTimeN, NARRAY(ExposeTimeN), dev, "CCD_EXPOSURE_REQUEST", "Expose", COMM_GROUP, IP_RW, 60, IPS_IDLE);
    7777
    7878/* Frame Rate */
     
    130130void V4L_Driver::initCamBase()
    131131{
    132    #ifndef HAVE_LINUX_VIDEODEV2_H
    133     v4l_base = new V4L1_Base();
    134    #else
    135132    v4l_base = new V4L2_Base();
    136    #endif
    137133}
    138134
     
    218214       
    219215         
     216       v4l_base->stop_capturing(errmsg);
     217
    220218       if (StreamS[0].s == ISS_ON)
    221219       {
     
    373371         return;
    374372   
    375         if (StreamS[0].s == ISS_ON)
    376           v4l_base->stop_capturing(errmsg);
     373        //if (StreamS[0].s == ISS_ON)
     374    v4l_base->stop_capturing(errmsg);
    377375
    378376        StreamS[0].s  = ISS_OFF;
  • BAORadio/libindi/libindi/drivers/video/v4lphilips.cpp

    r490 r697  
    125125void V4L_Philips::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
    126126{
    127         /* ignore if not ours */
     127    /* ignore if not ours */
    128128     if (dev && strcmp (device_name, dev))
    129         return;
     129    return;
    130130
    131131     /* Connection */
     
    133133     {
    134134          IUResetSwitch(&PowerSP);
    135           IUUpdateSwitch(&PowerSP, states, names, n);
    136           connectCamera();
    137           return;
    138      }
    139    
     135      IUUpdateSwitch(&PowerSP, states, names, n);
     136      connectCamera();
     137      return;
     138     }
     139
    140140
    141141     #ifndef HAVE_LINUX_VIDEODEV2_H
     
    145145       if (checkPowerS(&AntiFlickerSP))
    146146         return;
    147          
     147
    148148       AntiFlickerSP.s = IPS_IDLE;
    149        
     149
    150150       IUResetSwitch(&AntiFlickerSP);
    151151       IUUpdateSwitch(&AntiFlickerSP, states, names, n);
    152        
     152
    153153       if (AntiFlickerS[0].s == ISS_ON)
    154154       {
    155155         if (v4l_pwc->setFlicker(true, errmsg) < 0)
    156         {
    157            AntiFlickerS[0].s = ISS_OFF;
    158            AntiFlickerS[1].s = ISS_ON;
    159            IDSetSwitch(&AntiFlickerSP, "%s", errmsg);
    160            return;
    161         }
    162          
    163         AntiFlickerSP.s = IPS_OK;
    164         IDSetSwitch(&AntiFlickerSP, NULL);
     156    {
     157       AntiFlickerS[0].s = ISS_OFF;
     158       AntiFlickerS[1].s = ISS_ON;
     159       IDSetSwitch(&AntiFlickerSP, "%s", errmsg);
     160       return;
     161    }
     162
     163    AntiFlickerSP.s = IPS_OK;
     164    IDSetSwitch(&AntiFlickerSP, NULL);
    165165       }
    166166       else
    167167       {
    168168         if (v4l_pwc->setFlicker(false, errmsg) < 0)
    169         {
    170            AntiFlickerS[0].s = ISS_ON;
    171            AntiFlickerS[1].s = ISS_OFF;
    172            IDSetSwitch(&AntiFlickerSP, "%s", errmsg);
    173            return;
    174         }
    175          
    176         IDSetSwitch(&AntiFlickerSP, NULL);
    177        }
    178        
    179        return;
    180     }
    181    
     169    {
     170       AntiFlickerS[0].s = ISS_ON;
     171       AntiFlickerS[1].s = ISS_OFF;
     172       IDSetSwitch(&AntiFlickerSP, "%s", errmsg);
     173       return;
     174    }
     175
     176    IDSetSwitch(&AntiFlickerSP, NULL);
     177       }
     178
     179       return;
     180    }
     181
    182182    /* Back light compensation */
    183183    if (!strcmp (BackLightSP.name, name))
     
    185185       if (checkPowerS(&BackLightSP))
    186186         return;
    187          
     187
    188188       BackLightSP.s = IPS_IDLE;
    189        
     189
    190190       IUResetSwitch(&BackLightSP);
    191191       IUUpdateSwitch(&BackLightSP, states, names, n);
    192        
     192
    193193       if (BackLightS[0].s == ISS_ON)
    194194       {
    195195         if (v4l_pwc->setBackLight(true, errmsg) < 0)
    196         {
    197            BackLightS[0].s = ISS_OFF;
    198            BackLightS[1].s = ISS_ON;
    199            IDSetSwitch(&BackLightSP, "%s", errmsg);
    200            return;
    201         }
    202          
    203         BackLightSP.s = IPS_OK;
    204         IDSetSwitch(&BackLightSP, NULL);
     196    {
     197       BackLightS[0].s = ISS_OFF;
     198       BackLightS[1].s = ISS_ON;
     199       IDSetSwitch(&BackLightSP, "%s", errmsg);
     200       return;
     201    }
     202
     203    BackLightSP.s = IPS_OK;
     204    IDSetSwitch(&BackLightSP, NULL);
    205205       }
    206206       else
    207207       {
    208208         if (v4l_pwc->setBackLight(false, errmsg) < 0)
    209         {
    210            BackLightS[0].s = ISS_ON;
    211            BackLightS[1].s = ISS_OFF;
    212            IDSetSwitch(&BackLightSP, "%s", errmsg);
    213            return;
    214         }
    215          
    216         IDSetSwitch(&BackLightSP, NULL);
    217        }
    218        
    219        return;
    220     }
    221          
     209    {
     210       BackLightS[0].s = ISS_ON;
     211       BackLightS[1].s = ISS_OFF;
     212       IDSetSwitch(&BackLightSP, "%s", errmsg);
     213       return;
     214    }
     215
     216    IDSetSwitch(&BackLightSP, NULL);
     217       }
     218
     219       return;
     220    }
     221
    222222    /* Noise reduction control */
    223223    if (!strcmp (NoiseReductionSP.name, name))
     
    225225       if (checkPowerS(&NoiseReductionSP))
    226226         return;
    227          
     227
    228228       NoiseReductionSP.s = IPS_IDLE;
    229        
     229
    230230       IUResetSwitch(&NoiseReductionSP);
    231231       IUUpdateSwitch(&NoiseReductionSP, states, names, n);
    232        
     232
    233233       for (int i=0; i < 4; i++)
    234234        if (NoiseReductionS[i].s == ISS_ON)
    235         {
    236            index = i;
    237            break;
    238         }
    239        
     235    {
     236       index = i;
     237       break;
     238    }
     239
    240240       if (v4l_pwc->setNoiseRemoval(index, errmsg) < 0)
    241241       {
    242242         IUResetSwitch(&NoiseReductionSP);
    243         NoiseReductionS[0].s = ISS_ON;
    244         IDSetSwitch(&NoiseReductionSP, "%s", errmsg);
    245         return;
    246        }
    247        
     243    NoiseReductionS[0].s = ISS_ON;
     244    IDSetSwitch(&NoiseReductionSP, "%s", errmsg);
     245    return;
     246       }
     247
    248248       NoiseReductionSP.s = IPS_OK;
    249        
     249
    250250       IDSetSwitch(&NoiseReductionSP, NULL);
    251251       return;
    252252    }
    253    
     253
    254254    /* White balace mode */
    255255    if (!strcmp (WhiteBalanceModeSP.name, name))
     
    257257       if (checkPowerS(&WhiteBalanceModeSP))
    258258         return;
    259          
     259
    260260       WhiteBalanceModeSP.s = IPS_IDLE;
    261        
     261
    262262       IUResetSwitch(&WhiteBalanceModeSP);
    263263       IUUpdateSwitch(&WhiteBalanceModeSP, states, names, n);
    264        
     264
    265265       for (int i=0; i < 5; i++)
    266266        if (WhiteBalanceModeS[i].s == ISS_ON)
    267         {
    268            index = i;
    269            break;
    270         }
    271        
    272         switch (index)
    273         {
    274           // Auto
    275           case 0:
    276            if (v4l_pwc->setWhiteBalanceMode(PWC_WB_AUTO, errmsg) < 0)
    277            {
    278              IUResetSwitch(&WhiteBalanceModeSP),
    279              WhiteBalanceModeS[0].s = ISS_ON;
    280              IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
    281              return;
    282            }
    283            break;
    284            
    285         // Manual
    286         case 1:
    287           if (v4l_pwc->setWhiteBalanceMode(PWC_WB_MANUAL, errmsg) < 0)
    288            {
    289              IUResetSwitch(&WhiteBalanceModeSP),
    290              WhiteBalanceModeS[0].s = ISS_ON;
    291              IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
    292              return;
    293            }
    294            break;
    295            
    296         // Indoor
    297         case 2:
    298           if (v4l_pwc->setWhiteBalanceMode(PWC_WB_INDOOR, errmsg) < 0)
    299            {
    300              IUResetSwitch(&WhiteBalanceModeSP),
    301              WhiteBalanceModeS[0].s = ISS_ON;
    302              IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
    303              return;
    304            }
    305            break;
    306            
    307         // Outdoor
    308         case 3:
    309           if (v4l_pwc->setWhiteBalanceMode(PWC_WB_OUTDOOR, errmsg) < 0)
    310            {
    311              IUResetSwitch(&WhiteBalanceModeSP),
    312              WhiteBalanceModeS[0].s = ISS_ON;
    313              IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
    314              return;
    315            }
    316            break;
    317            
    318         // Flurescent
    319         case 4:
    320           if (v4l_pwc->setWhiteBalanceMode(PWC_WB_FL, errmsg) < 0)
    321            {
    322              IUResetSwitch(&WhiteBalanceModeSP),
    323              WhiteBalanceModeS[0].s = ISS_ON;
    324              IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
    325              return;
    326            }
    327            break;
    328            
    329         }
    330              
    331         WhiteBalanceModeSP.s = IPS_OK;
    332         IDSetSwitch(&WhiteBalanceModeSP, NULL);
    333         return;
    334        
    335      }
    336        
     267    {
     268       index = i;
     269       break;
     270    }
     271
     272    switch (index)
     273    {
     274      // Auto
     275      case 0:
     276       if (v4l_pwc->setWhiteBalanceMode(PWC_WB_AUTO, errmsg) < 0)
     277       {
     278         IUResetSwitch(&WhiteBalanceModeSP),
     279         WhiteBalanceModeS[0].s = ISS_ON;
     280         IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
     281         return;
     282       }
     283       break;
     284
     285    // Manual
     286    case 1:
     287      if (v4l_pwc->setWhiteBalanceMode(PWC_WB_MANUAL, errmsg) < 0)
     288       {
     289         IUResetSwitch(&WhiteBalanceModeSP),
     290         WhiteBalanceModeS[0].s = ISS_ON;
     291         IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
     292         return;
     293       }
     294       break;
     295
     296    // Indoor
     297    case 2:
     298      if (v4l_pwc->setWhiteBalanceMode(PWC_WB_INDOOR, errmsg) < 0)
     299       {
     300         IUResetSwitch(&WhiteBalanceModeSP),
     301         WhiteBalanceModeS[0].s = ISS_ON;
     302         IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
     303         return;
     304       }
     305       break;
     306
     307    // Outdoor
     308    case 3:
     309      if (v4l_pwc->setWhiteBalanceMode(PWC_WB_OUTDOOR, errmsg) < 0)
     310       {
     311         IUResetSwitch(&WhiteBalanceModeSP),
     312         WhiteBalanceModeS[0].s = ISS_ON;
     313         IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
     314         return;
     315       }
     316       break;
     317
     318    // Flurescent
     319    case 4:
     320      if (v4l_pwc->setWhiteBalanceMode(PWC_WB_FL, errmsg) < 0)
     321       {
     322         IUResetSwitch(&WhiteBalanceModeSP),
     323         WhiteBalanceModeS[0].s = ISS_ON;
     324         IDSetSwitch(&WhiteBalanceModeSP, "%s", errmsg);
     325         return;
     326       }
     327       break;
     328
     329    }
     330
     331    WhiteBalanceModeSP.s = IPS_OK;
     332    IDSetSwitch(&WhiteBalanceModeSP, NULL);
     333    return;
     334
     335     }
     336
    337337    /* Camera setttings */
    338338    if (!strcmp (CamSettingSP.name, name))
    339339    {
    340        
     340
    341341       if (checkPowerS(&CamSettingSP))
    342342         return;
    343    
    344         CamSettingSP.s = IPS_IDLE;
    345        
    346         IUResetSwitch(&CamSettingSP);
    347         IUUpdateSwitch(&CamSettingSP, states, names, n);
    348        
    349         if (CamSettingS[0].s == ISS_ON)
    350         {
    351           if (v4l_pwc->saveSettings(errmsg) < 0)
    352           {
    353             IUResetSwitch(&CamSettingSP);
    354             IDSetSwitch(&CamSettingSP, "%s", errmsg);
    355             return;
    356           }
    357          
    358           CamSettingSP.s = IPS_OK;
    359           IDSetSwitch(&CamSettingSP, "Settings saved.");
    360           return;
    361         }
    362        
    363         if (CamSettingS[1].s == ISS_ON)
    364         {
    365            v4l_pwc->restoreSettings();
    366            IUResetSwitch(&CamSettingSP);
    367            CamSettingSP.s = IPS_OK;
    368            IDSetSwitch(&CamSettingSP, "Settings restored.");
     343
     344    CamSettingSP.s = IPS_IDLE;
     345
     346    IUResetSwitch(&CamSettingSP);
     347    IUUpdateSwitch(&CamSettingSP, states, names, n);
     348
     349    if (CamSettingS[0].s == ISS_ON)
     350    {
     351      if (v4l_pwc->saveSettings(errmsg) < 0)
     352      {
     353        IUResetSwitch(&CamSettingSP);
     354        IDSetSwitch(&CamSettingSP, "%s", errmsg);
     355        return;
     356      }
     357
     358      CamSettingSP.s = IPS_OK;
     359      IDSetSwitch(&CamSettingSP, "Settings saved.");
     360      return;
     361    }
     362
     363    if (CamSettingS[1].s == ISS_ON)
     364    {
     365       v4l_pwc->restoreSettings();
     366       IUResetSwitch(&CamSettingSP);
     367       CamSettingSP.s = IPS_OK;
     368       IDSetSwitch(&CamSettingSP, "Settings restored.");
    369369           updateV4L1Controls();
    370            return;
    371         }
    372        
    373         if (CamSettingS[2].s == ISS_ON)
    374         {
    375           v4l_pwc->restoreFactorySettings();
    376           IUResetSwitch(&CamSettingSP);
    377           CamSettingSP.s = IPS_OK;
    378           IDSetSwitch(&CamSettingSP, "Factory settings restored.");
     370       return;
     371    }
     372
     373    if (CamSettingS[2].s == ISS_ON)
     374    {
     375      v4l_pwc->restoreFactorySettings();
     376      IUResetSwitch(&CamSettingSP);
     377      CamSettingSP.s = IPS_OK;
     378      IDSetSwitch(&CamSettingSP, "Factory settings restored.");
    379379          updateV4L1Controls();
    380           return;
    381         }
     380      return;
     381    }
    382382     }
    383383     #endif
     
    385385     // Call parent
    386386     V4L_Driver::ISNewSwitch(dev, name, states, names, n);
    387        
     387
    388388     
    389389
  • BAORadio/libindi/libindi/examples/tutorial_ccdpreview.c

    r490 r697  
    149149}
    150150
    151 void ISNewBLOB (const char *dev, const char *name, int sizes[], char *blobs[], char *formats[], char *names[], int n)
    152 {
     151//void ISNewBLOB (const char *dev, const char *name, int sizes[], char *blobs[], char *formats[], char *names[], int n)
     152//{
    153153       
    154154       /* ignore if not ours */
    155        if (dev && strcmp (mydev, dev))
    156          return;
     155     //  if (dev && strcmp (mydev, dev))
     156       //  return;
    157157
    158158        /* suppress warning */
    159         n=n; dev=dev; name=name; names=names;
    160 
    161 }
     159//      n=n; dev=dev; name=name; names=names;
     160
     161//}
    162162 
    163163void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
  • BAORadio/libindi/libindi/examples/tutorial_client.cpp

    r504 r697  
    3737
    3838#include "indibase/baseclient.h"
    39 #include "indibase/basedriver.h"
     39#include "indibase/basedevice.h"
     40#include "indibase/indiproperty.h"
    4041
    4142/* INDI Common Library Routines */
     
    110111**
    111112***************************************************************************************/
    112 void MyClient::newDevice(const char *device_name)
     113void MyClient::newDevice(INDI::BaseDevice *dp)
    113114{
    114     if (!strcmp(device_name, "CCD Simulator"))
    115     {
    116         IDLog("Receiving CCD Simulator Device...\n");
     115    if (!strcmp(dp->getDeviceName(), "CCD Simulator"))
     116       IDLog("Receiving CCD Simulator Device...\n");
    117117
    118         ccd_simulator = getDriver(MYCCD);
     118    ccd_simulator = dp;
    119119
    120         if (ccd_simulator == NULL)
    121         {
    122             IDLog("Error: unable to find CCD Simulator device...\n");
    123             return;
    124         }
    125     }
    126120}
    127121
    128122/**************************************************************************************
    129123**
    130 ***************************************************************************************/
    131 void MyClient::newProperty(const char *device_name, const char *property_name)
     124*************************************************************************************/
     125void MyClient::newProperty(INDI::Property *property)
    132126{
    133      if (!strcmp(device_name, "CCD Simulator") && !strcmp(property_name, "CCD_TEMPERATURE"))
     127
     128     if (!strcmp(property->getDeviceName(), "CCD Simulator") && !strcmp(property->getName(), "CCD_TEMPERATURE"))
    134129     {
    135130             IDLog("CCD_TEMPERATURE standard property defined. Attempting connection to CCD...\n");
    136              setDriverConnection(true, MYCCD);
     131             connectDevice(MYCCD);
    137132     }
    138133}
     
    168163   }
    169164}
     165
     166/**************************************************************************************
     167**
     168***************************************************************************************/
     169void MyClient::newMessage(INDI::BaseDevice *dp)
     170{
     171     if (strcmp(dp->getDeviceName(), "CCD Simulator"))
     172         return;
     173
     174     IDLog("Recveing message from Server:\n\n########################\n%s\n########################\n\n", dp->lastMessage());
     175
     176}
     177
  • BAORadio/libindi/libindi/examples/tutorial_client.h

    r504 r697  
    3737protected:
    3838
    39     virtual void newDevice(const char *device_name);
    40     virtual void newProperty(const char *device_name, const char *property_name);
     39    virtual void newDevice(INDI::BaseDevice *dp);
     40    virtual void newProperty(INDI::Property *property);
     41    virtual void removeProperty(INDI::Property *property) {}
    4142    virtual void newBLOB(IBLOB *bp) {}
    4243    virtual void newSwitch(ISwitchVectorProperty *svp);
    4344    virtual void newNumber(INumberVectorProperty *nvp);
     45    virtual void newMessage(INDI::BaseDevice *dp);
    4446    virtual void newText(ITextVectorProperty *tvp) {}
    4547    virtual void newLight(ILightVectorProperty *lvp) {}
    4648    virtual void serverConnected() {}
    47     virtual void serverDisconnected() {}
     49    virtual void serverDisconnected(int exit_code) {}
    4850
    4951private:
    50    INDI::BaseDriver * ccd_simulator;
     52   INDI::BaseDevice * ccd_simulator;
    5153
    5254};
  • BAORadio/libindi/libindi/examples/tutorial_four.cpp

    r642 r697  
    11#if 0
    2     MyScope - Tutorial Four
     2    TestDevice - Tutorial Four
    33    Demonstration of libindi v0.7 capabilities.
    44
     
    4545
    4646/* Our telescope auto pointer */
    47 auto_ptr<MyScope> telescope(0);
     47auto_ptr<TestDevice> telescope(0);
    4848
    4949const int POLLMS = 1000;                                // Period of update, 1 second.
     
    6262 {
    6363     isInit = 1;
    64      telescope.reset(new MyScope());
     64     telescope.reset(new TestDevice());
     65     srand (time(NULL));
    6566 }
    6667 
     
    108109void ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
    109110{
    110   INDI_UNUSED(dev);
    111   INDI_UNUSED(name);
    112   INDI_UNUSED(sizes);
    113   INDI_UNUSED(blobsizes);
    114   INDI_UNUSED(blobs);
    115   INDI_UNUSED(formats);
    116   INDI_UNUSED(names);
    117   INDI_UNUSED(n);
     111    ISInit();
     112
     113    telescope->ISNewBLOB(dev, name, sizes, blobsizes, blobs, formats, names, n);
     114
     115
    118116}
    119117
     
    129127** LX200 Basic constructor
    130128***************************************************************************************/
    131 MyScope::MyScope()
    132 {
    133     IDLog("Initilizing from My Scope device...\n");
    134 
    135     //init_properties();
    136 
    137  }
    138 
    139 /**************************************************************************************
    140 **
    141 ***************************************************************************************/
    142 MyScope::~MyScope()
     129TestDevice::TestDevice()
     130{
     131    IDLog("Initilizing from Test Device...\n");
     132
     133}
     134
     135/**************************************************************************************
     136**
     137***************************************************************************************/
     138TestDevice::~TestDevice()
    143139{
    144140
     
    148144** Initialize all properties & set default values.
    149145**************************************************************************************/
    150 bool MyScope::initProperties()
    151 {
    152     DefaultDriver::initProperties();
     146bool TestDevice::initProperties()
     147{
     148    DefaultDevice::initProperties();
    153149    // This is the default driver skeleton file location
    154150    // Convention is: drivername_sk_xml
     
    177173** Define Basic properties to clients.
    178174***************************************************************************************/
    179 void MyScope::ISGetProperties(const char *dev)
     175void TestDevice::ISGetProperties(const char *dev)
    180176{
    181177    static int configLoaded = 0;
    182178
    183179    // Ask the default driver first to send properties.
    184     INDI::DefaultDriver::ISGetProperties(dev);
     180    INDI::DefaultDevice::ISGetProperties(dev);
    185181
    186182    // If no configuration is load before, then load it now.
     
    196192** Process Text properties
    197193***************************************************************************************/
    198 bool MyScope::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
     194bool TestDevice::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
    199195{
    200196        // Ignore if not ours
    201         if (strcmp (dev, deviceName()))
    202             return false;
    203 
    204         return false;
    205 }
    206 
    207 /**************************************************************************************
    208 **
    209 ***************************************************************************************/
    210 bool MyScope::ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
     197        if (strcmp (dev, getDeviceName()))
     198            return false;
     199
     200        return false;
     201}
     202
     203/**************************************************************************************
     204**
     205***************************************************************************************/
     206bool TestDevice::ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n)
    211207{
    212208       
    213209        // Ignore if not ours
    214         if (strcmp (dev, deviceName()))
     210        if (strcmp (dev, getDeviceName()))
    215211            return false;
    216212
     
    220216            return false;
    221217
    222         // Are we updating Slew Accuracy?
    223         if (!strcmp(nvp->name, "Slew Accuracy"))
     218        if (isConnected() == false)
     219        {
     220            nvp->s = IPS_ALERT;
     221            IDSetNumber(nvp, "Cannot change property while device is disconnected.");
     222            return false;
     223        }
     224
     225        if (!strcmp(nvp->name, "Number Property"))
    224226        {
    225227            IUUpdateNumber(nvp, values, names, n);
     
    236238**
    237239***************************************************************************************/
    238 bool MyScope::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
    239 {
     240bool TestDevice::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
     241{
     242    int lightState=0;
     243    int lightIndex=0;
     244
    240245        // ignore if not ours //
    241         if (strcmp (dev, deviceName()))
    242             return false;
    243 
    244         if (INDI::DefaultDriver::ISNewSwitch(dev, name, states, names, n) == true)
     246            if (strcmp (dev, getDeviceName()))
     247            return false;
     248
     249        if (INDI::DefaultDevice::ISNewSwitch(dev, name, states, names, n) == true)
    245250            return true;
    246251
     252
     253
    247254        ISwitchVectorProperty *svp = getSwitch(name);
    248 
    249         if (!svp)
    250             return false;
    251 
    252         /* Are we update CONNECTION?
    253         if (!strcmp(svp->name, "CONNECTION"))
     255        ILightVectorProperty *lvp  = getLight("Light Property");
     256
     257        if (isConnected() == false)
     258        {
     259            svp->s = IPS_ALERT;
     260            IDSetSwitch(svp, "Cannot change property while device is disconnected.");
     261            return false;
     262        }
     263
     264
     265        if (!svp || !lvp)
     266            return false;
     267
     268        if (!strcmp(svp->name, "Menu"))
    254269        {
    255270            IUUpdateSwitch(svp, states, names, n);
    256             connect_telescope();
     271            ISwitch *onSW = IUFindOnSwitch(svp);
     272            lightIndex = IUFindOnSwitchIndex(svp);
     273
     274            if (lightIndex < 0 || lightIndex > lvp->nlp)
     275                return false;
     276
     277            if (onSW)
     278            {
     279                lightState = rand() % 4;
     280                svp->s = IPS_OK;
     281                lvp->s = IPS_OK;
     282                lvp->lp[lightIndex].s = (IPState) lightState;
     283
     284                IDSetSwitch(svp, "Setting to switch %s is successful. Changing corresponding light property to %s.", onSW->name, pstateStr(lvp->lp[lightIndex].s));
     285                IDSetLight(lvp, NULL);
     286
     287
     288            }
    257289            return true;
    258         }*/
    259 
    260     return DefaultDriver::ISNewSwitch(dev, name, states, names, n);
    261 
    262 
    263 }
    264 
    265 
    266 /**************************************************************************************
    267 **
    268 ***************************************************************************************/
    269 bool MyScope::Connect()
    270 {
     290        }
     291
     292    return false;
     293
     294
     295}
     296
     297bool TestDevice::ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
     298{
     299    if (strcmp (dev, getDeviceName()))
     300        return false;
     301
     302    const char *testBLOB = "This is a test BLOB from the driver";
     303
     304    IBLOBVectorProperty *bvp = getBLOB(name);
     305
     306    if (!bvp)
     307        return false;
     308
     309    if (isConnected() == false)
     310    {
     311        bvp->s = IPS_ALERT;
     312        IDSetBLOB(bvp, "Cannot change property while device is disconnected.");
     313        return false;
     314    }
     315
     316    if (!strcmp(bvp->name, "BLOB Test"))
     317    {
     318
     319        IUUpdateBLOB(bvp, sizes, blobsizes, blobs, formats, names, n);
     320
     321        IBLOB *bp = IUFindBLOB(bvp, names[0]);
     322
     323        if (!bp)
     324            return false;
     325
     326        IDLog("Recieved BLOB with name %s, format %s, and size %d, and bloblen %d\n", bp->name, bp->format, bp->size, bp->bloblen);
     327
     328        char *blobBuffer = new char[bp->bloblen+1];
     329        strncpy(blobBuffer, ((char *) bp->blob), bp->bloblen);
     330        blobBuffer[bp->bloblen] = '\0';
     331
     332        IDLog("BLOB Content:\n##################################\n%s\n##################################\n", blobBuffer);
     333
     334        delete [] blobBuffer;
     335    }
     336
    271337    return true;
    272 }
    273 
    274 bool MyScope::Disconnect()
     338
     339}
     340
     341
     342/**************************************************************************************
     343**
     344***************************************************************************************/
     345bool TestDevice::Connect()
    275346{
    276347    return true;
    277348}
    278349
    279 const char * MyScope::getDefaultName()
    280 {
    281     return "My Scope";
    282 }
    283 
    284 
    285 
    286 
    287 
    288 
    289 
     350bool TestDevice::Disconnect()
     351{
     352    return true;
     353}
     354
     355const char * TestDevice::getDefaultName()
     356{
     357    return "Test Device";
     358}
     359
     360
     361
     362
     363
     364
     365
  • BAORadio/libindi/libindi/examples/tutorial_four.h

    r504 r697  
    2424#include "indidevapi.h"
    2525#include "indicom.h"
    26 #include "indibase/defaultdriver.h"
     26#include "indibase/defaultdevice.h"
    2727
    28 class MyScope : public INDI::DefaultDriver
     28class TestDevice : public INDI::DefaultDevice
    2929{
    3030 public:
    31  MyScope();
    32  ~MyScope();
     31 TestDevice();
     32 ~TestDevice();
    3333
    3434 virtual void ISGetProperties (const char *dev);
     
    3636 virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);
    3737 virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
     38 virtual bool ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n);
    3839
    3940private:
  • BAORadio/libindi/libindi/examples/tutorial_four_sk.xml

    r501 r697  
    11<INDIDriver>
    2 <defSwitchVector device="My Device" name="CONNECTION" label="Connection" group="Main Control" state="Idle" perm="rw" rule="OneOfMany" timeout="60">
     2<defSwitchVector device="Test Device" name="CONNECTION" label="Connection" group="Main Control" state="Idle" perm="rw" rule="OneOfMany" timeout="60">
    33    <defSwitch name="CONNECT" label="Connect">
    44Off
     
    88    </defSwitch>
    99</defSwitchVector>
    10 <defNumberVector device="My Device" name="Slew Accuracy" label="" group="Main Control" state="Idle" perm="rw" timeout="0" timestamp="2010-09-02T23:50:48">
    11     <defNumber name="SlewRA" label="RA (arcmin)" format="%10.6m" min="0" max="60" step="1">
     10<defNumberVector device="Test Device" name="Number Property" label="" group="Main Control" state="Idle" perm="rw" timeout="0">
     11    <defNumber name="NUMBER_1" label="First" format="%10.6m" min="0" max="60" step="1">
    12123
    1313    </defNumber>
    14     <defNumber name="SlewDEC" label="Dec (arcmin)" format="%10.6m" min="0" max="60" step="1">
     14    <defNumber name="NUMBER_2" label="Second" format="%10.6m" min="0" max="60" step="1">
    15153
    1616    </defNumber>
    1717</defNumberVector>
     18<defLightVector device="Test Device" name="Light Property" label="" group="Main Control" state="Idle" timeout="0">
     19    <defLight name="Light 1">
     20        Idle
     21    </defLight>
     22    <defLight name="Light 2">
     23        Idle
     24    </defLight>
     25    <defLight name="Light 3">
     26        Idle
     27    </defLight>
     28    <defLight name="Light 4">
     29        Idle
     30    </defLight>
     31    <defLight name="Light 5">
     32        Idle
     33    </defLight>
     34</defLightVector>
     35<defSwitchVector device="Test Device" name="Menu" group="Main Control" state="Idle" perm="rw" rule="OneOfMany" timeout="60">
     36    <defSwitch name="1x">
     37On
     38    </defSwitch>
     39    <defSwitch name="2x">
     40Off
     41    </defSwitch>
     42    <defSwitch name="3x">
     43Off
     44    </defSwitch>
     45    <defSwitch name="4x">
     46Off
     47    </defSwitch>
     48    <defSwitch name="5x">
     49Off
     50    </defSwitch>
     51
     52</defSwitchVector>
     53<defBLOBVector device="Test Device" name="BLOB Test" group="Main Control" state="Idle" perm="rw" timeout="60">
     54    <defBLOB name="BLOB 1">
     55    </defBLOB>
     56</defBLOBVector>
    1857</INDIDriver>
  • BAORadio/libindi/libindi/examples/tutorial_three.c

    r504 r697  
    5959/* Exposure time */
    6060static INumber ExposeTimeN[]    = {{ "CCD_EXPOSURE_VALUE", "Duration (s)", "%5.2f", 0., 36000., .5, 1., 0, 0, 0}};
    61 static INumberVectorProperty ExposeTimeNP = { mydev, "CCD_EXPOSURE", "Expose", COMM_GROUP, IP_RW, 60, IPS_IDLE, ExposeTimeN, NARRAY(ExposeTimeN), "", 0};
     61static INumberVectorProperty ExposeTimeNP = { mydev, "CCD_EXPOSURE_REQUEST", "Expose", COMM_GROUP, IP_RW, 60, IPS_IDLE, ExposeTimeN, NARRAY(ExposeTimeN), "", 0};
    6262 
    6363/* Temperature control */
  • BAORadio/libindi/libindi/indidevapi.h

    r501 r697  
    450450extern ISwitch *IUFindOnSwitch (const ISwitchVectorProperty *sp);
    451451
     452/** \brief Returns the index of first ON switch it finds in the vector switch property.
     453
     454*   \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.
     455*
     456* \param sp a pointer to a switch vector property.
     457* \return index to the \e first ON ISwitch member if found. If all switches are off, -1 is returned.
     458*/
     459
     460extern int IUFindOnSwitchIndex (const ISwitchVectorProperty *sp);
     461
    452462/** \brief Reset all switches in a switch vector property to OFF.
    453463*
     
    485495*/
    486496extern int IUUpdateText(ITextVectorProperty *tvp, char * texts[], char *names[], int n);
     497
     498/** \brief Update all BLOB members in a BLOB vector property.
     499*
     500* \param bvp a pointer to a BLOB vector property.
     501* \param BLOBs a pointer to the BLOB members
     502* \param names the names of the IBLOB members to update.
     503* \param n the number of IBLOB members to update.
     504* \return 0 if update successful, -1 otherwise. Update will fail in case of property name mismatch.
     505*/
     506extern int IUUpdateBLOB(IBLOBVectorProperty *bvp, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n);
     507
     508/** \brief Function to save blob metadata in the corresponding blob.
     509    \param tb pointer to an IBLOB member.
     510    \param size size of the blob buffer encoded in base64
     511    \param blobsize actual size of the buffer after base64 decoding. This is the actual byte count used in drivers.
     512    \param blob pointer to the blob buffer
     513    \param format format of the blob buffer
     514    \note Do not call this function directly, it is called internally by IUUpdateBLOB.
     515    */
     516extern int IUSaveBLOB(IBLOB *bp, int size, int blobsize, char *blob, char *format);
    487517
    488518/** \brief Function to update the min and max elements of a number in the client
  • BAORadio/libindi/libindi/indidriver.c

    r642 r697  
    272272}
    273273
     274
     275/* Update property BLOB in accord with BLOBs and names */
     276int IUUpdateBLOB(IBLOBVectorProperty *bvp, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
     277{
     278  int i=0;
     279
     280  IBLOB *bp;
     281
     282  for (i = 0; i < n; i++)
     283  {
     284    bp = IUFindBLOB(bvp, names[i]);
     285    if (!bp)
     286    {
     287        bvp->s = IPS_IDLE;
     288    IDSetBLOB(bvp, "Error: %s is not a member of %s property.", names[i], bvp->name);
     289    return -1;
     290    }
     291  }
     292
     293  /* First loop checks for error, second loop set all values atomically*/
     294  for (i=0; i < n; i++)
     295  {
     296    bp = IUFindBLOB(bvp, names[i]);
     297    IUSaveBLOB(bp, sizes[i], blobsizes[i], blobs[i], formats[i]);
     298  }
     299
     300  return 0;
     301
     302}
     303
     304int IUSaveBLOB(IBLOB *bp, int size, int blobsize, char *blob, char *format)
     305{
     306    bp->bloblen = blobsize;
     307    bp->size    = size;
     308    bp->blob    = blob;
     309    strncpy(bp->format, format, MAXINDIFORMAT);
     310}
     311
    274312void IUFillSwitch(ISwitch *sp, const char *name, const char * label, ISState s)
    275313{
     
    440478        for (i = 0; i < nvp->nnp; i++) {
    441479            for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) {
    442                 if (!strcmp (tagXMLEle(ep), "oneNumber") &&
     480        if (!strcmp (tagXMLEle(ep)+3, "Number") &&
    443481                        !strcmp (nvp->np[i].name, findXMLAttValu(ep, "name"))) {
    444482                    if (f_scansexa (pcdataXMLEle(ep), &nvp->np[i].value) < 0)
     
    478516        for (i = 0; i < tvp->ntp; i++) {
    479517            for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) {
    480                 if (!strcmp (tagXMLEle(ep), "oneText") &&
     518        if (!strcmp (tagXMLEle(ep)+3, "Text") &&
    481519                        !strcmp (tvp->tp[i].name, findXMLAttValu(ep, "name"))) {
    482520                    IUSaveText (&tvp->tp[i], pcdataXMLEle(ep));
     
    515553        /* match each oneLight with one ILight */
    516554        for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) {
    517             if (!strcmp (tagXMLEle(ep), "oneLight")) {
     555        if (!strcmp (tagXMLEle(ep)+3, "Light")) {
    518556                const char *name = findXMLAttValu (ep, "name");
    519557                for (i = 0; i < lvp->nlp; i++) {
     
    554592        /* match each oneSwitch with one ISwitch */
    555593        for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) {
    556             if (!strcmp (tagXMLEle(ep), "oneSwitch")) {
     594        if (!strcmp (tagXMLEle(ep)+3, "Switch")) {
    557595                const char *name = findXMLAttValu (ep, "name");
    558596                for (i = 0; i < svp->nsp; i++) {
     
    594632        /* match each oneBLOB with one IBLOB */
    595633        for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) {
    596             if (!strcmp (tagXMLEle(ep), "oneBLOB")) {
     634        if (!strcmp (tagXMLEle(ep)+3, "BLOB")) {
    597635                const char *name = findXMLAttValu (ep, "name");
    598636                for (i = 0; i < bvp->nbp; i++) {
  • BAORadio/libindi/libindi/indiserver.c

    r642 r697  
    790790                else if (strstr(token, "\"") || strstr(token, "'"))
    791791                {
    792                     strncat(tDev, ++token, sizeof(tDev)-strlen(tDev)-1);
    793                     while (token = strsep(&cp, delm) )
     792                    strncat(tDev, ++token, sizeof(tDev)-strlen(tDev)-1);
     793
     794                    if ( tDev[strlen(tDev)-2] == '\"' || tDev[strlen(tDev)-2] == '\'')
     795                        tDev[strlen(tDev)-2] = '\0';
     796                   else while (token = strsep(&cp, delm) )
    794797                   {
    795798                     strcat(tDev, " ");
     
    797800                     if ( (tp=strchr(tDev, '\"')) || (tp=strchr(tDev, '\'')))
    798801                     {
    799                          //tDev[strlen(tDev)-1] = '\0';
     802                         tDev[strlen(tDev)-1] = '\0';
    800803                         *tp='\0';
    801804                         break;
     
    818821                      {
    819822                       strncat(tConfig, ++token, sizeof(tConfig)-strlen(tDev)-1);
     823
     824                       if ( tConfig[strlen(tConfig)-2] == '\"' || tConfig[strlen(tConfig)-2] == '\'')
     825                           tConfig[strlen(tConfig)-2] = '\0';
     826
    820827                       while (token = strsep(&cp, delm) )
    821828                       {
     
    825832                          if ( (tp=strchr(tConfig, '\"')) || (tp=strchr(tConfig, '\'')))
    826833                          {
    827                                  //tConfig[strlen(tConfig)-1] = '\0';
     834                               tConfig[strlen(tConfig)-1] = '\0';
    828835                              *tp = '\0';
    829836                              break;
  • BAORadio/libindi/libindi/libindi.pro

    r688 r697  
    44
    55TEMPLATE = app
     6CONFIG += debug
    67TARGET =
    78DEPENDPATH += . \
     
    3940# Input
    4041HEADERS += base64.h \
    41            config.h \
    4242           eventloop.h \
    4343           fq.h \
     
    163163           communs/ServerSocket.cpp \
    164164           communs/Socket.cpp \
    165            examples/tutorial_ccdpreview.c \
    166            examples/tutorial_client.cpp \
    167            examples/tutorial_dome.c \
    168            examples/tutorial_four.cpp \
    169            examples/tutorial_one.c \
    170            examples/tutorial_rain.c \
    171            examples/tutorial_three.c \
    172            examples/tutorial_two.c \
     165#           examples/tutorial_ccdpreview.c \
     166#           examples/tutorial_client.cpp \
     167#           examples/tutorial_dome.c \
     168#           examples/tutorial_four.cpp \
     169#           examples/tutorial_one.c \
     170#           examples/tutorial_rain.c \
     171#           examples/tutorial_three.c \
     172#           examples/tutorial_two.c \
    173173           libs/indicom.c \
    174174           libs/lilxml.c \
     
    179179           drivers/ccd/ccd_simulator.cpp \
    180180           drivers/ccd/fli_ccd.c \
    181            drivers/filter_wheel/filter_simulator.cpp \
    182            drivers/filter_wheel/fli_wheel.c \
    183            drivers/filter_wheel/trutech_wheel.c \
    184            drivers/focuser/fli_pdf.c \
    185            drivers/focuser/robofocus.c \
    186            drivers/focuser/robofocus.cpp \
    187            drivers/focuser/robofocusdriver.c \
    188            drivers/focuser/tcfs.cpp \
     181#           drivers/filter_wheel/filter_simulator.cpp \
     182#           drivers/filter_wheel/fli_wheel.c \
     183#           drivers/filter_wheel/trutech_wheel.c \
     184#           drivers/focuser/fli_pdf.c \
     185#           drivers/focuser/robofocus.c \
     186#           drivers/focuser/robofocus.cpp \
     187#           drivers/focuser/robofocusdriver.c \
     188#           drivers/focuser/tcfs.cpp \
    189189           drivers/telescope/BAO.cpp \
    190190           drivers/telescope/celestrongps.cpp \
     
    210210           drivers/telescope/telescope_simulator.cpp \
    211211           drivers/telescope/temmadriver.c \
    212            drivers/video/indi_lpi.cpp \
    213            drivers/video/indi_philips.cpp \
    214            drivers/video/indi_v4l.cpp \
    215            drivers/video/stv.c \
    216            drivers/video/stvdriver.c \
    217            drivers/video/v4ldriver.cpp \
    218            drivers/video/v4lphilips.cpp \
     212#           drivers/video/indi_lpi.cpp \
     213#           drivers/video/indi_philips.cpp \
     214#           drivers/video/indi_v4l.cpp \
     215#           drivers/video/stv.c \
     216#           drivers/video/stvdriver.c \
     217#           drivers/video/v4ldriver.cpp \
     218#           drivers/video/v4lphilips.cpp \
    219219           Indi_Stellarium/src/Connection.cpp \
    220220           Indi_Stellarium/src/Listener.cpp \
     
    235235           libs/indibase/inditelescope.cpp \
    236236           libs/indibase/indiusbdevice.cpp \
    237            libs/webcam/ccvt_c2.c \
    238            libs/webcam/ccvt_misc.c \
    239            libs/webcam/port.cpp \
    240            libs/webcam/PPort.cpp \
    241            libs/webcam/v4l1_base.cpp \
    242            libs/webcam/v4l1_pwc.cpp \
    243            libs/webcam/v4l2_base.cpp \
     237#           libs/webcam/ccvt_c2.c \
     238#           libs/webcam/ccvt_misc.c \
     239#           libs/webcam/port.cpp \
     240#           libs/webcam/PPort.cpp \
     241#           libs/webcam/v4l1_base.cpp \
     242#           libs/webcam/v4l1_pwc.cpp \
     243#           libs/webcam/v4l2_base.cpp \
    244244           libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c \
    245245           libindi_build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp
  • BAORadio/libindi/libindi/libs/indibase/baseclient.cpp

    r642 r697  
    2525#include <netinet/in.h>
    2626#include <netdb.h>
     27#include <fcntl.h>
    2728
    2829#include "baseclient.h"
    29 #include "basedriver.h"
     30#include "basedevice.h"
    3031#include "indicom.h"
    3132
     
    4647INDI::BaseClient::~BaseClient()
    4748{
    48     close(sockfd);
     49
    4950}
    5051
     
    6566    struct sockaddr_in serv_addr;
    6667    struct hostent *hp;
     68    int sflags=0;
    6769
    6870    /* lookup host address */
     
    8587    }
    8688
     89//    sflags=fcntl(sockfd,F_GETFL,0);         // Get socket flags
     90//    fcntl(sockfd,F_SETFL, sflags | O_NONBLOCK);   // Add non-blocking flag
     91
     92
    8793    /* connect */
    8894    if (::connect (sockfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr))<0)
     
    95101    svrwfp = fdopen (sockfd, "w");
    96102
     103    if (svrwfp == NULL)
     104    {
     105        perror("fdopen");
     106        return false;
     107    }
     108
    97109    int result = pthread_create( &listen_thread, NULL, &INDI::BaseClient::listenHelper, this);
    98110
     
    103115    }
    104116
     117    sConnected = true;
    105118    serverConnected();
    106     sConnected = true;
    107119
    108120    return true;
     
    111123bool INDI::BaseClient::disconnectServer()
    112124{
     125   // IDLog("Server disconnected called\n");
    113126    if (sConnected == false)
    114127        return true;
     128
     129    sConnected = false;
     130
     131    //IDLog("Closing socket fd!\n");
     132    close(sockfd);
    115133
    116134    if (svrwfp != NULL)
     
    118136   svrwfp = NULL;
    119137
    120    close(sockfd);
    121 
    122     serverDisconnected();
    123 
    124     sConnected = false;
    125 
    126     return true;
     138   pthread_join(listen_thread, NULL);
     139
     140   return true;
     141}
     142
     143
     144void INDI::BaseClient::connectDevice(const char *deviceName)
     145{
     146    setDriverConnection(true, deviceName);
     147}
     148
     149void INDI::BaseClient::disconnectDevice(const char *deviceName)
     150{
     151        setDriverConnection(false, deviceName);
    127152}
    128153
     
    130155void INDI::BaseClient::setDriverConnection(bool status, const char *deviceName)
    131156{
    132     INDI::BaseDriver *drv = getDriver(deviceName);
     157    INDI::BaseDevice *drv = getDevice(deviceName);
    133158    ISwitchVectorProperty *drv_connection = NULL;
    134159
     
    156181        drv_connection->sp[1].s = ISS_OFF;
    157182
    158         sendNewSwitch(drv_connection, &(drv_connection->sp[0]));
     183        sendNewSwitch(drv_connection);
    159184    }
    160185    else
     
    169194        drv_connection->sp[1].s = ISS_ON;
    170195
    171         sendNewSwitch(drv_connection, &(drv_connection->sp[1]));
    172 
    173     }
    174 }
    175 
    176 
    177 INDI::BaseDriver * INDI::BaseClient::getDriver(const char * deviceName)
    178 {
    179     vector<INDI::BaseDriver *>::const_iterator devi;
     196        sendNewSwitch(drv_connection);
     197
     198    }
     199}
     200
     201
     202INDI::BaseDevice * INDI::BaseClient::getDevice(const char * deviceName)
     203{
     204    vector<INDI::BaseDevice *>::const_iterator devi;
    180205    for ( devi = cDevices.begin(); devi != cDevices.end(); devi++)
    181         if (!strcmp(deviceName, (*devi)->deviceName()))
     206        if (!strcmp(deviceName, (*devi)->getDeviceName()))
    182207            return (*devi);
    183208
     
    193218void INDI::BaseClient::listenINDI()
    194219{
     220    char buffer[MAXINDIBUF];
    195221    char msg[MAXRBUF];
    196     char buffer[MAXINDIBUF];
     222
    197223    int n=0, err_code=0;
     224    struct timeval tv;
     225    fd_set rs;
     226    FD_ZERO(&rs);
     227
     228    tv.tv_sec  = 1;
     229    tv.tv_usec = 0;//500000;
     230
    198231
    199232    if (cDeviceNames.empty())
     
    208241    fflush (svrwfp);
    209242
     243    FD_SET(sockfd, &rs);
     244
    210245    lillp = newLilXML();
     246
    211247
    212248    /* read from server, exit if find all requested properties */
    213249    while (sConnected)
    214250    {
    215         n = read(sockfd, buffer, MAXINDIBUF);
    216 
    217         if (n ==0)
     251        n = select (sockfd+1, &rs, NULL, NULL, &tv);
     252
     253        if (n < 0)
    218254        {
    219             perror ("read");
    220             fprintf (stderr,"INDI server %s/%d disconnected\n", cServer.c_str(), cPort);
    221             serverDisconnected();
    222             return;
     255            fprintf (stderr,"INDI server %s/%d disconnected.\n", cServer.c_str(), cPort);
     256            close(sockfd);
     257            break;
    223258        }
     259
     260        n = recv(sockfd, buffer, MAXINDIBUF, MSG_DONTWAIT);
     261        if (n<=0)
     262        {
     263
     264            if (n==0)
     265            {
     266                fprintf (stderr,"INDI server %s/%d disconnected.\n", cServer.c_str(), cPort);
     267                close(sockfd);
     268                break;
     269            }
     270            else
     271                continue;
     272        }
     273
    224274
    225275        for (int i=0; i < n; i++)
    226276        {
     277            //IDLog("Getting #%d bytes in for loop, calling readXMLEle for byte %d\n", n, i);
    227278            XMLEle *root = readXMLEle (lillp, buffer[i], msg);
     279            //IDLog("############# BLOCK # POST READ XML ELE #####################\n");
     280
    228281            if (root)
    229282            {
     
    233286                     if (err_code != INDI_PROPERTY_DUPLICATED)
    234287                     {
    235                          IDLog("Dispatch command error: %s\n", msg);
     288                         IDLog("Dispatch command error(%d): %s\n", err_code, msg);
    236289                         prXMLEle (stderr, root, 0);
    237290                     }
     
    248301    }
    249302
     303    //IDLog("Termindating Listen therad!\n");
     304    delLilXML(lillp);
     305
     306    //IDLog("sConnected value at termination is: %s\n", (sConnected ? "True" : "False"));
     307    serverDisconnected( (sConnected == false) ? 0 : -1);
     308    sConnected = false;
     309
     310    pthread_exit(0);
     311
    250312}
    251313
     
    258320
    259321    /* Get the device, if not available, create it */
    260     INDI::BaseDriver *dp = findDev (root, 1, errmsg);
     322    INDI::BaseDevice *dp = findDev (root, 1, errmsg);
    261323    if (dp == NULL)
    262324    {
     
    264326        return INDI_DEVICE_NOT_FOUND;
    265327    }
     328
     329    // FIXME REMOVE THIS
     330
     331    // Ignore echoed newXXX
     332    if (strstr(tagXMLEle(root), "new"))
     333        return 0;
    266334
    267335    if ((!strcmp (tagXMLEle(root), "defTextVector"))  ||
     
    289357{
    290358    XMLAtt *ap;
    291     INDI::BaseDriver *dp;
     359    INDI::BaseDevice *dp;
    292360
    293361    /* dig out device and optional property name */
     
    296364        return INDI_DEVICE_NOT_FOUND;
    297365
    298     checkMsg(root, dp);
     366    dp->checkMessage(root);
    299367
    300368    ap = findXMLAtt (root, "name");
     
    302370    /* Delete property if it exists, otherwise, delete the whole device */
    303371    if (ap)
    304         return dp->removeProperty(valuXMLAtt(ap));
     372    {
     373        INDI::Property *rProp = dp->getProperty(valuXMLAtt(ap));
     374        removeProperty(rProp);
     375        int errCode = dp->removeProperty(valuXMLAtt(ap), errmsg);
     376
     377        return errCode;
     378    }
    305379    // delete the whole device
    306380    else
    307         return removeDevice(dp->deviceName(), errmsg);
     381        return removeDevice(dp->getDeviceName(), errmsg);
    308382}
    309383
    310384int INDI::BaseClient::removeDevice( const char * devName, char * errmsg )
    311385{
    312     std::vector<INDI::BaseDriver *>::iterator devicei;
     386    std::vector<INDI::BaseDevice *>::iterator devicei;
    313387
    314388    for (devicei =cDevices.begin(); devicei != cDevices.end();)
    315389    {
    316       if (strcmp(devName, (*devicei)->deviceName()))
     390
     391      if (!strcmp(devName, (*devicei)->getDeviceName()))
    317392      {
    318393          delete *devicei;
     
    328403}
    329404
    330 INDI::BaseDriver * INDI::BaseClient::findDev( const char * devName, char * errmsg )
    331 {
    332 
    333     std::vector<INDI::BaseDriver *>::const_iterator devicei;
     405INDI::BaseDevice * INDI::BaseClient::findDev( const char * devName, char * errmsg )
     406{
     407
     408    std::vector<INDI::BaseDevice *>::const_iterator devicei;
    334409
    335410    for (devicei = cDevices.begin(); devicei != cDevices.end(); devicei++)
    336411    {
    337         if (!strcmp(devName, (*devicei)->deviceName()))
     412        if (!strcmp(devName, (*devicei)->getDeviceName()))
    338413         return (*devicei);
    339414
     
    345420
    346421/* add new device */
    347 INDI::BaseDriver * INDI::BaseClient::addDevice (XMLEle *dep, char * errmsg)
     422INDI::BaseDevice * INDI::BaseClient::addDevice (XMLEle *dep, char * errmsg)
    348423{
    349424    //devicePtr dp(new INDI::BaseDriver());
    350     INDI::BaseDriver *dp = new INDI::BaseDriver();
     425    INDI::BaseDevice *dp = new INDI::BaseDevice();
    351426    XMLAtt *ap;
    352427    char * device_name;
     
    367442    cDevices.push_back(dp);
    368443
    369     newDevice(device_name);
     444    newDevice(dp);
    370445
    371446    /* ok */
     
    373448}
    374449
    375 INDI::BaseDriver * INDI::BaseClient::findDev (XMLEle *root, int create, char * errmsg)
     450INDI::BaseDevice * INDI::BaseClient::findDev (XMLEle *root, int create, char * errmsg)
    376451{
    377452    XMLAtt *ap;
    378     INDI::BaseDriver *dp;
     453    INDI::BaseDevice *dp;
    379454    char *dn;
    380455
     
    407482int INDI::BaseClient::messageCmd (XMLEle *root, char * errmsg)
    408483{
    409     checkMsg (root, findDev (root, 0, errmsg));
     484    INDI::BaseDevice *dp =findDev (root, 0, errmsg);
     485
     486    if (dp)
     487        dp->checkMessage(root);
     488
    410489    return (0);
    411490}
    412491
    413 /* add message to queue
    414  * N.B. don't put carriage control in msg, we take care of that.
    415  */
    416 void INDI::BaseClient::checkMsg (XMLEle *root, INDI::BaseDriver *dp)
    417 {
    418     XMLAtt *ap;
    419     ap = findXMLAtt(root, "message");
    420 
    421     if (ap)
    422         doMsg(root, dp);
    423 }
    424 
    425 /* Store msg in queue */
    426 void INDI::BaseClient::doMsg (XMLEle *msg, INDI::BaseDriver *dp)
    427 {
    428     XMLAtt *message;
    429     XMLAtt *time_stamp;
    430     char msgBuffer[MAXRBUF];
    431 
    432     if (dp == NULL)
    433         return;
    434 
    435     /* prefix our timestamp if not with msg */
    436     time_stamp = findXMLAtt (msg, "timestamp");
    437 
    438     if (time_stamp)
    439         snprintf(msgBuffer, MAXRBUF, "%s ", valuXMLAtt(time_stamp));
    440     else
    441         snprintf(msgBuffer, MAXRBUF, "%s ", timestamp());
    442 
    443     /* finally! the msg */
    444     message = findXMLAtt(msg, "message");
    445 
    446     if (!message) return;
    447 
    448     // Prepend to the log
    449    dp->addMessage(msgBuffer);
    450    dp->addMessage(valuXMLAtt(message));
    451    dp->addMessage("\n");
    452 \
    453 }
    454492
    455493void INDI::BaseClient::sendNewText (ITextVectorProperty *tvp)
     
    471509}
    472510
     511void INDI::BaseClient::sendNewText (const char * deviceName, const char * propertyName, const char* elementName, const char *text)
     512{
     513
     514    INDI::BaseDevice *drv = getDevice(deviceName);
     515
     516    if (drv == NULL)
     517        return;
     518
     519    ITextVectorProperty *tvp = drv->getText(propertyName);
     520
     521    if (tvp == NULL)
     522        return;
     523
     524    IText * tp = IUFindText(tvp, elementName);
     525
     526    if (tp == NULL)
     527        return;
     528
     529    tvp->s = IPS_BUSY;
     530    IUSaveText(tp, text);
     531
     532    sendNewText(tvp);
     533}
     534
    473535void INDI::BaseClient::sendNewNumber (INumberVectorProperty *nvp)
    474536{
     
    489551}
    490552
    491 void INDI::BaseClient::sendNewSwitch (ISwitchVectorProperty *svp, ISwitch *sp)
    492 {
     553void INDI::BaseClient::sendNewNumber (const char *deviceName, const char *propertyName, const char* elementName, double value)
     554{
     555    INDI::BaseDevice *drv = getDevice(deviceName);
     556
     557    if (drv == NULL)
     558        return;
     559
     560    INumberVectorProperty *nvp = drv->getNumber(propertyName);
     561
     562    if (nvp == NULL)
     563        return;
     564
     565    INumber * np = IUFindNumber(nvp, elementName);
     566
     567    if (np == NULL)
     568        return;
     569
     570    np->value = value;
     571    nvp->s = IPS_BUSY;
     572
     573    sendNewNumber(nvp);
     574
     575}
     576
     577void INDI::BaseClient::sendNewSwitch (ISwitchVectorProperty *svp)
     578{
     579    ISwitch *onSwitch = IUFindOnSwitch(svp);
     580
    493581    fprintf(svrwfp, "<newSwitchVector\n");
    494582
    495583    fprintf(svrwfp, "  device='%s'\n", svp->device);
    496584    fprintf(svrwfp, "  name='%s'>\n", svp->name);
    497     fprintf(svrwfp, "  <oneSwitch\n");
    498     fprintf(svrwfp, "    name='%s'>\n", sp->name);
    499     fprintf(svrwfp, "      %s\n", (sp->s == ISS_ON) ? "On" : "Off");
    500     fprintf(svrwfp, "  </oneSwitch>\n");
     585
     586    if (svp->r == ISR_1OFMANY && onSwitch)
     587    {
     588        fprintf(svrwfp, "  <oneSwitch\n");
     589        fprintf(svrwfp, "    name='%s'>\n", onSwitch->name);
     590        fprintf(svrwfp, "      %s\n", (onSwitch->s == ISS_ON) ? "On" : "Off");
     591        fprintf(svrwfp, "  </oneSwitch>\n");
     592    }
     593    else
     594    {
     595        for (int i=0; i < svp->nsp; i++)
     596        {
     597            fprintf(svrwfp, "  <oneSwitch\n");
     598            fprintf(svrwfp, "    name='%s'>\n", svp->sp[i].name);
     599            fprintf(svrwfp, "      %s\n", (svp->sp[i].s == ISS_ON) ? "On" : "Off");
     600            fprintf(svrwfp, "  </oneSwitch>\n");
     601
     602        }
     603    }
    501604
    502605    fprintf(svrwfp, "</newSwitchVector>\n");
    503606
    504607    fflush(svrwfp);
     608}
     609
     610void INDI::BaseClient::sendNewSwitch (const char *deviceName, const char *propertyName, const char *elementName)
     611{
     612    INDI::BaseDevice *drv = getDevice(deviceName);
     613
     614    if (drv == NULL)
     615        return;
     616
     617    ISwitchVectorProperty *svp = drv->getSwitch(propertyName);
     618
     619    if (svp == NULL)
     620        return;
     621
     622    ISwitch * sp = IUFindSwitch(svp, elementName);
     623
     624    if (sp == NULL)
     625        return;
     626
     627    sp->s = ISS_ON;
     628    svp->s = IPS_BUSY;
     629
     630    sendNewSwitch(svp);
     631
    505632}
    506633
     
    513640}
    514641
    515 void INDI::BaseClient::sendOneBlob( const char *blobName, unsigned int blobSize, const char *blobFormat, unsigned char * blobBuffer)
     642void INDI::BaseClient::sendOneBlob( const char *blobName, unsigned int blobSize, const char *blobFormat, void * blobBuffer)
    516643{
    517644    fprintf(svrwfp, "  <oneBLOB\n");
     
    521648
    522649    for (unsigned i = 0; i < blobSize; i += 72)
    523         fprintf(svrwfp, "    %.72s\n", blobBuffer+i);
     650        fprintf(svrwfp, "    %.72s\n", ((char *) blobBuffer+i));
    524651
    525652    fprintf(svrwfp, "   </oneBLOB>\n");
  • BAORadio/libindi/libindi/libs/indibase/baseclient.h

    r642 r697  
    3838   BaseClient enables accelerated development of INDI Clients by providing a framework that facilitates communication, device
    3939   handling, and event notification. By subclassing BaseClient, clients can quickly connect to an INDI server, and query for
    40    a set of INDI::BaseDriver devices, and read and write properties seamlessly. Event driven programming is possible due to
     40   a set of INDI::BaseDevice devices, and read and write properties seamlessly. Event driven programming is possible due to
    4141   notifications upon reception of new devices or properties.
    4242
     
    5252public:
    5353    enum { INDI_DEVICE_NOT_FOUND=-1, INDI_PROPERTY_INVALID=-2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR=-4 };
    54     //typedef boost::shared_ptr<INDI::BaseDriver> devicePtr;
     54    //typedef boost::shared_ptr<INDI::BaseDevice> devicePtr;
    5555
    5656    BaseClient();
     
    6767        A client may select to receive notifications of only a specific device or a set of devices.
    6868        If the client encounters any of the devices set via this function, it will create a corresponding
    69         INDI::BaseDriver object to handle them. If no devices are watched, then all devices owned by INDI server
     69        INDI::BaseDevice object to handle them. If no devices are watched, then all devices owned by INDI server
    7070        will be created and handled.
    7171    */
     
    8787    bool disconnectServer();
    8888
    89     /** \brief Connect/Disconnect to INDI driver
    90         \param status If true, the client will attempt to turn on CONNECTION property within the driver (i.e. turn on the device).
    91          Otherwise, CONNECTION will be turned off.
     89    /** \brief Connect to INDI driver
    9290        \param deviceName Name of the device to connect to.
    9391    */
    94     void setDriverConnection(bool status, const char *deviceName);
     92    void connectDevice(const char *deviceName);
     93
     94    /** \brief Disconnect INDI driver
     95        \param deviceName Name of the device to disconnect.
     96    */
     97    void disconnectDevice(const char *deviceName);
    9598
    9699    /** \param deviceName Name of device to search for in the list of devices owned by INDI server,
    97100         \returns If \e deviceName exists, it returns an instance of the device. Otherwise, it returns NULL.
    98101    */
    99     INDI::BaseDriver * getDriver(const char * deviceName);
     102    INDI::BaseDevice * getDevice(const char * deviceName);
    100103
    101104    /** \returns Returns a vector of all devices created in the client.
    102105    */
    103     const vector<INDI::BaseDriver *> & getDrivers() const { return cDevices; }
     106    const vector<INDI::BaseDevice *> & getDevices() const { return cDevices; }
    104107
    105108    /** \brief Set Binary Large Object policy mode
     
    125128    static void * listenHelper(void *context);
    126129
    127 protected:
    128 
    129     /** \brief Dispatch command received from INDI server to respective devices handled by the client */
    130     int dispatchCommand(XMLEle *root, char* errmsg);
    131 
    132     /** \brief Remove device */
    133     int removeDevice( const char * devName, char * errmsg );
    134 
    135     /** \brief Delete property command */
    136     int delPropertyCmd (XMLEle *root, char * errmsg);
    137 
    138     /** \brief Find and return a particular device */
    139     INDI::BaseDriver * findDev( const char * devName, char * errmsg);
    140     /** \brief Add a new device */
    141     INDI::BaseDriver * addDevice (XMLEle *dep, char * errmsg);
    142     /** \brief Find a device, and if it doesn't exist, create it if create is set to 1 */
    143     INDI::BaseDriver * findDev (XMLEle *root, int create, char * errmsg);
    144 
    145     /**  Process messages */
    146     int messageCmd (XMLEle *root, char * errmsg);
    147     /**  Process messages */
    148     void checkMsg (XMLEle *root, INDI::BaseDriver *dp);
    149     /**  Process messages */
    150     void doMsg (XMLEle *msg, INDI::BaseDriver *dp);
     130    const char * getHost() { return cServer.c_str();}
     131    int getPort() { return cPort; }
    151132
    152133    /** \brief Send new Text command to server */
    153134    void sendNewText (ITextVectorProperty *pp);
     135    /** \brief Send new Text command to server */
     136    void sendNewText (const char * deviceName, const char * propertyName, const char* elementName, const char *text);
    154137    /** \brief Send new Number command to server */
    155138    void sendNewNumber (INumberVectorProperty *pp);
     139    /** \brief Send new Number command to server */
     140    void sendNewNumber (const char * deviceName, const char *propertyName, const char* elementName, double value);
    156141    /** \brief Send new Switch command to server */
    157     void sendNewSwitch (ISwitchVectorProperty *pp, ISwitch *lp);
     142    void sendNewSwitch (ISwitchVectorProperty *pp);
     143    /** \brief Send new Switch command to server */
     144    void sendNewSwitch (const char * deviceName, const char *propertyName, const char *elementName);
     145
    158146    /** \brief Send opening tag for BLOB command to server */
    159147    void startBlob( const char *devName, const char *propName, const char *timestamp);
    160148    /** \brief Send ONE blob content to server */
    161     void sendOneBlob( const char *blobName, unsigned int blobSize, const char *blobFormat, unsigned char * blobBuffer);
     149    void sendOneBlob( const char *blobName, unsigned int blobSize, const char *blobFormat, void * blobBuffer);
    162150    /** \brief Send closing tag for BLOB command to server */
    163151    void finishBlob();
    164152
     153protected:
     154
     155    /** \brief Dispatch command received from INDI server to respective devices handled by the client */
     156    int dispatchCommand(XMLEle *root, char* errmsg);
     157
     158    /** \brief Remove device */
     159    int removeDevice( const char * devName, char * errmsg );
     160
     161    /** \brief Delete property command */
     162    int delPropertyCmd (XMLEle *root, char * errmsg);
     163
     164    /** \brief Find and return a particular device */
     165    INDI::BaseDevice * findDev( const char * devName, char * errmsg);
     166    /** \brief Add a new device */
     167    INDI::BaseDevice * addDevice (XMLEle *dep, char * errmsg);
     168    /** \brief Find a device, and if it doesn't exist, create it if create is set to 1 */
     169    INDI::BaseDevice * findDev (XMLEle *root, int create, char * errmsg);
     170
     171    /**  Process messages */
     172    int messageCmd (XMLEle *root, char * errmsg);
     173
     174
    165175private:
     176
     177    /** \brief Connect/Disconnect to INDI driver
     178        \param status If true, the client will attempt to turn on CONNECTION property within the driver (i.e. turn on the device).
     179         Otherwise, CONNECTION will be turned off.
     180        \param deviceName Name of the device to connect to.
     181    */
     182    void setDriverConnection(bool status, const char *deviceName);
    166183
    167184    // Listen to INDI server and process incoming messages
     
    171188    pthread_t listen_thread;
    172189
    173     vector<INDI::BaseDriver *> cDevices;
     190    vector<INDI::BaseDevice *> cDevices;
    174191    vector<string> cDeviceNames;
    175192
  • BAORadio/libindi/libindi/libs/indibase/indibase.h

    r642 r697  
    3333    class BaseMediator;
    3434    class BaseClient;
    35     class BaseDriver;
    36     class DefaultDriver;
     35    class BaseDevice;
     36    class DefaultDevice;
    3737    class FilterInterface;
    3838    class GuiderInterface;
     
    4141    class FilterWheel;
    4242    class Focuser;
    43     class USBDevice;   
     43    class USBDevice;
     44    class Property;
    4445}
     46
     47/*! INDI property type */
     48typedef enum
     49{
     50    INDI_NUMBER, /*!< INumberVectorProperty. */
     51    INDI_SWITCH, /*!< ISwitchVectorProperty. */
     52    INDI_TEXT,   /*!< ITextVectorProperty. */
     53    INDI_LIGHT,  /*!< ILightVectorProperty. */
     54    INDI_BLOB,    /*!< IBLOBVectorProperty. */
     55    INDI_UNKNOWN
     56} INDI_TYPE;
    4557
    4658
     
    5668        \param device_name Name of the new device
    5769    */
    58     virtual void newDevice(const char *device_name)  =0;
     70    virtual void newDevice(INDI::BaseDevice *dp)  =0;
    5971
    6072    /** \brief Emmited when a new property is created for an INDI driver.
    61         \param device_name Name of the device
    62         \param property_name Name of the new property
     73        \param property Pointer to the Property Container
     74
    6375    */
    64     virtual void newProperty(const char *device_name, const char *property_name)  =0;
     76    virtual void newProperty(INDI::Property *property)  =0;
     77
     78
     79    /** \brief Emmited when a property is deleted for an INDI driver.
     80        \param property Pointer to the Property Container to remove.
     81
     82    */
     83    virtual void removeProperty(INDI::Property *property)  =0;
     84
    6585
    6686    /** \brief Emmited when a new BLOB value arrives from INDI server.
     
    89109    virtual void newLight(ILightVectorProperty *lvp) =0;
    90110
     111    /** \brief Emmited when a new message arrives from INDI server.
     112        \param dp pointer to the INDI device the message is sent to.
     113    */
     114    virtual void newMessage(INDI::BaseDevice *dp) =0;
     115
    91116    /** \brief Emmited when the server is connected.
    92117    */
     
    94119
    95120    /** \brief Emmited when the server gets disconnected.
     121        \param exit_code 0 if client was requested to disconnect from server. -1 if connection to server is terminated due to remote server disconnection.
    96122    */
    97     virtual void serverDisconnected() =0;
     123    virtual void serverDisconnected(int exit_code) =0;
    98124};
    99125
  • BAORadio/libindi/libindi/libs/indibase/indiccd.cpp

    r642 r697  
    162162    HasSt4Port=false;
    163163    InExposure=false;
    164     TelescopeTP = new ITextVectorProperty;
     164    ActiveDeviceTP = new ITextVectorProperty;
    165165}
    166166
    167167INDI::CCD::~CCD()
    168168{
    169     delete TelescopeTP;
     169    delete ActiveDeviceTP;
    170170}
    171171
    172172bool INDI::CCD::initProperties()
    173173{
    174     DefaultDriver::initProperties();   //  let the base class flesh in what it wants
     174    DefaultDevice::initProperties();   //  let the base class flesh in what it wants
    175175
    176176    // PRIMARY CCD Init
     
    180180    IUFillNumber(&PrimaryCCD.ImageFrameN[2],"WIDTH","Width","%4.0f",0,1392.0,0,1392.0);
    181181    IUFillNumber(&PrimaryCCD.ImageFrameN[3],"HEIGHT","Height","%4.0f",0,1040,0,1040);
    182     IUFillNumberVector(PrimaryCCD.ImageFrameNP,PrimaryCCD.ImageFrameN,4,deviceName(),"CCD_FRAME","Frame",IMAGE_SETTINGS_TAB,IP_RW,60,IPS_IDLE);
     182    IUFillNumberVector(PrimaryCCD.ImageFrameNP,PrimaryCCD.ImageFrameN,4,getDeviceName(),"CCD_FRAME","Frame",IMAGE_SETTINGS_TAB,IP_RW,60,IPS_IDLE);
    183183
    184184    IUFillSwitch(&PrimaryCCD.FrameTypeS[0],"FRAME_LIGHT","Light",ISS_ON);
     
    186186    IUFillSwitch(&PrimaryCCD.FrameTypeS[2],"FRAME_DARK","Dark",ISS_OFF);
    187187    IUFillSwitch(&PrimaryCCD.FrameTypeS[3],"FRAME_FLAT","Flat",ISS_OFF);
    188     IUFillSwitchVector(PrimaryCCD.FrameTypeSP,PrimaryCCD.FrameTypeS,4,deviceName(),"CCD_FRAME_TYPE","FrameType",IMAGE_SETTINGS_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
     188    IUFillSwitchVector(PrimaryCCD.FrameTypeSP,PrimaryCCD.FrameTypeS,4,getDeviceName(),"CCD_FRAME_TYPE","FrameType",IMAGE_SETTINGS_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
    189189
    190190    IUFillNumber(&PrimaryCCD.ImageExposureN[0],"CCD_EXPOSURE_VALUE","Duration (s)","%5.2f",0,36000,0,1.0);
    191     IUFillNumberVector(PrimaryCCD.ImageExposureNP,PrimaryCCD.ImageExposureN,1,deviceName(),"CCD_EXPOSURE_REQUEST","Expose",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
     191    IUFillNumberVector(PrimaryCCD.ImageExposureNP,PrimaryCCD.ImageExposureN,1,getDeviceName(),"CCD_EXPOSURE_REQUEST","Expose",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
    192192
    193193    IUFillNumber(&PrimaryCCD.ImageBinN[0],"HOR_BIN","X","%2.0f",1,4,1,1);
    194194    IUFillNumber(&PrimaryCCD.ImageBinN[1],"VER_BIN","Y","%2.0f",1,4,1,1);
    195     IUFillNumberVector(PrimaryCCD.ImageBinNP,PrimaryCCD.ImageBinN,2,deviceName(),"CCD_BINNING","Binning",IMAGE_SETTINGS_TAB,IP_RW,60,IPS_IDLE);
     195    IUFillNumberVector(PrimaryCCD.ImageBinNP,PrimaryCCD.ImageBinN,2,getDeviceName(),"CCD_BINNING","Binning",IMAGE_SETTINGS_TAB,IP_RW,60,IPS_IDLE);
    196196
    197197    IUFillNumber(&PrimaryCCD.ImagePixelSizeN[0],"CCD_MAX_X","Resolution x","%4.0f",1,40,0,6.45);
     
    201201    IUFillNumber(&PrimaryCCD.ImagePixelSizeN[4],"CCD_PIXEL_SIZE_Y","Pixel size Y","%5.2f",1,40,0,6.45);
    202202    IUFillNumber(&PrimaryCCD.ImagePixelSizeN[5],"CCD_BITSPERPIXEL","Bits per pixel","%3.0f",1,40,0,6.45);
    203     IUFillNumberVector(PrimaryCCD.ImagePixelSizeNP,PrimaryCCD.ImagePixelSizeN,6,deviceName(),"CCD_INFO","Ccd Information",IMAGE_INFO_TAB,IP_RO,60,IPS_IDLE);
     203    IUFillNumberVector(PrimaryCCD.ImagePixelSizeNP,PrimaryCCD.ImagePixelSizeN,6,getDeviceName(),"CCD_INFO","Ccd Information",IMAGE_INFO_TAB,IP_RO,60,IPS_IDLE);
    204204
    205205    IUFillSwitch(&PrimaryCCD.CompressS[0],"COMPRESS","Compress",ISS_OFF);
    206206    IUFillSwitch(&PrimaryCCD.CompressS[1],"RAW","Raw",ISS_ON);
    207     IUFillSwitchVector(PrimaryCCD.CompressSP,PrimaryCCD.CompressS,2,deviceName(),"COMPRESSION","Image",IMAGE_SETTINGS_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
     207    IUFillSwitchVector(PrimaryCCD.CompressSP,PrimaryCCD.CompressS,2,getDeviceName(),"COMPRESSION","Image",IMAGE_SETTINGS_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
    208208
    209209    IUFillBLOB(&PrimaryCCD.FitsB,"CCD1","Image","");
    210     IUFillBLOBVector(PrimaryCCD.FitsBP,&PrimaryCCD.FitsB,1,deviceName(),"CCD1","Image Data",OPTIONS_TAB,IP_RO,60,IPS_IDLE);
     210    IUFillBLOBVector(PrimaryCCD.FitsBP,&PrimaryCCD.FitsB,1,getDeviceName(),"CCD1","Image Data",OPTIONS_TAB,IP_RO,60,IPS_IDLE);
    211211
    212212    // GUIDER CCD Init
     
    216216    IUFillNumber(&GuideCCD.ImageFrameN[2],"WIDTH","Width","%4.0f",0,1392.0,0,1392.0);
    217217    IUFillNumber(&GuideCCD.ImageFrameN[3],"HEIGHT","Height","%4.0f",0,1040,0,1040);
    218     IUFillNumberVector(GuideCCD.ImageFrameNP,GuideCCD.ImageFrameN,4,deviceName(),"GUIDE_FRAME","Frame",GUIDE_HEAD_TAB,IP_RW,60,IPS_IDLE);
     218    IUFillNumberVector(GuideCCD.ImageFrameNP,GuideCCD.ImageFrameN,4,getDeviceName(),"GUIDE_FRAME","Frame",GUIDE_HEAD_TAB,IP_RW,60,IPS_IDLE);
    219219
    220220    IUFillNumber(&GuideCCD.ImagePixelSizeN[0],"Image_MAX_X","Resolution x","%4.0f",1,40,0,6.45);
     
    224224    IUFillNumber(&GuideCCD.ImagePixelSizeN[4],"Image_PIXEL_SIZE_Y","Pixel size Y","%5.2f",1,40,0,6.45);
    225225    IUFillNumber(&GuideCCD.ImagePixelSizeN[5],"Image_BITSPERPIXEL","Bits per pixel","%3.0f",1,40,0,6.45);
    226     IUFillNumberVector(GuideCCD.ImagePixelSizeNP,GuideCCD.ImagePixelSizeN,6,deviceName(),"GUIDE_INFO",GUIDE_HEAD_TAB,GUIDE_HEAD_TAB,IP_RO,60,IPS_IDLE);
     226    IUFillNumberVector(GuideCCD.ImagePixelSizeNP,GuideCCD.ImagePixelSizeN,6,getDeviceName(),"GUIDE_INFO",GUIDE_HEAD_TAB,GUIDE_HEAD_TAB,IP_RO,60,IPS_IDLE);
    227227
    228228    IUFillNumber(&GuideCCD.ImageExposureN[0],"GUIDER_EXPOSURE_VALUE","Duration (s)","%5.2f",0,36000,0,1.0);
    229     IUFillNumberVector(GuideCCD.ImageExposureNP,GuideCCD.ImageExposureN,1,deviceName(),"GUIDER_EXPOSURE","Image",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
     229    IUFillNumberVector(GuideCCD.ImageExposureNP,GuideCCD.ImageExposureN,1,getDeviceName(),"GUIDER_EXPOSURE","Image",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
    230230
    231231    IUFillSwitch(&GuideCCD.CompressS[0],"GCOMPRESS","Compress",ISS_OFF);
    232232    IUFillSwitch(&GuideCCD.CompressS[1],"GRAW","Raw",ISS_ON);
    233     IUFillSwitchVector(GuideCCD.CompressSP,GuideCCD.CompressS,2,deviceName(),"GCOMPRESSION","Image",GUIDE_HEAD_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
     233    IUFillSwitchVector(GuideCCD.CompressSP,GuideCCD.CompressS,2,getDeviceName(),"GCOMPRESSION","Image",GUIDE_HEAD_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
    234234
    235235    IUFillBLOB(&GuideCCD.FitsB,"CCD2","Guider Image","");
    236     IUFillBLOBVector(GuideCCD.FitsBP,&GuideCCD.FitsB,1,deviceName(),"CCD2","Image Data",OPTIONS_TAB,IP_RO,60,IPS_IDLE);
     236    IUFillBLOBVector(GuideCCD.FitsBP,&GuideCCD.FitsB,1,getDeviceName(),"CCD2","Image Data",OPTIONS_TAB,IP_RO,60,IPS_IDLE);
    237237
    238238    // CCD Class Init
    239239
    240     IUFillText(&TelescopeT[0],"ACTIVE_TELESCOPE","Telescope","");
    241     IUFillTextVector(TelescopeTP,TelescopeT,1,deviceName(),"ACTIVE_DEVICES","Snoop Scope",OPTIONS_TAB,IP_RW,60,IPS_IDLE);
     240    IUFillText(&ActiveDeviceT[0],"ACTIVE_TELESCOPE","Telescope","Telescope Simulator");
     241    IUFillText(&ActiveDeviceT[1],"ACTIVE_FOCUSER","Focuser","Focuser Simulator");
     242    IUFillTextVector(ActiveDeviceTP,ActiveDeviceT,2,getDeviceName(),"ACTIVE_DEVICES","Snoop devices",OPTIONS_TAB,IP_RW,60,IPS_IDLE);
    242243
    243244    IUFillNumber(&EqN[0],"RA_PEC","Ra (hh:mm:ss)","%010.6m",0,24,0,0);
    244245    IUFillNumber(&EqN[1],"DEC_PEC","Dec (dd:mm:ss)","%010.6m",-90,90,0,0);
    245     IUFillNumberVector(&EqNP,EqN,2,"","EQUATORIAL_PEC","EQ PEC","Main Control",IP_RW,60,IPS_IDLE);
     246    IUFillNumberVector(&EqNP,EqN,2,ActiveDeviceT[0].text,"EQUATORIAL_PEC","EQ PEC","Main Control",IP_RW,60,IPS_IDLE);
     247
     248    IDSnoopDevice(ActiveDeviceT[0].text,"EQUATORIAL_PEC");
     249    IDSnoopDevice(ActiveDeviceT[0].text,"TELESCOPE_PARAMETERS");
     250    IDSnoopDevice(ActiveDeviceT[1].text,"FWHM");
     251
    246252
    247253    // Guider Interface
    248     initGuiderProperties(deviceName(), GUIDE_CONTROL_TAB);
     254    initGuiderProperties(getDeviceName(), GUIDE_CONTROL_TAB);
    249255
    250256    return true;
     
    257263    //IDLog("INDI::CCD IsGetProperties with %s\n",dev);
    258264
    259     DefaultDriver::ISGetProperties(dev);
     265    DefaultDevice::ISGetProperties(dev);
    260266
    261267    return;
     
    296302        }
    297303        defineSwitch(PrimaryCCD.FrameTypeSP);
    298         defineText(TelescopeTP);
     304        defineText(ActiveDeviceTP);
    299305    }
    300306    else
     
    321327        }
    322328        deleteProperty(PrimaryCCD.FrameTypeSP->name);
    323         deleteProperty(TelescopeTP->name);
     329        deleteProperty(ActiveDeviceTP->name);
    324330    }
    325331    return true;
    326332}
    327333
    328 void INDI::CCD::ISSnoopDevice (XMLEle *root)
     334bool INDI::CCD::ISSnoopDevice (XMLEle *root)
    329335 {
    330336     //fprintf(stderr," ################# CCDSim handling snoop ##############\n");
     
    346352        //fprintf(stderr,"Snoop Failed\n");
    347353     }
     354
     355     return true;
    348356 }
    349357
     
    353361    //IDLog("IndiTelescope got %d new text items name %s\n",n,name);
    354362    //  first check if it's for our device
    355     if(strcmp(dev,deviceName())==0)
     363    if(strcmp(dev,getDeviceName())==0)
    356364    {
    357365        //  This is for our device
    358366        //  Now lets see if it's something we process here
    359         if(strcmp(name,TelescopeTP->name)==0)
     367        if(strcmp(name,ActiveDeviceTP->name)==0)
    360368        {
    361369            int rc;
    362370            //IDLog("calling update text\n");
    363             TelescopeTP->s=IPS_OK;
    364             rc=IUUpdateText(TelescopeTP,texts,names,n);
     371            ActiveDeviceTP->s=IPS_OK;
     372            rc=IUUpdateText(ActiveDeviceTP,texts,names,n);
    365373            //IDLog("update text returns %d\n",rc);
    366374            //  Update client display
    367             IDSetText(TelescopeTP,NULL);
     375            IDSetText(ActiveDeviceTP,NULL);
    368376            saveConfig();
    369             IUFillNumberVector(&EqNP,EqN,2,TelescopeT[0].text,"EQUATORIAL_PEC","EQ PEC",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
    370             IDSnoopDevice(TelescopeT[0].text,"EQUATORIAL_PEC");
     377            IUFillNumberVector(&EqNP,EqN,2,ActiveDeviceT[0].text,"EQUATORIAL_PEC","EQ PEC",MAIN_CONTROL_TAB,IP_RW,60,IPS_IDLE);
     378
     379            IDSnoopDevice(ActiveDeviceT[0].text,"EQUATORIAL_PEC");
     380            IDSnoopDevice(ActiveDeviceT[0].text,"TELESCOPE_PARAMETERS");
     381            IDSnoopDevice(ActiveDeviceT[1].text,"FWHM");
    371382            //  We processed this one, so, tell the world we did it
    372383            return true;
     
    375386    }
    376387
    377     return INDI::DefaultDriver::ISNewText(dev,name,texts,names,n);
     388    return INDI::DefaultDevice::ISNewText(dev,name,texts,names,n);
    378389}
    379390
     
    382393    //  first check if it's for our device
    383394    //IDLog("INDI::CCD::ISNewNumber %s\n",name);
    384     if(strcmp(dev,deviceName())==0)
     395    if(strcmp(dev,getDeviceName())==0)
    385396    {
    386397        //  This is for our device
     
    497508            //IDSetNumber(GuiderFrameNP,NULL);
    498509
    499             IDLog("GuiderFrame set to %4.0f,%4.0f %4.0f x %4.0f\n",
     510            if (isDebug())
     511                IDLog("GuiderFrame set to %4.0f,%4.0f %4.0f x %4.0f\n",
    500512                  GuideCCD.ImageFrameN[0].value,GuideCCD.ImageFrameN[1].value,GuideCCD.ImageFrameN[2].value,GuideCCD.ImageFrameN[3].value);
    501513            //GSubX=GuiderFrameN[0].value;
     
    517529            IDSetNumber(GuideNSP,NULL);
    518530
    519             fprintf(stderr,"GuideNorthSouth set to %7.3f,%7.3f\n", GuideNS[0].value,GuideNS[1].value);
     531            if (isDebug())
     532                fprintf(stderr,"GuideNorthSouth set to %7.3f,%7.3f\n", GuideNS[0].value,GuideNS[1].value);
    520533
    521534            if(GuideNS[0].value != 0)
     
    542555            IDSetNumber(GuideEWP,NULL);
    543556
    544             fprintf(stderr,"GuiderEastWest set to %6.3f,%6.3f\n",
    545                   GuideEW[0].value,GuideEW[1].value);
     557            if (isDebug())
     558                fprintf(stderr,"GuiderEastWest set to %6.3f,%6.3f\n", GuideEW[0].value,GuideEW[1].value);
    546559
    547560            if(GuideEW[0].value != 0)
     
    564577    //  if we didn't process it, continue up the chain, let somebody else
    565578    //  give it a shot
    566     return DefaultDriver::ISNewNumber(dev,name,values,names,n);
     579    return DefaultDevice::ISNewNumber(dev,name,values,names,n);
    567580}
    568581
     
    570583{
    571584
    572     if(strcmp(dev,deviceName())==0)
     585    if(strcmp(dev,getDeviceName())==0)
    573586    {
    574587
     
    623636
    624637    // let the default driver have a crack at it
    625     return DefaultDriver::ISNewSwitch(dev, name, states, names, n);
     638    return DefaultDevice::ISNewSwitch(dev, name, states, names, n);
    626639}
    627640
     
    789802{
    790803    //  lets try sending a ccd preview
    791     //IDLog("Enter Uploadfile with %d total sending via %s\n",total,FitsBP->name);
     804
    792805    PrimaryCCD.FitsB.blob=fitsdata;
    793806    PrimaryCCD.FitsB.bloblen=total;
     
    795808    strcpy(PrimaryCCD.FitsB.format,".fits");
    796809    PrimaryCCD.FitsBP->s=IPS_OK;
     810    //IDLog("Enter Uploadfile with %d total sending via %s, and format %s\n",total,PrimaryCCD.FitsB.name, PrimaryCCD.FitsB.format);
    797811    IDSetBLOB(PrimaryCCD.FitsBP,NULL);
    798812
  • BAORadio/libindi/libindi/libs/indibase/indiccd.h

    r642 r697  
    2323#include <fitsio.h>
    2424
    25 #include "defaultdriver.h"
     25#include "defaultdevice.h"
    2626#include "indiguiderinterface.h"
    2727
     
    122122\author Gerry Rozema, Jasem Mutlaq
    123123*/
    124 class INDI::CCD : public INDI::DefaultDriver, INDI::GuiderInterface
     124class INDI::CCD : public INDI::DefaultDevice, INDI::GuiderInterface
    125125{
    126126      public:
     
    134134        virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
    135135        virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);
    136         virtual void ISSnoopDevice (XMLEle *root);
     136        virtual bool ISSnoopDevice (XMLEle *root);
    137137
    138138     protected:
     
    240240        virtual bool GuideWest(float ms);
    241241
     242        /** \brief Add FITS keywords to a fits file
     243            \param fptr pointer to a valid FITS file.
     244            \note This function is not implemented in INDI::CCD, it must be implemented in the child class
     245        */
     246        virtual void addFITSKeywords(fitsfile *fptr);
     247
    242248        float RA;
    243249        float Dec;
     
    254260    INumber EqN[2];
    255261
    256     ITextVectorProperty *TelescopeTP;
    257     IText TelescopeT[1];
    258 
    259     void addFITSKeywords(fitsfile *fptr);
     262    ITextVectorProperty *ActiveDeviceTP;
     263    IText ActiveDeviceT[2];
     264
    260265    int uploadfile(void *fitsdata,int total);
    261266
  • BAORadio/libindi/libindi/libs/indibase/indifilterinterface.h

    r646 r697  
    5353    /** \brief Obtains a list of filter names from the hardware and initilizes the FilterNameTP property. The function should check for the number of filters
    5454      available in the filter wheel and build the FilterNameTP property accordingly.
     55      \param groupName group name for FilterNameTP property to be created.
    5556      \return True if successful, false if unsupported or failed operation
    5657      \see QSI CCD implementation of the FilterInterface. QSI CCD is available as a 3rd party INDI driver.
    5758    */
    58     virtual bool GetFilterNames(const char *deviceName, const char* groupName) = 0;
     59    virtual bool GetFilterNames(const char* groupName) = 0;
    5960
    6061    /** \brief The child class calls this function when the hardware successfully finished selecting a new filter wheel position
  • BAORadio/libindi/libindi/libs/indibase/indifilterwheel.cpp

    r642 r697  
    3535bool INDI::FilterWheel::initProperties()
    3636{
    37     DefaultDriver::initProperties();
     37    DefaultDevice::initProperties();
    3838
    39     initFilterProperties(deviceName(), FILTER_TAB);
     39    initFilterProperties(getDeviceName(), FILTER_TAB);
     40
     41    return true;
    4042}
    4143
     
    4446    //  First we let our parent populate
    4547    //IDLog("INDI::FilterWheel::ISGetProperties %s\n",dev);
    46     DefaultDriver::ISGetProperties(dev);
     48    DefaultDevice::ISGetProperties(dev);
    4749    if(isConnected())
    4850    {
    4951        defineNumber(FilterSlotNP);
    5052
    51         if (GetFilterNames(deviceName(), FILTER_TAB))
     53        if (GetFilterNames(FILTER_TAB))
    5254            defineText(FilterNameTP);
    5355    }
     
    6264    if(isConnected())
    6365    {
    64         initFilterProperties(deviceName(), FILTER_TAB);
     66        //initFilterProperties(getDeviceName(), FILTER_TAB);
    6567        defineNumber(FilterSlotNP);
    66         if (GetFilterNames(deviceName(), FILTER_TAB))
     68        if (GetFilterNames(FILTER_TAB))
    6769            defineText(FilterNameTP);
    6870    } else
     
    7779bool INDI::FilterWheel::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n)
    7880{
    79     return DefaultDriver::ISNewSwitch(dev, name, states, names,n);
     81    return DefaultDevice::ISNewSwitch(dev, name, states, names,n);
    8082}
    8183
     
    8486    //  first check if it's for our device
    8587    //IDLog("INDI::FilterWheel::ISNewNumber %s\n",name);
    86     if(strcmp(dev,deviceName())==0)
     88    if(strcmp(dev,getDeviceName())==0)
    8789    {
    8890        //  This is for our device
     
    119121    //  if we didn't process it, continue up the chain, let somebody else
    120122    //  give it a shot
    121     return DefaultDriver::ISNewNumber(dev,name,values,names,n);
     123    return DefaultDevice::ISNewNumber(dev,name,values,names,n);
    122124}
    123125
     
    127129    //IDLog("INDI::FilterWheel got %d new text items name %s\n",n,name);
    128130    //  first check if it's for our device
    129     if(strcmp(dev,deviceName())==0)
     131    if(strcmp(dev,getDeviceName())==0)
    130132    {
    131133        //  This is for our device
     
    151153    }
    152154
    153     return DefaultDriver::ISNewText(dev,name,texts,names,n);
     155    return DefaultDevice::ISNewText(dev,name,texts,names,n);
    154156}
    155157
     
    170172}
    171173
    172 void INDI::FilterWheel::ISSnoopDevice (XMLEle *root)
     174
     175bool INDI::FilterWheel::GetFilterNames(const char* groupName)
    173176{
    174  return;
    175 }
    176 
    177 
    178 bool INDI::FilterWheel::GetFilterNames(const char *deviceName, const char* groupName)
    179 {
    180     INDI_UNUSED(deviceName);
    181177    INDI_UNUSED(groupName);
    182178    return false;
  • BAORadio/libindi/libindi/libs/indibase/indifilterwheel.h

    r642 r697  
    2020#define INDI_FILTERWHEEL_H
    2121
    22 #include "defaultdriver.h"
     22#include "defaultdevice.h"
    2323#include "indifilterinterface.h"
    2424
     
    3232\see INDI::FilterInterface
    3333*/
    34 class INDI::FilterWheel: public INDI::DefaultDriver, public INDI::FilterInterface
     34class INDI::FilterWheel: public INDI::DefaultDevice, public INDI::FilterInterface
    3535{
    3636protected:
     
    4747        virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n);
    4848        virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);     
    49         virtual void ISSnoopDevice (XMLEle *root);
    5049
    5150   protected:
     
    5453    virtual bool SelectFilter(int);
    5554    virtual bool SetFilterNames();
    56     virtual bool GetFilterNames(const char *deviceName, const char* groupName);
     55    virtual bool GetFilterNames(const char* groupName);
    5756
    5857};
  • BAORadio/libindi/libindi/libs/indibase/indifocuser.cpp

    r642 r697  
    3838bool INDI::Focuser::initProperties()
    3939{
    40     DefaultDriver::initProperties();   //  let the base class flesh in what it wants
     40    DefaultDevice::initProperties();   //  let the base class flesh in what it wants
    4141
    4242    IUFillNumber(&FocusSpeedN[0],"FOCUS_SPEED_VALUE","Focus Speed","%3.0f",0.0,255.0,1.0,255.0);
    43     IUFillNumberVector(FocusSpeedNP,FocusSpeedN,1,deviceName(),"FOCUS_SPEED","Speed",MAIN_CONTROL_TAB,IP_RW,60,IPS_OK);
     43    IUFillNumberVector(FocusSpeedNP,FocusSpeedN,1,getDeviceName(),"FOCUS_SPEED","Speed",MAIN_CONTROL_TAB,IP_RW,60,IPS_OK);
    4444
    4545    IUFillNumber(&FocusTimerN[0],"FOCUS_TIMER_VALUE","Focus Timer","%4.0f",0.0,1000.0,10.0,1000.0);
    46     IUFillNumberVector(FocusTimerNP,FocusTimerN,1,deviceName(),"FOCUS_TIMER","Timer",MAIN_CONTROL_TAB,IP_RW,60,IPS_OK);
     46    IUFillNumberVector(FocusTimerNP,FocusTimerN,1,getDeviceName(),"FOCUS_TIMER","Timer",MAIN_CONTROL_TAB,IP_RW,60,IPS_OK);
    4747
    4848    IUFillSwitch(&FocusMotionS[0],"FOCUS_INWARD","Focus In",ISS_ON);
    4949    IUFillSwitch(&FocusMotionS[1],"FOCUS_OUTWARD","Focus Out",ISS_OFF);
    50     IUFillSwitchVector(FocusMotionSP,FocusMotionS,2,deviceName(),"FOCUS_MOTION","Direction",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_OK);
     50    IUFillSwitchVector(FocusMotionSP,FocusMotionS,2,getDeviceName(),"FOCUS_MOTION","Direction",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_OK);
    5151
    5252    return 0;
     
    5656{
    5757    //  First we let our parent populate
    58     DefaultDriver::ISGetProperties(dev);
     58    DefaultDevice::ISGetProperties(dev);
    5959
    6060    return;
     
    8282{
    8383    //  first check if it's for our device
    84     if(strcmp(dev,deviceName())==0)
     84    if(strcmp(dev,getDeviceName())==0)
    8585    {
    8686        //  This is for our device
     
    127127
    128128
    129     return DefaultDriver::ISNewNumber(dev,name,values,names,n);
     129    return DefaultDevice::ISNewNumber(dev,name,values,names,n);
    130130}
    131131
     
    133133{
    134134
    135     if(strcmp(dev,deviceName())==0)
     135    if(strcmp(dev,getDeviceName())==0)
    136136    {
    137137        //  This one is for us
     
    150150
    151151    //  Nobody has claimed this, so, ignore it
    152     return DefaultDriver::ISNewSwitch(dev,name,states,names,n);
     152    return DefaultDevice::ISNewSwitch(dev,name,states,names,n);
    153153}
    154154
    155155bool INDI::Focuser::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)
    156156{
    157     return DefaultDriver::ISNewText(dev, name, texts, names, n);
    158 }
    159 
    160 void INDI::Focuser::ISSnoopDevice (XMLEle *root)
    161 {
    162  return;
     157    return DefaultDevice::ISNewText(dev, name, texts, names, n);
    163158}
    164159
     
    172167}
    173168
     169bool INDI::Focuser::ISSnoopDevice (XMLEle *root)
     170{
     171    return false;
     172}
     173
  • BAORadio/libindi/libindi/libs/indibase/indifocuser.h

    r642 r697  
    2020#define INDIFOCUSSER_H
    2121
    22 #include "defaultdriver.h"
     22#include "defaultdevice.h"
    2323
    2424/**
     
    3030\author Gerry Rozema
    3131*/
    32 class INDI::Focuser : public INDI::DefaultDriver
     32class INDI::Focuser : public INDI::DefaultDevice
    3333{
    3434    public:
     
    4444        virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
    4545        virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);
    46         virtual void ISSnoopDevice (XMLEle *root);
     46        virtual bool ISSnoopDevice (XMLEle *root);
    4747
    4848    protected:
  • BAORadio/libindi/libindi/libs/indibase/inditelescope.cpp

    r642 r697  
    4646    MovementWESP = new ISwitchVectorProperty;
    4747    ConfigSV = new ISwitchVectorProperty;
     48    ScopeParametersNP = new INumberVectorProperty;
    4849
    4950}
     
    6061    delete MovementWESP;
    6162    delete ConfigSV;
     63    delete ScopeParametersNP;
    6264}
    6365
    6466bool INDI::Telescope::initProperties()
    6567{
    66     DefaultDriver::initProperties();
     68    DefaultDevice::initProperties();
    6769
    6870    IUFillNumber(&EqN[0],"RA","RA (hh:mm:ss)","%010.6m",0,24,0,0);
    6971    IUFillNumber(&EqN[1],"DEC","DEC (dd:mm:ss)","%010.6m",-90,90,0,0);
    70     IUFillNumberVector(EqNV,EqN,2,deviceName(),"EQUATORIAL_EOD_COORD","Eq. Coordinates",MAIN_CONTROL_TAB,IP_RO,60,IPS_IDLE);
     72    IUFillNumberVector(EqNV,EqN,2,getDeviceName(),"EQUATORIAL_EOD_COORD","Eq. Coordinates",MAIN_CONTROL_TAB,IP_RO,60,IPS_IDLE);
    7173
    7274    IUFillNumber(&EqReqN[0],"RA","RA (hh:mm:ss)","%010.6m",0,24,0,0);
    7375    IUFillNumber(&EqReqN[1],"DEC","DEC (dd:mm:ss)","%010.6m",-90,90,0,0);
    74     IUFillNumberVector(EqReqNV,EqReqN,2,deviceName(),"EQUATORIAL_EOD_COORD_REQUEST","GOTO",MAIN_CONTROL_TAB,IP_WO,60,IPS_IDLE);
     76    IUFillNumberVector(EqReqNV,EqReqN,2,getDeviceName(),"EQUATORIAL_EOD_COORD_REQUEST","GOTO",MAIN_CONTROL_TAB,IP_WO,60,IPS_IDLE);
    7577
    7678    IUFillNumber(&LocationN[0],"LAT","Lat (dd:mm:ss)","%010.6m",-90,90,0,0.0);
    7779    IUFillNumber(&LocationN[1],"LONG","Lon (dd:mm:ss)","%010.6m",-180,180,0,0.0 );
    78     IUFillNumberVector(LocationNV,LocationN,2,deviceName(),"GEOGRAPHIC_COORD","Scope Location",SITE_TAB,IP_RW,60,IPS_OK);
     80    IUFillNumberVector(LocationNV,LocationN,2,getDeviceName(),"GEOGRAPHIC_COORD","Scope Location",SITE_TAB,IP_RW,60,IPS_OK);
    7981
    8082    IUFillSwitch(&CoordS[0],"TRACK","Track",ISS_OFF);
    8183    IUFillSwitch(&CoordS[1],"SLEW","Slew",ISS_OFF);
    8284    IUFillSwitch(&CoordS[2],"SYNC","Sync",ISS_OFF);
    83     IUFillSwitchVector(CoordSV,CoordS,3,deviceName(),"ON_COORD_SET","On Set",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
     85    IUFillSwitchVector(CoordSV,CoordS,3,getDeviceName(),"ON_COORD_SET","On Set",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
    8486
    8587    IUFillSwitch(&ConfigS[0], "CONFIG_LOAD", "Load", ISS_OFF);
    8688    IUFillSwitch(&ConfigS[1], "CONFIG_SAVE", "Save", ISS_OFF);
    8789    IUFillSwitch(&ConfigS[2], "CONFIG_DEFAULT", "Default", ISS_OFF);
    88     IUFillSwitchVector(ConfigSV, ConfigS, 3, deviceName(), "CONFIG_PROCESS", "Configuration", "Options", IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
     90    IUFillSwitchVector(ConfigSV, ConfigS, 3, getDeviceName(), "CONFIG_PROCESS", "Configuration", "Options", IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
    8991
    9092
    9193    IUFillSwitch(&ParkS[0],"PARK","Park",ISS_OFF);
    92     IUFillSwitchVector(ParkSV,ParkS,1,deviceName(),"TELESCOPE_PARK","Park",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
     94    IUFillSwitchVector(ParkSV,ParkS,1,getDeviceName(),"TELESCOPE_PARK","Park",MAIN_CONTROL_TAB,IP_RW,ISR_1OFMANY,60,IPS_IDLE);
    9395
    9496    IUFillText(&PortT[0],"PORT","Port","/dev/ttyUSB0");
    95     IUFillTextVector(PortTV,PortT,1,deviceName(),"DEVICE_PORT","Ports",OPTIONS_TAB,IP_RW,60,IPS_IDLE);
     97    IUFillTextVector(PortTV,PortT,1,getDeviceName(),"DEVICE_PORT","Ports",OPTIONS_TAB,IP_RW,60,IPS_IDLE);
    9698
    9799    IUFillSwitch(&MovementNSS[MOTION_NORTH], "MOTION_NORTH", "North", ISS_OFF);
    98100    IUFillSwitch(&MovementNSS[MOTION_SOUTH], "MOTION_SOUTH", "South", ISS_OFF);
    99     IUFillSwitchVector(MovementNSSP, MovementNSS, 2, deviceName(),"TELESCOPE_MOTION_NS", "North/South", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
     101    IUFillSwitchVector(MovementNSSP, MovementNSS, 2, getDeviceName(),"TELESCOPE_MOTION_NS", "North/South", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
    100102
    101103    IUFillSwitch(&MovementWES[MOTION_WEST], "MOTION_WEST", "West", ISS_OFF);
    102104    IUFillSwitch(&MovementWES[MOTION_EAST], "MOTION_EAST", "East", ISS_OFF);
    103     IUFillSwitchVector(MovementWESP, MovementWES, 2, deviceName(),"TELESCOPE_MOTION_WE", "West/East", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
     105    IUFillSwitchVector(MovementWESP, MovementWES, 2, getDeviceName(),"TELESCOPE_MOTION_WE", "West/East", MOTION_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
     106
     107    IUFillNumber(&ScopeParametersN[0],"TELESCOPE_APERTURE","Aperture (mm)","%g",50,4000,0,0.0);
     108    IUFillNumber(&ScopeParametersN[1],"TELESCOPE_FOCAL_LENGTH","Focal Length (mm)","%g",100,10000,0,0.0 );
     109    IUFillNumberVector(ScopeParametersNP,ScopeParametersN,2,getDeviceName(),"TELESCOPE_PARAMETERS","Scope Properties",OPTIONS_TAB,IP_RW,60,IPS_OK);
    104110
    105111    TrackState=SCOPE_PARKED;
     
    111117    //  First we let our parent populate
    112118    //IDLog("INDI::Telescope::ISGetProperties %s\n",dev);
    113     DefaultDriver::ISGetProperties(dev);
     119    DefaultDevice::ISGetProperties(dev);
    114120
    115121    //  We may need the port set before we can connect
     
    128134        defineSwitch(MovementWESP);
    129135                defineSwitch(ConfigSV);
     136        defineNumber(ScopeParametersNP);
    130137
    131138    }
     
    136143{
    137144    defineText(PortTV);
     145
    138146    if(isConnected())
    139147    {
     
    146154        defineNumber(LocationNV);
    147155        defineSwitch(ParkSV);
    148 
    149     } else
    150     {
    151         //IDLog("INDI::Telescope deleting properties\n");
     156        defineNumber(ScopeParametersNP);
     157
     158    }
     159    else
     160    {
    152161        deleteProperty(CoordSV->name);
    153162        deleteProperty(EqNV->name);
     
    157166        deleteProperty(LocationNV->name);
    158167        deleteProperty(ParkSV->name);
    159 
    160         //initProperties();
    161     }
     168        deleteProperty(ScopeParametersNP->name);
     169
     170    }
     171
    162172        defineSwitch(ConfigSV);
    163173
     
    217227{
    218228    //  if we get here, our mount doesn't support sync
    219     IDMessage(deviceName(),"Mount does not support Sync");
     229    IDMessage(getDeviceName(),"Mount does not support Sync");
    220230    return false;
    221231}
     
    223233bool INDI::Telescope::MoveNS(TelescopeMotionNS dir)
    224234{
    225     IDMessage(deviceName(),"Mount does not support North/South motion");
     235    IDMessage(getDeviceName(),"Mount does not support North/South motion");
    226236    IUResetSwitch(MovementNSSP);
    227237    MovementNSSP->s = IPS_IDLE;
     
    232242bool INDI::Telescope::MoveWE(TelescopeMotionWE dir)
    233243{
    234     IDMessage(deviceName(),"Mount does not support West/East motion");
     244    IDMessage(getDeviceName(),"Mount does not support West/East motion");
    235245    IUResetSwitch(MovementWESP);
    236246    MovementWESP->s = IPS_IDLE;
     
    247257    //IDLog("INDI::Telescope got %d new text items name %s\n",n,name);
    248258    //  first check if it's for our device
    249     if(strcmp(dev,deviceName())==0)
     259    if(strcmp(dev,getDeviceName())==0)
    250260    {
    251261        //  This is for our device
     
    275285            //  We processed this one, so, tell the world we did it
    276286            return true;
    277         }
    278 
    279     }
    280 
    281     return DefaultDriver::ISNewText(dev,name,texts,names,n);
     287        }   
     288
     289    }
     290
     291    return DefaultDevice::ISNewText(dev,name,texts,names,n);
    282292}
    283293
     
    289299    //  first check if it's for our device
    290300    //IDLog("INDI::Telescope::ISNewNumber %s\n",name);
    291     if(strcmp(dev,deviceName())==0)
     301    if(strcmp(dev,getDeviceName())==0)
    292302    {
    293303        if(strcmp(name,"EQUATORIAL_EOD_COORD_REQUEST")==0)
     
    348358            IDSetNumber(LocationNV,NULL);
    349359        }
    350     }
    351 
    352 
    353 
    354     return DefaultDriver::ISNewNumber(dev,name,values,names,n);
     360
     361        if(strcmp(name,"TELESCOPE_PARAMETERS")==0)
     362        {
     363            ScopeParametersNP->s = IPS_OK;
     364
     365            IUUpdateNumber(ScopeParametersNP,values,names,n);
     366            IDSetNumber(ScopeParametersNP,NULL);
     367
     368            return true;
     369        }
     370
     371    }
     372
     373
     374
     375    return DefaultDevice::ISNewNumber(dev,name,values,names,n);
    355376}
    356377
     
    365386    //}
    366387
    367     if(strcmp(dev,deviceName())==0)
     388    if(strcmp(dev,getDeviceName())==0)
    368389    {
    369390        //  This one is for us
     
    420441
    421442    //  Nobody has claimed this, so, ignore it
    422     return DefaultDriver::ISNewSwitch(dev,name,states,names,n);
     443    return DefaultDevice::ISNewSwitch(dev,name,states,names,n);
    423444}
    424445
     
    466487        //if (isDebug())
    467488            IDLog("Failed to connect o port %s. Error: %s", port, errorMsg);
    468         IDMessage(deviceName(), "Failed to connect to port %s. Error: %s", port, errorMsg);
     489        IDMessage(getDeviceName(), "Failed to connect to port %s. Error: %s", port, errorMsg);
    469490
    470491        return false;
     
    481502    {
    482503        //  We got a valid scope status read
    483         IDMessage(deviceName(),"Telescope is online.");
     504        IDMessage(getDeviceName(),"Telescope is online.");
    484505        return rc;
    485506    }
     
    488509    //  So, we need to close our handle and send error messages
    489510    close(PortFD);
    490     //IDMessage(deviceName(),"Didn't find a synscan mount on Serial Port");
     511    //IDMessage(getDeviceName(),"Didn't find a synscan mount on Serial Port");
    491512
    492513    return false;
     
    502523
    503524    close(PortFD);
    504     IDMessage(deviceName(),"Telescope is offline.");
     525    IDMessage(getDeviceName(),"Telescope is offline.");
    505526
    506527    return true;
  • BAORadio/libindi/libindi/libs/indibase/inditelescope.h

    r642 r697  
    2020#define INDI_TELESCOPE_H
    2121
    22 #include "defaultdriver.h"
     22#include "defaultdevice.h"
    2323
    2424/**
     
    4242\see TelescopeSimulator and SynScan drivers for examples of implementations of INDI::Telescope.
    4343*/
    44 class INDI::Telescope : public INDI::DefaultDriver
     44class INDI::Telescope : public INDI::DefaultDevice
    4545{
    4646    private:
     
    173173        ISwitchVectorProperty *MovementWESP;
    174174
     175        INumber ScopeParametersN[2];
     176        INumberVectorProperty *ScopeParametersNP;
     177
    175178
    176179};
  • BAORadio/libindi/libindi/libs/indicom.c

    r642 r697  
    11511151}
    11521152
     1153/* Find index of the ON member of an ISwitchVectorProperty */
     1154int IUFindOnSwitchIndex(const ISwitchVectorProperty *svp)
     1155{
     1156        int i;
     1157
     1158        for (i = 0; i < svp->nsp; i++)
     1159            if (svp->sp[i].s == ISS_ON)
     1160                return i;
     1161        return -1;
     1162}
     1163
    11531164/* Set all switches to off */
    11541165void
  • BAORadio/libindi/libindi/libs/lilxml.c

    r642 r697  
    1515    You should have received a copy of the GNU Lesser General Public
    1616    License along with this library; if not, write to the Free Software
    17     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     17    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    1818
    1919#endif
  • BAORadio/libindi/libindi/libs/webcam/v4l2_base.cpp

    r490 r697  
    218218
    219219                if (-1 == xioctl (fd, VIDIOC_QBUF, &buf))
    220                         return errno_exit ("VIDIOC_QBUF", errmsg);
     220            return errno_exit ("ReadFrame IO_METHOD_MMAP: VIDIOC_QBUF", errmsg);
    221221
    222222                break;
     
    253253
    254254                if (-1 == xioctl (fd, VIDIOC_QBUF, &buf))
    255                         errno_exit ("VIDIOC_QBUF", errmsg);
     255            errno_exit ("ReadFrame IO_METHOD_USERPTR: VIDIOC_QBUF", errmsg);
    256256
    257257                break;
     
    303303
    304304        case IO_METHOD_MMAP:
    305                 for (i = 0; i < n_buffers; ++i) {
     305        for (i = 0; i < n_buffers; ++i)
     306        {
    306307                        struct v4l2_buffer buf;
    307308
     
    313314
    314315                        if (-1 == xioctl (fd, VIDIOC_QBUF, &buf))
    315                                 return errno_exit ("VIDIOC_QBUF", errmsg);
     316                            return errno_exit ("StartCapturing IO_METHOD_MMAP: VIDIOC_QBUF", errmsg);
    316317
    317318                }
    318                
     319
    319320                type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    320321
     
    340341
    341342                        if (-1 == xioctl (fd, VIDIOC_QBUF, &buf))
    342                                 return errno_exit ("VIDIOC_QBUF", errmsg);
     343                            return errno_exit ("StartCapturing IO_METHOD_USERPTR: VIDIOC_QBUF", errmsg);
    343344                }
    344345
Note: See TracChangeset for help on using the changeset viewer.