- Timestamp:
- Oct 22, 2012, 4:20:40 PM (12 years ago)
- Location:
- BAORadio/libindi/libindi
- Files:
-
- 67 edited
Legend:
- Unmodified
- Added
- Removed
-
BAORadio/libindi/libindi/.directory
r695 r697 1 1 [Dolphin] 2 Timestamp=2012,9,13,22,1,51 2 Timestamp=2012,10,21,16,15,23 3 Version=3 3 4 4 5 [Settings] 5 HiddenFilesShown=true6 6 ShowDotFiles=false -
BAORadio/libindi/libindi/.kdev4/libindi.kdev4
r693 r697 3 3 4 4 [CMake] 5 Build Dirs=/home/richard/libindi/libindi_build5 Build Directory Count=3 6 6 CMakeDir=/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 7 Current Build Directory Index=2 11 8 ProjectRootRelative=./ 9 10 [CMake][CMake Build Directory 0] 11 Build Directory Path=file:///home/richard/libindi/libindi_build 12 Build Type=Release 13 CMake Binary=file:///usr/bin/cmake 14 Install Directory=file:///usr/local 15 16 [CMake][CMake Build Directory 1] 17 Build Directory Path=file:///home/richard/BAORadio/libindi/libindi/build 18 Build Type=Debug 19 CMake Binary=file:///usr/bin/cmake 20 Environment Profile= 21 Extra Arguments= 22 Install Directory=file:///usr/local 23 24 [CMake][CMake Build Directory 2] 25 Build Directory Path=file:///home/richard/BAORadio/libindi/libindi/libindi_build 26 Build Type= 27 CMake Binary=file:///usr/bin/cmake 28 Environment Profile= 29 Extra Arguments= 30 Install Directory=file:///usr 31 32 [Launch] 33 Launch Configurations=Launch Configuration 0 34 35 [Launch][Launch Configuration 0] 36 Configured Launch Modes=execute 37 Configured Launchers=nativeAppLauncher 38 Name=Nouvelle configuration Application native 39 Type=Native Application 40 41 [Launch][Launch Configuration 0][Data] 42 Arguments=/home/richard/BAORadio/libindi/libindi/libindi_build/indi_BAO 43 Debugger Shell= 44 Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00) 45 Dependency Action=Nothing 46 Display Demangle Names=true 47 Display Static Members=false 48 EnvironmentGroup=default 49 Executable=file:///home/richard/BAORadio/libindi/libindi/libindi_build/indiserver 50 External Terminal=konsole --noclose --workdir %workdir -e %exe 51 GDB Path= 52 Project Target=libindi,indi_BAO 53 Remote GDB Config Script= 54 Remote GDB Run Script= 55 Remote GDB Shell Script= 56 Start With=ApplicationOutput 57 Use External Terminal=false 58 Working Directory=file:///home/richard/BAORadio/libindi/libindi/libindi_build 59 isExecutable=true 60 61 [MakeBuilder] 62 Install As Root=true 63 Su Command=2 12 64 13 65 [Project] -
BAORadio/libindi/libindi/BAOTest/BAOtest_main.cpp
r695 r697 18 18 #include <netinet/in.h> 19 19 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 21 41 22 42 using namespace std; … … 77 97 result.y=atoi(str.substr(7, 4).c_str()); 78 98 79 99 if (str[1]=='f') result.x=-result.x; 80 100 81 101 if (str[6]=='f') result.y=-result.y; … … 128 148 ***************************************************************************************/ 129 149 130 #define ERREURS 10 150 131 151 132 152 int main ( int argc, char *argv[] ) … … 135 155 char cIP; 136 156 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 142 160 143 161 // 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; 149 168 150 169 //init nbs aleÌatoires 151 if (ErreursAleatoires) srand(time(NULL)); 170 171 if (ERREURS_ALEATOIRES) srand(time(NULL)); 152 172 153 173 … … 159 179 std::cout << "1)- 192.168.0.1\n"; 160 180 std::cout << "2)- 127.0.0.1\n\n? "; 161 std::cin >> cIP; 181 182 std::cin >> cIP; 162 183 163 184 if (cIP=='1') strcpy(IP, "192.168.0.1"); … … 173 194 174 195 std::string reply; 175 std::string asks, memasks;196 std::string asks, memasks; 176 197 char chaine[5000]; 177 198 … … 182 203 183 204 int pos=asks.find("\n"); 205 184 206 memasks=asks; 185 207 186 208 while ((pos!=string::npos) && (asks.length()>1)) 187 209 { 188 memasks =asks.substr(pos+1);189 asks =asks.substr(0,pos);210 memasks = asks.substr(pos+1); 211 asks = asks.substr(0,pos); 190 212 191 213 strcpy(chaine, ""); 192 214 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; 214 245 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" ; 220 250 221 251 … … 224 254 225 255 strcpy(chaine,"ACK/POSITION\n"); 226 client_socket << chaine; 227 228 if (Affichage) std::cout << "MicrocontroÌ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 << "MicrocontroÌleur : " << chaine; 262 263 if (!Erreurs_Aleatoires) 231 264 { 232 265 sprintf(chaine, "POSITION/%05i/%05i/\n", Pos.x, Pos.y); … … 240 273 if (asks.find("G")!=string::npos) 241 274 { 242 #ifndef POSITIONS_DIRECT 243 NouvPos = ExtractPosition2(asks); 275 if (!POSITIONS_DIRECTES) 276 { 277 NouvPos = ExtractPosition2(asks); 244 278 245 279 NouvPos.x += Pos.x; 246 280 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 253 291 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) 257 298 { 258 299 std::cout << "MicrocontroÌleur : " << chaine; … … 261 302 } 262 303 263 if ( Aleat)304 if (!Erreurs_Aleatoires) 264 305 { 265 306 strcpy(chaine, "OK/GOTO/\n"); … … 273 314 if (asks.find("Z")!=string::npos) 274 315 { 275 276 316 strcpy(chaine, "ACK/PARK\n"); 277 client_socket << chaine; 278 279 if (Affichage) std::cout << "MicrocontroÌ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 << "MicrocontroÌleur : " << chaine; 323 324 if (!Erreurs_Aleatoires) 282 325 { 283 326 strcpy(chaine, "OK/PARK/\n"); … … 293 336 294 337 strcpy(chaine,"ACK/ABORT\n"); 295 client_socket << chaine; 296 297 if (Affichage) std::cout << "MicrocontroÌ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 << "MicrocontroÌleur : " << chaine; 344 345 if (!Erreurs_Aleatoires) 300 346 { 301 347 strcpy(chaine, "OK/ABORT/\n"); … … 307 353 } 308 354 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) 314 362 { 315 363 std::cout << "MicrocontroÌleur : " << chaine; … … 319 367 } 320 368 321 asks=memasks; 322 pos=asks.find("\n"); 369 asks = memasks; 370 371 pos = asks.find("\n"); 323 372 } 324 373 -
BAORadio/libindi/libindi/BAOcontrol/BAOcontrol.pro
r695 r697 1 1 ###################################################################### 2 # Automatically generated by qmake (2.01a) Thu Sep 27 14:47:4520122 # Automatically generated by qmake (2.01a) lun. oct. 22 16:02:51 2012 3 3 ###################################################################### 4 4 -
BAORadio/libindi/libindi/BAOcontrol/Makefile
r695 r697 1 1 ############################################################################# 2 2 # Makefile for building: BAOcontrol 3 # Generated by qmake (2.01a) (Qt 4.8. 1) on: Thu Sep 27 14:47:4520123 # Generated by qmake (2.01a) (Qt 4.8.3) on: lun. oct. 22 16:02:51 2012 4 4 # Project: BAOcontrol.pro 5 5 # Template: app -
BAORadio/libindi/libindi/BAOcontrol/baocontrol.cpp
r695 r697 177 177 a=15.0*(18.0+36.0/60.0+56.3/3600.0)*Pidiv180; 178 178 b=(38.0+47.0/60.0+3.1/3600.0)*Pidiv180; 179 179 180 180 a= 3.61082; 181 181 b=0.860677; … … 192 192 a22=5.55106; 193 193 b22=0.699053; 194 194 195 195 a=4.87356; 196 196 b=0.676912; … … 198 198 b22=0.579795; 199 199 200 200 201 201 a=3.73351; 202 202 b=0.334748; 203 203 a22=3.61661; 204 204 b22=0.241758; 205 205 206 206 207 207 //a=15.0*(18.0+37.0/60.0+22.0/3600.0)*Pidiv180; … … 259 259 AfficherLog(os.str(), true); 260 260 */ 261 261 262 262 263 263 … … 609 609 { 610 610 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); 702 696 703 697 } … … 1049 1043 return true; 1050 1044 } 1051 1045 1052 1046 if (commande == "R") 1053 1047 { … … 1704 1698 // et donc la magnitude < MAGNITUDEMAXETOILESCALIBRATION 1705 1699 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 ) 1707 1703 { 1708 1704 os.width(20); … … 1821 1817 // L'utilisateur a fait suivre la commande goto de l'indication J2000 1822 1818 1823 if (J2000 = (chaine.find("j2000") != string::npos)) 1819 J2000 = (chaine.find("j2000") != string::npos); 1820 1821 if ( J2000 ) 1824 1822 { 1825 1823 AfficherLog("Prise en compte de la précession, de la nutation et de l'aberration...\n", true); … … 2175 2173 if (!EnvoyerCommande((string)commande, &Message)) 2176 2174 { 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"); 2178 2176 } 2179 2177 else -
BAORadio/libindi/libindi/BAOcontrol/baoqt.cpp
r695 r697 112 112 #endif 113 113 114 #ifdef LAL 115 ui->lineEditIP->setText("134.158.88.199"); 116 #else 114 117 ui->lineEditIP->setText("127.0.0.1"); 115 //ui->lineEditIP->setText("134.158.88.199"); 118 #endif 116 119 117 120 ui->lineEdit_2->setText((QString("BAORadio, LAL, version ").append(VERSION)).toStdString().c_str()); … … 135 138 timer->start(100); 136 139 } 140 137 141 138 142 BAOqt::~BAOqt() -
BAORadio/libindi/libindi/CMakeLists.txt
r642 r697 6 6 set(CMAKE_INDI_VERSION_MAJOR 0) 7 7 set(CMAKE_INDI_VERSION_MINOR 9) 8 set(CMAKE_INDI_VERSION_RELEASE 0)8 set(CMAKE_INDI_VERSION_RELEASE 5) 9 9 set(CMAKE_INDI_VERSION_STRING "${CMAKE_INDI_VERSION_MAJOR}.${CMAKE_INDI_VERSION_MINOR}.${CMAKE_INDI_VERSION_RELEASE}") 10 10 … … 89 89 90 90 set (indiclient_SRCS 91 ${CMAKE_SOURCE_DIR}/libs/indibase/based river.cpp91 ${CMAKE_SOURCE_DIR}/libs/indibase/basedevice.cpp 92 92 ${CMAKE_SOURCE_DIR}/libs/indibase/baseclient.cpp 93 ${CMAKE_SOURCE_DIR}/libs/indibase/indiproperty.cpp 93 94 ) 94 95 95 96 set (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 98 100 ${CMAKE_SOURCE_DIR}/libs/indibase/indiccd.cpp 99 101 ${CMAKE_SOURCE_DIR}/libs/indibase/inditelescope.cpp … … 104 106 ${CMAKE_SOURCE_DIR}/libs/indibase/indifilterinterface.cpp 105 107 108 109 106 110 ) 107 111 … … 165 169 ########## TELESCOPE GROUP ########## 166 170 ##################################### 167 168 ########### LX200 Basic #############169 set(lx200basic_SRCS170 ${indimain_SRCS}171 ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c172 ${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_SRCS186 ${indimain_SRCS}187 ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c188 ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200autostar.cpp189 ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200_16.cpp190 ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200gps.cpp191 ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200generic.cpp192 ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200classic.cpp193 ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200apdriver.c194 ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200ap.cpp195 ${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.cmake208 "exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200classic)\n209 exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200autostar)\n210 exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200_16)\n211 exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200gps)\n212 exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200ap)\n213 exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic \$ENV{DESTDIR}${BIN_INSTALL_DIR}/indi_lx200fs2)\n214 ")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_SRCS220 ${indimain_SRCS}221 ${CMAKE_SOURCE_DIR}/drivers/telescope/celestronprotocol.c222 ${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_SRCS239 ${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_SRCS258 ${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_SRCS272 ${indimain_SRCS}273 ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c274 ${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_SRCS290 ${indimain_SRCS}291 ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c292 ${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 )303 171 304 172 ########### BAO ############### … … 325 193 326 194 install(TARGETS indi_BAO RUNTIME DESTINATION bin ) 327 ########### Syncscan ###############328 set(synscan_SRCS329 ${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_SRCS344 ${indimain_SRCS}345 ${CMAKE_SOURCE_DIR}/drivers/telescope/magellandriver.c346 ${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_SRCS358 ${indimain_SRCS}359 ${CMAKE_SOURCE_DIR}/drivers/telescope/ieq45driver.c360 ${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_SRCS372 ${indimain_SRCS}373 ${CMAKE_SOURCE_DIR}/drivers/telescope/telescope_simulator.cpp374 )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_SRCS390 ${indimain_SRCS}391 ${CMAKE_SOURCE_DIR}/drivers/ccd/ccd_simulator.cpp392 )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_SRCS416 ${indimain_SRCS}417 ${CMAKE_SOURCE_DIR}/drivers/focuser/robofocus.cpp418 )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_SRCS433 ${indimain_SRCS}434 ${CMAKE_SOURCE_DIR}/drivers/focuser/tcfs.cpp435 )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.cmake448 "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_SRCS459 ${indimain_SRCS}460 ${CMAKE_SOURCE_DIR}/drivers/filter_wheel/trutech_wheel.c461 )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_SRCS475 ${indimain_SRCS}476 ${CMAKE_SOURCE_DIR}/drivers/filter_wheel/filter_simulator.cpp477 )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_SRCS500 ${indimain_SRCS}501 ${CMAKE_SOURCE_DIR}/drivers/video/stvdriver.c502 ${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_SRCS522 ${indimain_SRCS}523 ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp524 ${CMAKE_SOURCE_DIR}/drivers/video/indi_lpi.cpp525 )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_SRCS547 ${indimain_SRCS}548 ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp549 ${CMAKE_SOURCE_DIR}/drivers/video/v4lphilips.cpp550 ${CMAKE_SOURCE_DIR}/drivers/video/indi_philips.cpp551 )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_SRCS573 ${indimain_SRCS}574 ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp575 ${CMAKE_SOURCE_DIR}/drivers/video/indi_v4l.cpp576 )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")590 195 591 196 ################################################################################# … … 647 252 install(TARGETS indi_eval RUNTIME DESTINATION bin ) 648 253 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 752 255 753 256 ################################################################################# … … 756 259 757 260 install( FILES indiapi.h indidevapi.h base64.h eventloop.h indidriver.h ${CMAKE_SOURCE_DIR}/libs/lilxml.h ${CMAKE_SOURCE_DIR}/libs/indibase/indibase.h 758 ${CMAKE_SOURCE_DIR}/libs/indibase/based river.h ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdriver.h261 ${CMAKE_SOURCE_DIR}/libs/indibase/basedevice.h ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdevice.h 759 262 ${CMAKE_SOURCE_DIR}/libs/indibase/indiccd.h ${CMAKE_SOURCE_DIR}/libs/indibase/indifilterwheel.h 760 263 ${CMAKE_SOURCE_DIR}/libs/indibase/indifocuser.h ${CMAKE_SOURCE_DIR}/libs/indibase/inditelescope.h 761 264 ${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 763 266 ${CMAKE_SOURCE_DIR}/libs/indicom.h ${CMAKE_SOURCE_DIR}/libs/indibase/indiusbdevice.h 764 267 DESTINATION ${INCLUDE_INSTALL_DIR}/libindi COMPONENT Devel) -
BAORadio/libindi/libindi/ChangeLog
r642 r697 1 From 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 1 9 From 0.8 to 0.9 2 10 -
BAORadio/libindi/libindi/Changelog-BAORadio
r692 r697 1 Version 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 1 8 Version 0.6.1 2 9 #Nouvelles fonctions / modifications -
BAORadio/libindi/libindi/Makefile
r693 r697 1 1 ############################################################################# 2 2 # Makefile for building: libindi 3 # Generated by qmake (2.01a) (Qt 4. 7.4) on: mar. juil. 10 03:01:5020123 # Generated by qmake (2.01a) (Qt 4.8.3) on: lun. oct. 22 02:49:51 2012 4 4 # Project: libindi.pro 5 5 # Template: app 6 # Command: /usr/bin/qmake - o Makefile libindi.pro6 # Command: /usr/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile libindi.pro 7 7 ############################################################################# 8 8 … … 11 11 CC = gcc 12 12 CXX = g++ 13 DEFINES = -DQT_ NO_DEBUG-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED14 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.13 DEFINES = -DQT_WEBKIT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED 14 CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES) 15 CXXFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES) 16 INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -Ilibs -IBAOcontrol -Icommuns -Ilibs/indibase -Iexamples -Idrivers/ccd -Idrivers/filter_wheel -Idrivers/focuser -Idrivers/telescope -Idrivers/video -Ilibs/webcam -IIndi_Stellarium/src -I. -I. 17 17 LINK = g++ 18 LFLAGS = -m64 -Wl,-O119 LIBS = $(SUBLIBS) -L/usr/lib 64 -lQtGui -L/usr/lib64 -L/usr/X11R6/lib64-lQtCore -lpthread18 LFLAGS = 19 LIBS = $(SUBLIBS) -L/usr/lib/x86_64-linux-gnu -lQtGui -lQtCore -lpthread 20 20 AR = ar cqs 21 21 RANLIB = … … 72 72 communs/ServerSocket.cpp \ 73 73 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 \82 74 libs/indicom.c \ 83 75 libs/lilxml.c \ … … 88 80 drivers/ccd/ccd_simulator.cpp \ 89 81 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 \98 82 drivers/telescope/BAO.cpp \ 99 83 drivers/telescope/celestrongps.cpp \ … … 119 103 drivers/telescope/telescope_simulator.cpp \ 120 104 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 \128 105 Indi_Stellarium/src/Connection.cpp \ 129 106 Indi_Stellarium/src/Listener.cpp \ … … 144 121 libs/indibase/inditelescope.cpp \ 145 122 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 \153 123 libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c \ 154 124 libindi_build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp moc_baoqt.cpp \ … … 185 155 ServerSocket.o \ 186 156 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 \195 157 indicom.o \ 196 158 lilxml.o \ … … 201 163 ccd_simulator.o \ 202 164 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 \211 165 BAO.o \ 212 166 celestrongps.o \ … … 232 186 telescope_simulator.o \ 233 187 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 \241 188 Connection.o \ 242 189 Listener.o \ … … 257 204 inditelescope.o \ 258 205 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 \266 206 CMakeCCompilerId.o \ 267 207 CMakeCXXCompilerId.o \ … … 271 211 moc_qledindicator.o \ 272 212 moc_selectstars.o 273 DIST = /usr/share/qt4/mkspecs/common/g++.conf \ 274 /usr/share/qt4/mkspecs/common/unix.conf \ 213 DIST = /usr/share/qt4/mkspecs/common/unix.conf \ 275 214 /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 \ 276 219 /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 \ 278 221 /usr/share/qt4/mkspecs/features/qt_functions.prf \ 279 222 /usr/share/qt4/mkspecs/features/qt_config.prf \ 280 223 /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ 281 224 /usr/share/qt4/mkspecs/features/default_pre.prf \ 282 /usr/share/qt4/mkspecs/features/ release.prf \225 /usr/share/qt4/mkspecs/features/debug.prf \ 283 226 /usr/share/qt4/mkspecs/features/default_post.prf \ 227 /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ 284 228 /usr/share/qt4/mkspecs/features/warn_on.prf \ 285 229 /usr/share/qt4/mkspecs/features/qt.prf \ … … 322 266 $(TARGET): ui_baoqt.h ui_liste.h ui_map.h ui_selectstars.h $(OBJECTS) 323 267 $(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 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 270 Makefile: libindi.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \ 327 271 /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 \ 328 276 /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 \ 330 278 /usr/share/qt4/mkspecs/features/qt_functions.prf \ 331 279 /usr/share/qt4/mkspecs/features/qt_config.prf \ 332 280 /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ 333 281 /usr/share/qt4/mkspecs/features/default_pre.prf \ 334 /usr/share/qt4/mkspecs/features/ release.prf \282 /usr/share/qt4/mkspecs/features/debug.prf \ 335 283 /usr/share/qt4/mkspecs/features/default_post.prf \ 284 /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ 336 285 /usr/share/qt4/mkspecs/features/warn_on.prf \ 337 286 /usr/share/qt4/mkspecs/features/qt.prf \ … … 343 292 /usr/share/qt4/mkspecs/features/lex.prf \ 344 293 /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 349 297 /usr/share/qt4/mkspecs/common/unix.conf: 350 298 /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: 351 303 /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: 353 305 /usr/share/qt4/mkspecs/features/qt_functions.prf: 354 306 /usr/share/qt4/mkspecs/features/qt_config.prf: 355 307 /usr/share/qt4/mkspecs/features/exclusive_builds.prf: 356 308 /usr/share/qt4/mkspecs/features/default_pre.prf: 357 /usr/share/qt4/mkspecs/features/ release.prf:309 /usr/share/qt4/mkspecs/features/debug.prf: 358 310 /usr/share/qt4/mkspecs/features/default_post.prf: 311 /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: 359 312 /usr/share/qt4/mkspecs/features/warn_on.prf: 360 313 /usr/share/qt4/mkspecs/features/qt.prf: … … 366 319 /usr/share/qt4/mkspecs/features/lex.prf: 367 320 /usr/share/qt4/mkspecs/features/include_source_dir.prf: 368 /usr/lib 64/libQtGui.prl:369 /usr/lib 64/libQtCore.prl:321 /usr/lib/x86_64-linux-gnu/libQtGui.prl: 322 /usr/lib/x86_64-linux-gnu/libQtCore.prl: 370 323 qmake: FORCE 371 @$(QMAKE) - o Makefile libindi.pro324 @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile libindi.pro 372 325 373 326 dist: 374 327 @$(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.0328 $(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 376 329 377 330 … … 415 368 BAOcontrol/Server.hpp \ 416 369 BAOcontrol/baoqt.h 417 /usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/baoqt.h -o moc_baoqt.cpp370 /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/baoqt.h -o moc_baoqt.cpp 418 371 419 372 moc_liste.cpp: BAOcontrol/liste.h 420 /usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/liste.h -o moc_liste.cpp373 /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/liste.h -o moc_liste.cpp 421 374 422 375 moc_map.cpp: communs/const.h \ 423 376 BAOcontrol/map.h 424 /usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/map.h -o moc_map.cpp377 /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/map.h -o moc_map.cpp 425 378 426 379 moc_qledindicator.cpp: BAOcontrol/qledindicator.h 427 /usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/qledindicator.h -o moc_qledindicator.cpp380 /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/qledindicator.h -o moc_qledindicator.cpp 428 381 429 382 moc_selectstars.cpp: BAOcontrol/ui_selectstars.h \ 430 383 BAOcontrol/selectstars.h 431 /usr/bin/moc $(DEFINES) $(INCPATH) BAOcontrol/selectstars.h -o moc_selectstars.cpp384 /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) BAOcontrol/selectstars.h -o moc_selectstars.cpp 432 385 433 386 compiler_rcc_make_all: … … 442 395 -$(DEL_FILE) ui_baoqt.h ui_liste.h ui_map.h ui_selectstars.h 443 396 ui_baoqt.h: BAOcontrol/baoqt.ui 444 /usr/bin/uic BAOcontrol/baoqt.ui -o ui_baoqt.h397 /usr/bin/uic-qt4 BAOcontrol/baoqt.ui -o ui_baoqt.h 445 398 446 399 ui_liste.h: BAOcontrol/liste.ui 447 /usr/bin/uic BAOcontrol/liste.ui -o ui_liste.h400 /usr/bin/uic-qt4 BAOcontrol/liste.ui -o ui_liste.h 448 401 449 402 ui_map.h: BAOcontrol/map.ui 450 /usr/bin/uic BAOcontrol/map.ui -o ui_map.h403 /usr/bin/uic-qt4 BAOcontrol/map.ui -o ui_map.h 451 404 452 405 ui_selectstars.h: BAOcontrol/selectstars.ui 453 /usr/bin/uic BAOcontrol/selectstars.ui -o ui_selectstars.h406 /usr/bin/uic-qt4 BAOcontrol/selectstars.ui -o ui_selectstars.h 454 407 455 408 compiler_yacc_decl_make_all: … … 634 587 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Socket.o communs/Socket.cpp 635 588 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.h642 $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_ccdpreview.o examples/tutorial_ccdpreview.c643 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.h653 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tutorial_client.o examples/tutorial_client.cpp654 655 tutorial_dome.o: examples/tutorial_dome.c indidevapi.h \656 indiapi.h \657 libs/lilxml.h \658 eventloop.h \659 libs/indicom.h660 $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_dome.o examples/tutorial_dome.c661 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.h673 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tutorial_four.o examples/tutorial_four.cpp674 675 tutorial_one.o: examples/tutorial_one.c indidevapi.h \676 indiapi.h \677 libs/lilxml.h \678 eventloop.h \679 libs/indicom.h680 $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_one.o examples/tutorial_one.c681 682 tutorial_rain.o: examples/tutorial_rain.c indidevapi.h \683 indiapi.h \684 libs/lilxml.h \685 eventloop.h \686 libs/indicom.h687 $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_rain.o examples/tutorial_rain.c688 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.h695 $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_three.o examples/tutorial_three.c696 697 tutorial_two.o: examples/tutorial_two.c indidevapi.h \698 indiapi.h \699 libs/lilxml.h \700 eventloop.h \701 libs/indicom.h702 $(CC) -c $(CFLAGS) $(INCPATH) -o tutorial_two.o examples/tutorial_two.c703 704 589 indicom.o: libs/indicom.c config.h \ 705 590 libs/indicom.h \ … … 730 615 ccd_simulator.o: drivers/ccd/ccd_simulator.cpp drivers/ccd/ccd_simulator.h \ 731 616 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 \ 738 624 indidriver.h \ 739 625 libs/indibase/indiguiderinterface.h … … 746 632 libs/indicom.h 747 633 $(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.h759 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o filter_simulator.o drivers/filter_wheel/filter_simulator.cpp760 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.h766 $(CC) -c $(CFLAGS) $(INCPATH) -o fli_wheel.o drivers/filter_wheel/fli_wheel.c767 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.h773 $(CC) -c $(CFLAGS) $(INCPATH) -o trutech_wheel.o drivers/filter_wheel/trutech_wheel.c774 775 fli_pdf.o: drivers/focuser/fli_pdf.c indidevapi.h \776 indiapi.h \777 libs/lilxml.h \778 eventloop.h \779 libs/indicom.h780 $(CC) -c $(CFLAGS) $(INCPATH) -o fli_pdf.o drivers/focuser/fli_pdf.c781 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.h788 $(CC) -c $(CFLAGS) $(INCPATH) -o robofocus.o drivers/focuser/robofocus.c789 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.h800 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o robofocus.o drivers/focuser/robofocus.cpp801 802 robofocusdriver.o: drivers/focuser/robofocusdriver.c libs/indicom.h \803 indidevapi.h \804 indiapi.h \805 libs/lilxml.h \806 drivers/focuser/robofocusdriver.h807 $(CC) -c $(CFLAGS) $(INCPATH) -o robofocusdriver.o drivers/focuser/robofocusdriver.c808 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.h818 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tcfs.o drivers/focuser/tcfs.cpp819 634 820 635 BAO.o: drivers/telescope/BAO.cpp drivers/telescope/BAO.h \ … … 1003 818 synscanmount.o: drivers/telescope/synscanmount.cpp drivers/telescope/synscanmount.h \ 1004 819 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 \ 1011 827 indidriver.h \ 1012 828 libs/indicom.h … … 1015 831 telescope_simulator.o: drivers/telescope/telescope_simulator.cpp drivers/telescope/telescope_simulator.h \ 1016 832 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 \ 1023 840 indidriver.h \ 1024 841 libs/indicom.h … … 1033 850 drivers/telescope/temmadriver.h 1034 851 $(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.h1047 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o indi_lpi.o drivers/video/indi_lpi.cpp1048 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.h1062 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o indi_philips.o drivers/video/indi_philips.cpp1063 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.h1075 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o indi_v4l.o drivers/video/indi_v4l.cpp1076 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.h1084 $(CC) -c $(CFLAGS) $(INCPATH) -o stv.o drivers/video/stv.c1085 1086 stvdriver.o: drivers/video/stvdriver.c drivers/video/stvdriver.h \1087 config.h \1088 libs/indicom.h1089 $(CC) -c $(CFLAGS) $(INCPATH) -o stvdriver.o drivers/video/stvdriver.c1090 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.h1102 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4ldriver.o drivers/video/v4ldriver.cpp1103 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.h1118 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4lphilips.o drivers/video/v4lphilips.cpp1119 852 1120 853 Connection.o: Indi_Stellarium/src/Connection.cpp Indi_Stellarium/src/Connection.hpp \ … … 1175 908 libs/lilxml.h \ 1176 909 libs/indibase/indibase.h \ 1177 libs/indibase/basedriver.h \ 910 libs/indibase/basedevice.h \ 911 libs/indibase/indiproperty.h \ 1178 912 libs/indicom.h 1179 913 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o baseclient.o libs/indibase/baseclient.cpp … … 1201 935 1202 936 indiccd.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 \ 1209 944 indidriver.h \ 1210 945 libs/indibase/indiguiderinterface.h … … 1222 957 1223 958 indifilterwheel.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 \ 1230 966 indidriver.h \ 1231 967 libs/indibase/indifilterinterface.h … … 1233 969 1234 970 indifocuser.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 \ 1241 978 indidriver.h 1242 979 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o indifocuser.o libs/indibase/indifocuser.cpp … … 1250 987 1251 988 inditelescope.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 \ 1258 996 indidriver.h \ 1259 997 libs/indicom.h … … 1267 1005 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o indiusbdevice.o libs/indibase/indiusbdevice.cpp 1268 1006 1269 ccvt_c2.o: libs/webcam/ccvt_c2.c libs/webcam/ccvt.h \1270 libs/webcam/ccvt_types.h1271 $(CC) -c $(CFLAGS) $(INCPATH) -o ccvt_c2.o libs/webcam/ccvt_c2.c1272 1273 ccvt_misc.o: libs/webcam/ccvt_misc.c libs/webcam/ccvt.h \1274 libs/webcam/ccvt_types.h1275 $(CC) -c $(CFLAGS) $(INCPATH) -o ccvt_misc.o libs/webcam/ccvt_misc.c1276 1277 port.o: libs/webcam/port.cpp libs/webcam/port.h1278 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o port.o libs/webcam/port.cpp1279 1280 PPort.o: libs/webcam/PPort.cpp libs/webcam/PPort.h \1281 libs/webcam/port.h1282 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o PPort.o libs/webcam/PPort.cpp1283 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.h1291 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4l1_base.o libs/webcam/v4l1_base.cpp1292 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.h1299 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4l1_pwc.o libs/webcam/v4l1_pwc.cpp1300 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.h1308 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o v4l2_base.o libs/webcam/v4l2_base.cpp1309 1310 1007 CMakeCCompilerId.o: libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c 1311 1008 $(CC) -c $(CFLAGS) $(INCPATH) -o CMakeCCompilerId.o libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c -
BAORadio/libindi/libindi/bao.sh
r693 r697 20 20 make clean 21 21 rm -f *.cmake *.h *.txt Makefile *.pc 22 rm -rf CMakeFiles /*22 rm -rf CMakeFiles 23 23 cd ../BAOcontrol 24 24 make clean 25 rm -f *.o *.cpp~ *.h~ BAOtest 25 rm -f *.o *.cpp~ *.h~ BAOcontrol 26 cd ../communs 27 rm -f *.cpp~ *.h~ 26 28 cd ../BAOTest 27 29 make clean 28 30 cd .. 31 rm -rf BAOcontrol-build-desktop-Qt_4_8_3__Syst_me__Debug 32 rm -rf BAOcontrol-build-desktop-Qt_4_8_3__Syst_me__Release 33 34 rm -f /usr/lib/libindi.so 35 rm -f /usr/bin/indiserver 36 rm -f /usr/lib/libindi.so.0 37 rm -f /usr/lib/libindimain.a 38 rm -f /usr/lib/libindidriver.a 39 rm -f /usr/lib/libindiclient.a 40 rm -f /usr/bin/indi_BAO 41 rm -f /usr/bin/indi_getprop 42 rm -f /usr/bin/indi_setprop 43 rm -f /usr/bin/indi_eval 44 rm -f /usr/share/indi/drivers.xml 45 rm -f /usr/share/indi/indi_tcfs_sk.xml 46 rm -f /usr/bin/BAOcontrol 47 rm -f /usr/bin/BAOtest 48 29 49 echo "Les fichiers ont été supprimés"; 30 50 fi … … 55 75 56 76 cd ../BAOcontrol 77 #à réactiver si on ajoute une nouvelle classe à BAOcontrol 57 78 qmake -project 58 79 qmake -
BAORadio/libindi/libindi/cmake_modules/FindGPHOTO2.cmake
r490 r697 45 45 endif (NOT LIBGPHOTO2_FIND_QUIETLY) 46 46 else (LIBGPHOTO2_FOUND) 47 if ( GLIBPHOTO2_FIND_REQUIRED)47 if (LIBGPHOTO2_FIND_REQUIRED) 48 48 message(FATAL_ERROR "libgphoto2 not found.") 49 49 endif (LIBGPHOTO2_FIND_REQUIRED) -
BAORadio/libindi/libindi/cmake_modules/FindINDI.cmake
r642 r697 31 31 ) 32 32 33 find_path(INDI_DATA_DIR drivers.xml34 PATHS /usr/share /usr/local/share /opt ${GNUWIN32_DIR}/share35 PATH_SUFFIXES indi33 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 36 36 ) 37 37 -
BAORadio/libindi/libindi/communs/Socket.cpp
r644 r697 181 181 } 182 182 } 183 184 //TODO:: à vérifier - ajouté le 22/10/2012 185 return 0; 183 186 } 184 187 -
BAORadio/libindi/libindi/communs/alignement.cpp
r695 r697 372 372 double EQMQ[4][4]; 373 373 374 Coord a1, a2, a3, m1, m2, m3 , c1, c2;374 Coord a1, a2, a3, m1, m2, m3; 375 375 376 376 AzHa2XY(aa1.x, aa1.y, &a1.x, &a1.y); … … 762 762 Coord c1, c2, c3, c4, m1, m2, m3, mm1, mm2, mm3, mm,mmm, result; 763 763 764 double i,j, k, l, m;764 double j, k, l, m; 765 765 766 766 double memBC = BC0; -
BAORadio/libindi/libindi/communs/const.h
r695 r697 8 8 ////////////////////////////////////////// 9 9 10 #define VERSION "0.6 3"11 #define VERSION_DATE "2 8/09/12"10 #define VERSION "0.64" 11 #define VERSION_DATE "22/10/12" 12 12 13 13 //#define ET_UT 0.0 14 14 #define ET_UT 66.185 15 16 //Version à utiliser avec l'antenne du LAL ? 17 18 #define LAL 15 19 16 20 // ParamÚtres de l'instrument … … 28 32 29 33 #define MAXLOG 100000 30 #define MAXOBJETS 100 034 #define MAXOBJETS 100 31 35 #define MAXETOILES 250 32 36 #define MAXANTENNES 50 -
BAORadio/libindi/libindi/communs/filetools.cpp
r644 r697 816 816 { 817 817 818 fprintf (pFile, pSection->name);818 fprintf (pFile, "%s", pSection->name); 819 819 fprintf (pFile, "\n"); 820 820 pKey = pSection->fils; … … 840 840 offset = strlen (pKey->name) + 1; 841 841 strcpy (str + offset, pKey->value); 842 fprintf (pFile, str);842 fprintf (pFile, "%s", str); 843 843 fprintf (pFile, "\n"); 844 844 pKey_pred = pKey; … … 855 855 //nettoyage 856 856 fclose (pFile); 857 858 return 0; 857 859 } 858 860 … … 954 956 { 955 957 int ind = 0; 956 for (ind; (ind < strlen (str)) && (str[ind] != '='); ind++);958 for (ind; (ind < (int)strlen (str)) && (str[ind] != '='); ind++); 957 959 if (str[ind] == '=') 958 960 return ind; -
BAORadio/libindi/libindi/communs/logs.cpp
r650 r697 71 71 72 72 if ( Taille(fichier) > TAILLEMAXLOGS ) remove(fichier.c_str()); 73 74 pFile = fopen(fichier.c_str(), "a"); 73 75 74 if ( (pFile = fopen(fichier.c_str(), "a"))!= NULL)76 if ( pFile != NULL) 75 77 { 76 78 time_t rawtime; 77 79 struct tm * timeinfo; 78 80 79 char buffer[80]; 81 char *buffer; 82 83 buffer = new char[100]; 80 84 81 85 // On sauvegarde la date et l'heure … … 83 87 time ( &rawtime ); 84 88 timeinfo = localtime ( &rawtime ); 85 strftime (buffer, 80,"%c ",timeinfo);86 fprintf(pFile, buffer);89 strftime (buffer, 80, "%c ",timeinfo); 90 fprintf(pFile, "%s", buffer); 87 91 88 92 // On le sauvegarde dans le fichier log 89 93 90 fprintf(pFile, Message.c_str());94 fprintf(pFile, "%s", Message.c_str()); 91 95 92 96 fclose(pFile); 97 98 delete [] buffer; 93 99 } 94 100 else -
BAORadio/libindi/libindi/config.h
r501 r697 1 -
BAORadio/libindi/libindi/drivers.xml
r642 r697 1 1 <devGroup group="Telescopes"> 2 <device label="BAO" focal_length="" aperture="">3 <driver name="BAO">indi_BAO</driver>4 <version>1.0</version>5 </device>6 2 <device label="LX200 Basic" focal_length="" aperture=""> 7 3 <driver name="LX200 Basic">indi_lx200basic</driver> … … 122 118 </devGroup> 123 119 <devGroup group="Focusers"> 120 <device label="Focuser Simulator"> 121 <driver name="Focuser Simulator">indi_simulator_focus</driver> 122 <version>1.0</version> 123 </device> 124 124 <device label="RoboFocus"> 125 125 <driver name="RoboFocus">indi_robo_focus</driver> … … 153 153 <devGroup group="Video"> 154 154 <device label="Generic Video4Linux"> 155 <driver name="Video4Linux Generic Device">indi_v4l_generic</driver>155 <driver name="Generic Video4Linux">indi_v4l_generic</driver> 156 156 <version>1.0</version> 157 157 </device> 158 158 <device label="Philips Webcam"> 159 <driver name="Video4Linux Generic Device">indi_v4l_philips</driver>159 <driver name="Generic Video4Linux">indi_v4l_philips</driver> 160 160 <version>1.0</version> 161 161 </device> … … 164 164 <version>0.1</version> 165 165 </device> 166 <device label="SBIG STV">166 <device label="STV Guider"> 167 167 <driver name="STV Guider">indi_sbig_stv</driver> 168 168 <version>0.1</version> -
BAORadio/libindi/libindi/drivers/ccd/ccd_simulator.cpp
r642 r697 24 24 #include <string.h> 25 25 26 #include <memory> 27 26 28 27 29 // We declare an auto pointer to ccdsim. … … 133 135 SetCCDParams(SimulatorSettingsN[0].value,SimulatorSettingsN[1].value,16,SimulatorSettingsN[2].value,SimulatorSettingsN[3].value); 134 136 // Kwiq 135 maxnoise=SimulatorSettingsN[ 10].value;136 skyglow=SimulatorSettingsN[ 11].value;137 maxnoise=SimulatorSettingsN[8].value; 138 skyglow=SimulatorSettingsN[9].value; 137 139 maxval=SimulatorSettingsN[4].value; 138 140 bias=SimulatorSettingsN[5].value; 139 141 limitingmag=SimulatorSettingsN[7].value; 140 142 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); 144 144 145 145 nbuf = PrimaryCCD.getXRes() * PrimaryCCD.getYRes() * PrimaryCCD.getBPP(); … … 154 154 155 155 int nbuf; 156 SetupParms();157 156 158 157 if(HasGuideHead) … … 191 190 IUFillNumber(&SimulatorSettingsN[6],"SIM_SATURATION","Saturation Mag","%4.1f",0,20,0,1.0); 192 191 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); 199 196 200 197 … … 202 199 IUFillSwitch(&TimeFactorS[1],"10X","10x",ISS_OFF); 203 200 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); 208 209 209 210 return true; … … 219 220 defineNumber(SimulatorSettingsNV); 220 221 defineSwitch(TimeFactorSV); 221 //IDDefText(&ConfigFileTV, NULL);222 //IDDefSwitch(&ConfigSaveRestoreSV, NULL);223 224 222 225 223 return; … … 231 229 232 230 INDI::CCD::updateProperties(); 231 232 if (isConnected()) 233 SetupParms(); 234 233 235 return true; 234 236 } … … 310 312 311 313 PrimaryCCD.setExposure(timeleft); 312 //ImageExposureN[0].value = timeleft;313 //IDSetNumber(ImageExposureNP, NULL);314 314 315 315 if(timeleft < 1.0) … … 567 567 } else 568 568 { 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 ??"); 570 570 //fprintf(stderr,"Error doing gsc lookup\n"); 571 571 } 572 572 if(drawn==0) 573 573 { 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 ??"); 575 575 576 576 } … … 839 839 // first check if it's for our device 840 840 //IDLog("INDI::CCD::ISNewNumber %s\n",name); 841 if(strcmp(dev, deviceName())==0)841 if(strcmp(dev,getDeviceName())==0) 842 842 { 843 843 // This is for our device … … 889 889 //} 890 890 891 if(strcmp(dev, deviceName())==0) {891 if(strcmp(dev,getDeviceName())==0) { 892 892 // This one is for us 893 893 … … 924 924 } 925 925 926 bool 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 72 72 73 73 INumberVectorProperty *SimulatorSettingsNV; 74 INumber SimulatorSettingsN[1 3];74 INumber SimulatorSettingsN[11]; 75 75 76 76 ISwitch TimeFactorS[3]; … … 78 78 79 79 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; 80 88 81 89 public: … … 114 122 virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n); 115 123 virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n); 124 virtual bool ISSnoopDevice (XMLEle *root); 116 125 117 126 }; -
BAORadio/libindi/libindi/drivers/filter_wheel/filter_simulator.cpp
r642 r697 19 19 #include "filter_simulator.h" 20 20 21 #include <memory> 21 22 22 23 // We declare an auto pointer to FilterSim. … … 99 100 CurrentFilter=1; 100 101 MinFilter=1; 101 MaxFilter=7; 102 MaxFilter=5; 103 FilterSlotN[0].max = MaxFilter; 102 104 return true; 103 105 } … … 119 121 SelectFilterDone(CurrentFilter); 120 122 } 123 124 bool 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 38 38 39 39 virtual bool SetFilterNames() { return false; } 40 virtual bool GetFilterNames(const char *deviceName, const char* groupName) { return false; }40 virtual bool GetFilterNames(const char* groupName); 41 41 42 42 -
BAORadio/libindi/libindi/drivers/focuser/robofocus.cpp
r646 r697 26 26 #include <string.h> 27 27 #include <sys/time.h> 28 #include <unistd.h> 29 #include <memory> 28 30 29 31 #define RF_MAX_CMD 9 … … 102 104 { 103 105 ISInit(); 104 roboFocus->ISSnoopDevice(root);105 106 } 106 107 … … 127 128 /* Port */ 128 129 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); 130 131 131 132 132 133 /* Focuser temperature */ 133 134 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); 135 136 136 137 /* Settings of the Robofocus */ … … 138 139 IUFillNumber(&SettingsN[1], "Step Delay", "Step delay", "%6.0f", 0., 255., 0., 1.0); 139 140 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); 141 142 142 143 /* Power Switches of the Robofocus */ … … 145 146 IUFillSwitch(&PowerSwitchesS[2], "3", "Switch 3", ISS_OFF); 146 147 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); 148 149 149 150 /* Robofocus should stay within these limits */ 150 151 IUFillNumber(&MinMaxPositionN[0], "MINPOS", "Minimum Tick", "%6.0f", 1., 65000., 0., 100. ); 151 152 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); 153 154 154 155 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 ); 156 157 157 158 /* Set Robofocus position register to the this position */ 158 159 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); 160 161 161 162 /* Backlash */ 162 163 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); 164 165 165 166 /* Robofocus` position (RO) */ 166 167 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); 168 169 169 170 170 171 /* Relative and absolute movement */ 171 172 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); 173 174 174 175 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); 176 177 177 178 … … 245 246 IDLog("Failed to connect o port %s. Error: %s", PortT[0].text, errorMsg); 246 247 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); 248 249 249 250 return false; … … 254 255 { 255 256 /* 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"); 257 258 return false; 258 259 } 259 260 260 IDMessage( deviceName(), "Robofocus is online. Getting focus parameters...");261 IDMessage(getDeviceName(), "Robofocus is online. Getting focus parameters..."); 261 262 262 263 GetFocusParams(); 263 264 264 IDMessage( deviceName(), "RoboFocus paramaters readout complete, focuser ready for use.");265 IDMessage(getDeviceName(), "RoboFocus paramaters readout complete, focuser ready for use."); 265 266 266 267 return true; … … 270 271 { 271 272 tty_disconnect(PortFD); 272 IDMessage( deviceName(), "RoboFocus is offline.");273 IDMessage(getDeviceName(), "RoboFocus is offline."); 273 274 return true; 274 275 } … … 390 391 { 391 392 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); 393 394 } 394 395 return false; … … 848 849 bool RoboFocus::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n) 849 850 { 850 if(strcmp(dev, deviceName())==0)851 if(strcmp(dev,getDeviceName())==0) 851 852 { 852 853 // =================================== … … 870 871 bool RoboFocus::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) 871 872 { 872 if(strcmp(dev, deviceName())==0)873 if(strcmp(dev,getDeviceName())==0) 873 874 { 874 875 if (!strcmp (name, PowerSwitchesSP.name)) … … 951 952 int nset=0,i=0; 952 953 953 if(strcmp(dev, deviceName())==0)954 if(strcmp(dev,getDeviceName())==0) 954 955 { 955 956 … … 1086 1087 IDSetNumber(&PositionNP, "Robofocus position recovered %5.0f", currentPosition); 1087 1088 1088 IDMessage( deviceName(), "Robofocus position recovered resuming normal operation");1089 IDMessage( getDeviceName(), "Robofocus position recovered resuming normal operation"); 1089 1090 1090 1091 /* We have to leave here, because new_rpos is not set */ … … 1170 1171 PositionNP.s = IPS_OK; 1171 1172 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"); 1173 1174 /* We have to leave here, because new_apos is not set */ 1174 1175 return false; … … 1405 1406 PositionNP.s = IPS_OK; 1406 1407 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"); 1408 1409 /* We have to leave here, because new_apos is not set */ 1409 1410 return true ; -
BAORadio/libindi/libindi/drivers/focuser/tcfs.cpp
r642 r697 156 156 static int propInit=0; 157 157 158 INDI::DefaultD river::ISGetProperties(dev);158 INDI::DefaultDevice::ISGetProperties(dev); 159 159 160 160 if (propInit == 0) … … 239 239 if (tty_connect(tProp->tp[0].text, 19200, 8, 0, 1, &fd) != TTY_OK) 240 240 { 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); 242 242 return false; 243 243 } … … 251 251 if (!strcmp(response, "!")) 252 252 { 253 IDMessage( deviceName(), "Successfully connected to TCF-S Focuser in Manual Mode.");253 IDMessage(getDeviceName(), "Successfully connected to TCF-S Focuser in Manual Mode."); 254 254 255 255 IUResetSwitch(FocusModeSP); … … 274 274 } 275 275 276 IDMessage( deviceName(), "Error connecting to TCF-S focuser...");276 IDMessage(getDeviceName(), "Error connecting to TCF-S focuser..."); 277 277 return false; 278 278 … … 316 316 { 317 317 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."); 319 319 return false; 320 320 } … … 355 355 } 356 356 357 return DefaultD river::ISNewNumber (dev, name, values, names, n);357 return DefaultDevice::ISNewNumber (dev, name, values, names, n); 358 358 359 359 } … … 383 383 384 384 385 return DefaultD river::ISNewText(dev, name, texts, names, n);385 return DefaultDevice::ISNewText(dev, name, texts, names, n); 386 386 387 387 } … … 396 396 ISwitch *current_active_switch = NULL, *target_active_switch = NULL; 397 397 // First process parent! 398 if (INDI::DefaultD river::ISNewSwitch(deviceName(), name, states, names, n) == true)398 if (INDI::DefaultDevice::ISNewSwitch(getDeviceName(), name, states, names, n) == true) 399 399 return true; 400 400 … … 417 417 { 418 418 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."); 420 420 return false; 421 421 } … … 664 664 665 665 666 return DefaultD river::ISNewSwitch(dev, name, states, names, n);666 return DefaultDevice::ISNewSwitch(dev, name, states, names, n); 667 667 } 668 668 -
BAORadio/libindi/libindi/drivers/focuser/tcfs.h
r642 r697 27 27 #include <indidevapi.h> 28 28 #include <indicom.h> 29 #include <indibase/defaultd river.h>29 #include <indibase/defaultdevice.h> 30 30 31 31 using namespace std; … … 35 35 #define TCFS_ERROR_BUFFER 1024 36 36 37 class TCFS : public INDI::DefaultD river37 class TCFS : public INDI::DefaultDevice 38 38 { 39 39 -
BAORadio/libindi/libindi/drivers/telescope/BAO.cpp
r695 r697 652 652 else if (chaine[0] == 'M') 653 653 { 654 IDSetText(&CommandTP, "Calcul des matrices de correction\n" ); 655 656 if (Sockets[targetAlignmentIP].AlignementAntenne->nbrcorrections >=3 ) 654 if (targetAlignmentIP != -1) 657 655 { 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( 665 691 Sockets[targetAlignmentIP].IP, 666 692 "/home/" + (string)getenv("USER") + "/AlignementAntennes.cfg"); 667 693 } 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 } 689 695 else if (chaine[0] == 'O') 690 696 { 691 IDSetText(&CommandTP, "Optimisation de la geometrie de l antenne\n" );692 693 697 if (targetAlignmentIP != -1) 694 698 { 699 IDSetText(&CommandTP, "Optimisation de la geometrie de l antenne\n" ); 700 695 701 Sockets[targetAlignmentIP].AlignementAntenne->OptimisationGeometrieAntenne(true); 696 702 … … 1798 1804 1799 1805 double az, ha, ad, de; 1800 1806 1801 1807 int num = Sockets[i].AlignementAntenne->nbrcorrections; 1802 1808 -
BAORadio/libindi/libindi/drivers/telescope/celestrongps.cpp
r642 r697 447 447 448 448 if (IUUpdateSwitch(&OnCoordSetSP, states, names, n) < 0) return; 449 OnCoordSetSP.s = IPS_OK; 450 IDSetSwitch(&OnCoordSetSP, NULL); 449 451 currentSet = getOnSwitch(&OnCoordSetSP); 450 452 } … … 524 526 last_move = getOnSwitch(&MovementNSSP); 525 527 526 if (IUUpdateSwitch(&MovementNSSP, states, names, n) < 0) 527 IDLog("fixme!!! - IUUpdateSwitch MovementNSSP\n"); 528 // return; 528 IUUpdateSwitch(&MovementNSSP, states, names, n); 529 529 530 530 current_move = getOnSwitch(&MovementNSSP); -
BAORadio/libindi/libindi/drivers/telescope/lx200basic.cpp
r501 r697 45 45 46 46 const int POLLMS = 1000; // Period of update, 1 second. 47 c onst char *mydev = "LX200 Basic";// Name of our device.47 char *mydev; // Name of our device. 48 48 49 49 const char *BASIC_GROUP = "Main Control"; // Main Group … … 151 151 LX200Basic::LX200Basic() 152 152 { 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 153 162 init_properties(); 154 163 -
BAORadio/libindi/libindi/drivers/telescope/lx200fs2.cpp
r646 r697 64 64 65 65 IDLog("Initilizing from LX200 FS2 device...\n"); 66 IDLog("Driver Version: 201 1-01-02\n");66 IDLog("Driver Version: 2012-07-22\n"); 67 67 68 68 //enableSimulation(true); … … 151 151 152 152 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 } 154 157 else 155 158 return check_lx200_connection(fd); … … 216 219 void LX200Fs2::getBasicData() 217 220 { 218 219 // process parent first 220 LX200Generic::getBasicData(); 221 //LX200Generic::getBasicData() 221 222 // Make sure short 222 223 //checkLX200Format(fd); -
BAORadio/libindi/libindi/drivers/telescope/lx200generic.cpp
r642 r697 507 507 508 508 } 509 509 IEAddTimer (POLLMS, ISPoll, NULL); 510 510 } 511 511 512 512 void ISGetProperties (const char *dev) 513 { ISInit(); telescope->ISGetProperties(dev); IEAddTimer (POLLMS, ISPoll, NULL);}513 { ISInit(); telescope->ISGetProperties(dev);} 514 514 void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) 515 515 { ISInit(); telescope->ISNewSwitch(dev, name, states, names, n);} … … 555 555 IDLog("INDI Library v%g\n", INDI_LIBV); 556 556 IDLog("initilizaing from generic LX200 device...\n"); 557 IDLog("Driver Version: 20 08-05-21\n");557 IDLog("Driver Version: 2012-07-27\n"); 558 558 559 //enableSimulation(true); 559 //enableSimulation(true); 560 560 } 561 561 … … 1750 1750 mountSim(); 1751 1751 return; 1752 1752 } 1753 1753 1754 1754 if ( (err = getLX200RA(fd, ¤tRA)) < 0 || (err = getLX200DEC(fd, ¤tDEC)) < 0) … … 1777 1777 break; 1778 1778 1779 1779 case IPS_BUSY: 1780 1780 dx = targetRA - currentRA; 1781 1781 dy = targetDEC - currentDEC; … … 1789 1789 EquatorialCoordsWNP.s = IPS_OK; 1790 1790 IDSetNumber(&EquatorialCoordsWNP, "Slew is complete, target locked..."); 1791 1792 1791 } 1792 break; 1793 1793 1794 1794 case IPS_OK: … … 1801 1801 } 1802 1802 1803 } 1803 1804 1804 // wildi nothing changed in LX200Generic::mountSim 1805 1805 void LX200Generic::mountSim () … … 2117 2117 } 2118 2118 2119 tty_disconnect(fd); // Close if already open 2119 2120 if (tty_connect(PortTP.tp[0].text, 9600, 8, 0, 1, &fd) != TTY_OK) 2120 2121 { -
BAORadio/libindi/libindi/drivers/telescope/magellan1.cpp
r646 r697 98 98 void ISInit() 99 99 { 100 static int isInit=0; 101 102 if (isInit) 103 return; 100 104 if (telescope == NULL) 101 105 { … … 104 108 telescope->setCurrentDeviceName(mydev); 105 109 } 110 111 isInit = 1; 112 IEAddTimer (POLLMS, ISPoll, NULL); 106 113 } 107 114 108 115 void ISGetProperties (const char *dev) 109 { ISInit(); telescope->ISGetProperties(dev); IEAddTimer (POLLMS, ISPoll, NULL);}116 { ISInit(); telescope->ISGetProperties(dev);} 110 117 111 118 void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) -
BAORadio/libindi/libindi/drivers/telescope/synscanmount.cpp
r642 r697 119 119 void SynscanMount::ISGetProperties (const char *dev) 120 120 { 121 //if (isDebug())122 IDLog("Enter SynscanMount::ISGetProperties %s\n",dev);123 124 121 // First we let our parent class do it's thing 125 122 INDI::Telescope::ISGetProperties(dev); … … 147 144 // this is not a correct echo 148 145 //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"); 151 148 return false; 152 149 } … … 183 180 ParkSV->s=IPS_OK; 184 181 IDSetSwitch(ParkSV,NULL); 185 IDMessage( deviceName(),"Telescope is Parked.");182 IDMessage(getDeviceName(),"Telescope is Parked."); 186 183 } 187 184 … … 276 273 277 274 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 9 9 #include "telescope_simulator.h" 10 10 #include "indicom.h" 11 12 #include <memory> 11 13 12 14 // We declare an auto pointer to ScopeSim. … … 126 128 IUFillNumber(&GuideNSN[GUIDE_NORTH], "TIMED_GUIDE_N", "North (sec)", "%g", 0, 10, 0.001, 0); 127 129 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); 129 131 130 132 /* Property for guider support. How many seconds to guide either westward or eastward? */ 131 133 IUFillNumber(&GuideWEN[GUIDE_WEST], "TIMED_GUIDE_W", "West (sec)", "%g", 0, 10, 0.001, 0); 132 134 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); 134 136 135 137 /* Simulated periodic error in RA, DEC */ 136 138 IUFillNumber(&EqPECN[RA_AXIS],"RA_PEC","RA (hh:mm:ss)","%010.6m",0,24,0,15.); 137 139 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); 139 141 140 142 /* Enable client to manually add periodic error northward or southward for simulation purposes */ 141 143 IUFillSwitch(&PECErrNSS[MOTION_NORTH], "PEC_N", "North", ISS_OFF); 142 144 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); 144 146 145 147 /* Enable client to manually add periodic error westward or easthward for simulation purposes */ 146 148 IUFillSwitch(&PECErrWES[MOTION_WEST], "PEC_W", "West", ISS_OFF); 147 149 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); 149 151 150 152 /* How fast do we guide compared to sideral rate */ 151 153 IUFillNumber(&GuideRateN[RA_AXIS], "GUIDE_RATE_WE", "W/E Rate", "%g", 0, 1, 0.1, 0.3); 152 154 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; 154 162 155 163 /* Add debug controls so we may debug driver if necessary */ … … 197 205 deleteProperty(EqPECNV->name); 198 206 deleteProperty(PECErrNSSP->name); 199 deleteProperty(PECErr NSSP->name);207 deleteProperty(PECErrWESP->name); 200 208 deleteProperty(GuideRateNP->name); 201 209 } … … 218 226 } 219 227 220 bool ScopeSim::Connect(char * )221 { 222 228 bool ScopeSim::Connect(char *port) 229 { 230 return true; 223 231 } 224 232 … … 292 300 switch (TrackState) 293 301 { 294 case SCOPE_IDLE:302 /*case SCOPE_IDLE: 295 303 EqNV->s = IPS_IDLE; 296 break; 304 break;*/ 297 305 case SCOPE_SLEWING: 298 306 case SCOPE_PARKING: … … 340 348 341 349 EqNV->s = IPS_OK; 342 IDMessage( deviceName(), "Telescope slew is complete. Tracking...");350 IDMessage(getDeviceName(), "Telescope slew is complete. Tracking..."); 343 351 } 344 352 else … … 346 354 TrackState = SCOPE_PARKED; 347 355 EqNV->s = IPS_IDLE; 348 IDMessage( deviceName(), "Telescope parked successfully.");356 IDMessage(getDeviceName(), "Telescope parked successfully."); 349 357 } 350 358 } … … 352 360 break; 353 361 362 case SCOPE_IDLE: 354 363 case SCOPE_TRACKING: 355 364 /* tracking */ … … 491 500 EqNV->s = IPS_BUSY; 492 501 493 IDMessage( deviceName(), "Slewing to RA: %s - DEC: %s", RAStr, DecStr);502 IDMessage(getDeviceName(), "Slewing to RA: %s - DEC: %s", RAStr, DecStr); 494 503 return true; 504 } 505 506 bool 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); 495 523 } 496 524 … … 501 529 Parked=true; 502 530 TrackState = SCOPE_PARKING; 503 IDMessage( deviceName(), "Parking telescope in progress...");531 IDMessage(getDeviceName(), "Parking telescope in progress..."); 504 532 return true; 505 533 } … … 509 537 // first check if it's for our device 510 538 511 if(strcmp(dev, deviceName())==0)539 if(strcmp(dev,getDeviceName())==0) 512 540 { 513 541 // This is for our device … … 517 545 518 546 // 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 //} 525 553 526 554 IUUpdateNumber(GuideNSNP, values, names, n); … … 532 560 { 533 561 // 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 //} 540 568 541 569 IUUpdateNumber(GuideWENP, values, names, n); … … 566 594 //} 567 595 568 if(strcmp(dev, deviceName())==0)596 if(strcmp(dev,getDeviceName())==0) 569 597 { 570 598 if(strcmp(name,"PEC_NS")==0) -
BAORadio/libindi/libindi/drivers/telescope/telescope_simulator.h
r642 r697 18 18 INumber GuideNSN[2]; 19 19 INumberVectorProperty *GuideNSNP; 20 21 20 22 21 INumber GuideWEN[2]; … … 56 55 bool Goto(double,double); 57 56 bool Park(); 57 bool Sync(double ra, double dec); 58 58 59 59 }; -
BAORadio/libindi/libindi/drivers/telescope/temmadriver.c
r642 r697 34 34 #include <config.h> 35 35 36 #include <libnova.h> 36 //le fichier include était à l'origine <libnova.h> 37 #include <libnova/libnova.h> 37 38 38 39 #include "indicom.h" -
BAORadio/libindi/libindi/drivers/video/indi_v4l.cpp
r490 r697 30 30 { 31 31 MainCam = new V4L_Driver(); 32 MainCam->initProperties(" Video4Linux Generic Device");32 MainCam->initProperties("Generic Video4Linux"); 33 33 MainCam->initCamBase(); 34 34 } -
BAORadio/libindi/libindi/drivers/video/v4ldriver.cpp
r642 r697 74 74 /* Expose */ 75 75 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); 77 77 78 78 /* Frame Rate */ … … 130 130 void V4L_Driver::initCamBase() 131 131 { 132 #ifndef HAVE_LINUX_VIDEODEV2_H133 v4l_base = new V4L1_Base();134 #else135 132 v4l_base = new V4L2_Base(); 136 #endif137 133 } 138 134 … … 218 214 219 215 216 v4l_base->stop_capturing(errmsg); 217 220 218 if (StreamS[0].s == ISS_ON) 221 219 { … … 373 371 return; 374 372 375 if (StreamS[0].s == ISS_ON)376 373 //if (StreamS[0].s == ISS_ON) 374 v4l_base->stop_capturing(errmsg); 377 375 378 376 StreamS[0].s = ISS_OFF; -
BAORadio/libindi/libindi/drivers/video/v4lphilips.cpp
r490 r697 125 125 void V4L_Philips::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) 126 126 { 127 127 /* ignore if not ours */ 128 128 if (dev && strcmp (device_name, dev)) 129 129 return; 130 130 131 131 /* Connection */ … … 133 133 { 134 134 IUResetSwitch(&PowerSP); 135 136 137 138 } 139 135 IUUpdateSwitch(&PowerSP, states, names, n); 136 connectCamera(); 137 return; 138 } 139 140 140 141 141 #ifndef HAVE_LINUX_VIDEODEV2_H … … 145 145 if (checkPowerS(&AntiFlickerSP)) 146 146 return; 147 147 148 148 AntiFlickerSP.s = IPS_IDLE; 149 149 150 150 IUResetSwitch(&AntiFlickerSP); 151 151 IUUpdateSwitch(&AntiFlickerSP, states, names, n); 152 152 153 153 if (AntiFlickerS[0].s == ISS_ON) 154 154 { 155 155 if (v4l_pwc->setFlicker(true, errmsg) < 0) 156 157 158 159 160 161 162 163 164 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); 165 165 } 166 166 else 167 167 { 168 168 if (v4l_pwc->setFlicker(false, errmsg) < 0) 169 170 171 172 173 174 175 176 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 182 182 /* Back light compensation */ 183 183 if (!strcmp (BackLightSP.name, name)) … … 185 185 if (checkPowerS(&BackLightSP)) 186 186 return; 187 187 188 188 BackLightSP.s = IPS_IDLE; 189 189 190 190 IUResetSwitch(&BackLightSP); 191 191 IUUpdateSwitch(&BackLightSP, states, names, n); 192 192 193 193 if (BackLightS[0].s == ISS_ON) 194 194 { 195 195 if (v4l_pwc->setBackLight(true, errmsg) < 0) 196 197 198 199 200 201 202 203 204 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); 205 205 } 206 206 else 207 207 { 208 208 if (v4l_pwc->setBackLight(false, errmsg) < 0) 209 210 211 212 213 214 215 216 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 222 222 /* Noise reduction control */ 223 223 if (!strcmp (NoiseReductionSP.name, name)) … … 225 225 if (checkPowerS(&NoiseReductionSP)) 226 226 return; 227 227 228 228 NoiseReductionSP.s = IPS_IDLE; 229 229 230 230 IUResetSwitch(&NoiseReductionSP); 231 231 IUUpdateSwitch(&NoiseReductionSP, states, names, n); 232 232 233 233 for (int i=0; i < 4; i++) 234 234 if (NoiseReductionS[i].s == ISS_ON) 235 236 237 238 239 235 { 236 index = i; 237 break; 238 } 239 240 240 if (v4l_pwc->setNoiseRemoval(index, errmsg) < 0) 241 241 { 242 242 IUResetSwitch(&NoiseReductionSP); 243 244 245 246 } 247 243 NoiseReductionS[0].s = ISS_ON; 244 IDSetSwitch(&NoiseReductionSP, "%s", errmsg); 245 return; 246 } 247 248 248 NoiseReductionSP.s = IPS_OK; 249 249 250 250 IDSetSwitch(&NoiseReductionSP, NULL); 251 251 return; 252 252 } 253 253 254 254 /* White balace mode */ 255 255 if (!strcmp (WhiteBalanceModeSP.name, name)) … … 257 257 if (checkPowerS(&WhiteBalanceModeSP)) 258 258 return; 259 259 260 260 WhiteBalanceModeSP.s = IPS_IDLE; 261 261 262 262 IUResetSwitch(&WhiteBalanceModeSP); 263 263 IUUpdateSwitch(&WhiteBalanceModeSP, states, names, n); 264 264 265 265 for (int i=0; i < 5; i++) 266 266 if (WhiteBalanceModeS[i].s == ISS_ON) 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 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 337 337 /* Camera setttings */ 338 338 if (!strcmp (CamSettingSP.name, name)) 339 339 { 340 340 341 341 if (checkPowerS(&CamSettingSP)) 342 342 return; 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 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."); 369 369 updateV4L1Controls(); 370 371 372 373 374 375 376 377 378 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."); 379 379 updateV4L1Controls(); 380 381 380 return; 381 } 382 382 } 383 383 #endif … … 385 385 // Call parent 386 386 V4L_Driver::ISNewSwitch(dev, name, states, names, n); 387 387 388 388 389 389 -
BAORadio/libindi/libindi/examples/tutorial_ccdpreview.c
r490 r697 149 149 } 150 150 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 //{ 153 153 154 154 /* ignore if not ours */ 155 if (dev && strcmp (mydev, dev))156 return;155 // if (dev && strcmp (mydev, dev)) 156 // return; 157 157 158 158 /* suppress warning */ 159 n=n; dev=dev; name=name; names=names; 160 161 }159 // n=n; dev=dev; name=name; names=names; 160 161 //} 162 162 163 163 void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) -
BAORadio/libindi/libindi/examples/tutorial_client.cpp
r504 r697 37 37 38 38 #include "indibase/baseclient.h" 39 #include "indibase/basedriver.h" 39 #include "indibase/basedevice.h" 40 #include "indibase/indiproperty.h" 40 41 41 42 /* INDI Common Library Routines */ … … 110 111 ** 111 112 ***************************************************************************************/ 112 void MyClient::newDevice( const char *device_name)113 void MyClient::newDevice(INDI::BaseDevice *dp) 113 114 { 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"); 117 117 118 ccd_simulator = getDriver(MYCCD);118 ccd_simulator = dp; 119 119 120 if (ccd_simulator == NULL)121 {122 IDLog("Error: unable to find CCD Simulator device...\n");123 return;124 }125 }126 120 } 127 121 128 122 /************************************************************************************** 129 123 ** 130 ************************************************************************************* **/131 void MyClient::newProperty( const char *device_name, const char *property_name)124 *************************************************************************************/ 125 void MyClient::newProperty(INDI::Property *property) 132 126 { 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")) 134 129 { 135 130 IDLog("CCD_TEMPERATURE standard property defined. Attempting connection to CCD...\n"); 136 setDriverConnection(true,MYCCD);131 connectDevice(MYCCD); 137 132 } 138 133 } … … 168 163 } 169 164 } 165 166 /************************************************************************************** 167 ** 168 ***************************************************************************************/ 169 void 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 37 37 protected: 38 38 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) {} 41 42 virtual void newBLOB(IBLOB *bp) {} 42 43 virtual void newSwitch(ISwitchVectorProperty *svp); 43 44 virtual void newNumber(INumberVectorProperty *nvp); 45 virtual void newMessage(INDI::BaseDevice *dp); 44 46 virtual void newText(ITextVectorProperty *tvp) {} 45 47 virtual void newLight(ILightVectorProperty *lvp) {} 46 48 virtual void serverConnected() {} 47 virtual void serverDisconnected( ) {}49 virtual void serverDisconnected(int exit_code) {} 48 50 49 51 private: 50 INDI::BaseD river* ccd_simulator;52 INDI::BaseDevice * ccd_simulator; 51 53 52 54 }; -
BAORadio/libindi/libindi/examples/tutorial_four.cpp
r642 r697 1 1 #if 0 2 MyScope - Tutorial Four2 TestDevice - Tutorial Four 3 3 Demonstration of libindi v0.7 capabilities. 4 4 … … 45 45 46 46 /* Our telescope auto pointer */ 47 auto_ptr< MyScope> telescope(0);47 auto_ptr<TestDevice> telescope(0); 48 48 49 49 const int POLLMS = 1000; // Period of update, 1 second. … … 62 62 { 63 63 isInit = 1; 64 telescope.reset(new MyScope()); 64 telescope.reset(new TestDevice()); 65 srand (time(NULL)); 65 66 } 66 67 … … 108 109 void ISNewBLOB (const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n) 109 110 { 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 118 116 } 119 117 … … 129 127 ** LX200 Basic constructor 130 128 ***************************************************************************************/ 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() 129 TestDevice::TestDevice() 130 { 131 IDLog("Initilizing from Test Device...\n"); 132 133 } 134 135 /************************************************************************************** 136 ** 137 ***************************************************************************************/ 138 TestDevice::~TestDevice() 143 139 { 144 140 … … 148 144 ** Initialize all properties & set default values. 149 145 **************************************************************************************/ 150 bool MyScope::initProperties()151 { 152 DefaultD river::initProperties();146 bool TestDevice::initProperties() 147 { 148 DefaultDevice::initProperties(); 153 149 // This is the default driver skeleton file location 154 150 // Convention is: drivername_sk_xml … … 177 173 ** Define Basic properties to clients. 178 174 ***************************************************************************************/ 179 void MyScope::ISGetProperties(const char *dev)175 void TestDevice::ISGetProperties(const char *dev) 180 176 { 181 177 static int configLoaded = 0; 182 178 183 179 // Ask the default driver first to send properties. 184 INDI::DefaultD river::ISGetProperties(dev);180 INDI::DefaultDevice::ISGetProperties(dev); 185 181 186 182 // If no configuration is load before, then load it now. … … 196 192 ** Process Text properties 197 193 ***************************************************************************************/ 198 bool MyScope::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n)194 bool TestDevice::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n) 199 195 { 200 196 // 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 ***************************************************************************************/ 206 bool TestDevice::ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n) 211 207 { 212 208 213 209 // Ignore if not ours 214 if (strcmp (dev, deviceName()))210 if (strcmp (dev, getDeviceName())) 215 211 return false; 216 212 … … 220 216 return false; 221 217 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")) 224 226 { 225 227 IUUpdateNumber(nvp, values, names, n); … … 236 238 ** 237 239 ***************************************************************************************/ 238 bool MyScope::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) 239 { 240 bool TestDevice::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) 241 { 242 int lightState=0; 243 int lightIndex=0; 244 240 245 // ignore if not ours // 241 if (strcmp (dev, deviceName()))242 return false; 243 244 if (INDI::DefaultD river::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) 245 250 return true; 246 251 252 253 247 254 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")) 254 269 { 255 270 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 } 257 289 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 297 bool 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 271 337 return true; 272 } 273 274 bool MyScope::Disconnect() 338 339 } 340 341 342 /************************************************************************************** 343 ** 344 ***************************************************************************************/ 345 bool TestDevice::Connect() 275 346 { 276 347 return true; 277 348 } 278 349 279 const char * MyScope::getDefaultName() 280 { 281 return "My Scope"; 282 } 283 284 285 286 287 288 289 350 bool TestDevice::Disconnect() 351 { 352 return true; 353 } 354 355 const 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 24 24 #include "indidevapi.h" 25 25 #include "indicom.h" 26 #include "indibase/defaultd river.h"26 #include "indibase/defaultdevice.h" 27 27 28 class MyScope : public INDI::DefaultDriver28 class TestDevice : public INDI::DefaultDevice 29 29 { 30 30 public: 31 MyScope();32 ~ MyScope();31 TestDevice(); 32 ~TestDevice(); 33 33 34 34 virtual void ISGetProperties (const char *dev); … … 36 36 virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n); 37 37 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); 38 39 39 40 private: -
BAORadio/libindi/libindi/examples/tutorial_four_sk.xml
r501 r697 1 1 <INDIDriver> 2 <defSwitchVector device=" MyDevice" 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"> 3 3 <defSwitch name="CONNECT" label="Connect"> 4 4 Off … … 8 8 </defSwitch> 9 9 </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"> 12 12 3 13 13 </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"> 15 15 3 16 16 </defNumber> 17 17 </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"> 37 On 38 </defSwitch> 39 <defSwitch name="2x"> 40 Off 41 </defSwitch> 42 <defSwitch name="3x"> 43 Off 44 </defSwitch> 45 <defSwitch name="4x"> 46 Off 47 </defSwitch> 48 <defSwitch name="5x"> 49 Off 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> 18 57 </INDIDriver> -
BAORadio/libindi/libindi/examples/tutorial_three.c
r504 r697 59 59 /* Exposure time */ 60 60 static 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};61 static INumberVectorProperty ExposeTimeNP = { mydev, "CCD_EXPOSURE_REQUEST", "Expose", COMM_GROUP, IP_RW, 60, IPS_IDLE, ExposeTimeN, NARRAY(ExposeTimeN), "", 0}; 62 62 63 63 /* Temperature control */ -
BAORadio/libindi/libindi/indidevapi.h
r501 r697 450 450 extern ISwitch *IUFindOnSwitch (const ISwitchVectorProperty *sp); 451 451 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 460 extern int IUFindOnSwitchIndex (const ISwitchVectorProperty *sp); 461 452 462 /** \brief Reset all switches in a switch vector property to OFF. 453 463 * … … 485 495 */ 486 496 extern 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 */ 506 extern 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 */ 516 extern int IUSaveBLOB(IBLOB *bp, int size, int blobsize, char *blob, char *format); 487 517 488 518 /** \brief Function to update the min and max elements of a number in the client -
BAORadio/libindi/libindi/indidriver.c
r642 r697 272 272 } 273 273 274 275 /* Update property BLOB in accord with BLOBs and names */ 276 int 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 304 int 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 274 312 void IUFillSwitch(ISwitch *sp, const char *name, const char * label, ISState s) 275 313 { … … 440 478 for (i = 0; i < nvp->nnp; i++) { 441 479 for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) { 442 if (!strcmp (tagXMLEle(ep), "oneNumber") &&480 if (!strcmp (tagXMLEle(ep)+3, "Number") && 443 481 !strcmp (nvp->np[i].name, findXMLAttValu(ep, "name"))) { 444 482 if (f_scansexa (pcdataXMLEle(ep), &nvp->np[i].value) < 0) … … 478 516 for (i = 0; i < tvp->ntp; i++) { 479 517 for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) { 480 if (!strcmp (tagXMLEle(ep), "oneText") &&518 if (!strcmp (tagXMLEle(ep)+3, "Text") && 481 519 !strcmp (tvp->tp[i].name, findXMLAttValu(ep, "name"))) { 482 520 IUSaveText (&tvp->tp[i], pcdataXMLEle(ep)); … … 515 553 /* match each oneLight with one ILight */ 516 554 for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) { 517 if (!strcmp (tagXMLEle(ep), "oneLight")) {555 if (!strcmp (tagXMLEle(ep)+3, "Light")) { 518 556 const char *name = findXMLAttValu (ep, "name"); 519 557 for (i = 0; i < lvp->nlp; i++) { … … 554 592 /* match each oneSwitch with one ISwitch */ 555 593 for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) { 556 if (!strcmp (tagXMLEle(ep), "oneSwitch")) {594 if (!strcmp (tagXMLEle(ep)+3, "Switch")) { 557 595 const char *name = findXMLAttValu (ep, "name"); 558 596 for (i = 0; i < svp->nsp; i++) { … … 594 632 /* match each oneBLOB with one IBLOB */ 595 633 for (ep = nextXMLEle(root,1); ep; ep = nextXMLEle(root,0)) { 596 if (!strcmp (tagXMLEle(ep), "oneBLOB")) {634 if (!strcmp (tagXMLEle(ep)+3, "BLOB")) { 597 635 const char *name = findXMLAttValu (ep, "name"); 598 636 for (i = 0; i < bvp->nbp; i++) { -
BAORadio/libindi/libindi/indiserver.c
r642 r697 790 790 else if (strstr(token, "\"") || strstr(token, "'")) 791 791 { 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) ) 794 797 { 795 798 strcat(tDev, " "); … … 797 800 if ( (tp=strchr(tDev, '\"')) || (tp=strchr(tDev, '\''))) 798 801 { 799 //tDev[strlen(tDev)-1] = '\0';802 tDev[strlen(tDev)-1] = '\0'; 800 803 *tp='\0'; 801 804 break; … … 818 821 { 819 822 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 820 827 while (token = strsep(&cp, delm) ) 821 828 { … … 825 832 if ( (tp=strchr(tConfig, '\"')) || (tp=strchr(tConfig, '\''))) 826 833 { 827 //tConfig[strlen(tConfig)-1] = '\0';834 tConfig[strlen(tConfig)-1] = '\0'; 828 835 *tp = '\0'; 829 836 break; -
BAORadio/libindi/libindi/libindi.pro
r688 r697 4 4 5 5 TEMPLATE = app 6 CONFIG += debug 6 7 TARGET = 7 8 DEPENDPATH += . \ … … 39 40 # Input 40 41 HEADERS += base64.h \ 41 config.h \42 42 eventloop.h \ 43 43 fq.h \ … … 163 163 communs/ServerSocket.cpp \ 164 164 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 \ 173 173 libs/indicom.c \ 174 174 libs/lilxml.c \ … … 179 179 drivers/ccd/ccd_simulator.cpp \ 180 180 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 \ 189 189 drivers/telescope/BAO.cpp \ 190 190 drivers/telescope/celestrongps.cpp \ … … 210 210 drivers/telescope/telescope_simulator.cpp \ 211 211 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 \ 219 219 Indi_Stellarium/src/Connection.cpp \ 220 220 Indi_Stellarium/src/Listener.cpp \ … … 235 235 libs/indibase/inditelescope.cpp \ 236 236 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 \ 244 244 libindi_build/CMakeFiles/CompilerIdC/CMakeCCompilerId.c \ 245 245 libindi_build/CMakeFiles/CompilerIdCXX/CMakeCXXCompilerId.cpp -
BAORadio/libindi/libindi/libs/indibase/baseclient.cpp
r642 r697 25 25 #include <netinet/in.h> 26 26 #include <netdb.h> 27 #include <fcntl.h> 27 28 28 29 #include "baseclient.h" 29 #include "based river.h"30 #include "basedevice.h" 30 31 #include "indicom.h" 31 32 … … 46 47 INDI::BaseClient::~BaseClient() 47 48 { 48 close(sockfd); 49 49 50 } 50 51 … … 65 66 struct sockaddr_in serv_addr; 66 67 struct hostent *hp; 68 int sflags=0; 67 69 68 70 /* lookup host address */ … … 85 87 } 86 88 89 // sflags=fcntl(sockfd,F_GETFL,0); // Get socket flags 90 // fcntl(sockfd,F_SETFL, sflags | O_NONBLOCK); // Add non-blocking flag 91 92 87 93 /* connect */ 88 94 if (::connect (sockfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr))<0) … … 95 101 svrwfp = fdopen (sockfd, "w"); 96 102 103 if (svrwfp == NULL) 104 { 105 perror("fdopen"); 106 return false; 107 } 108 97 109 int result = pthread_create( &listen_thread, NULL, &INDI::BaseClient::listenHelper, this); 98 110 … … 103 115 } 104 116 117 sConnected = true; 105 118 serverConnected(); 106 sConnected = true;107 119 108 120 return true; … … 111 123 bool INDI::BaseClient::disconnectServer() 112 124 { 125 // IDLog("Server disconnected called\n"); 113 126 if (sConnected == false) 114 127 return true; 128 129 sConnected = false; 130 131 //IDLog("Closing socket fd!\n"); 132 close(sockfd); 115 133 116 134 if (svrwfp != NULL) … … 118 136 svrwfp = NULL; 119 137 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 144 void INDI::BaseClient::connectDevice(const char *deviceName) 145 { 146 setDriverConnection(true, deviceName); 147 } 148 149 void INDI::BaseClient::disconnectDevice(const char *deviceName) 150 { 151 setDriverConnection(false, deviceName); 127 152 } 128 153 … … 130 155 void INDI::BaseClient::setDriverConnection(bool status, const char *deviceName) 131 156 { 132 INDI::BaseD river *drv = getDriver(deviceName);157 INDI::BaseDevice *drv = getDevice(deviceName); 133 158 ISwitchVectorProperty *drv_connection = NULL; 134 159 … … 156 181 drv_connection->sp[1].s = ISS_OFF; 157 182 158 sendNewSwitch(drv_connection , &(drv_connection->sp[0]));183 sendNewSwitch(drv_connection); 159 184 } 160 185 else … … 169 194 drv_connection->sp[1].s = ISS_ON; 170 195 171 sendNewSwitch(drv_connection , &(drv_connection->sp[1]));172 173 } 174 } 175 176 177 INDI::BaseD river * INDI::BaseClient::getDriver(const char * deviceName)178 { 179 vector<INDI::BaseD river*>::const_iterator devi;196 sendNewSwitch(drv_connection); 197 198 } 199 } 200 201 202 INDI::BaseDevice * INDI::BaseClient::getDevice(const char * deviceName) 203 { 204 vector<INDI::BaseDevice *>::const_iterator devi; 180 205 for ( devi = cDevices.begin(); devi != cDevices.end(); devi++) 181 if (!strcmp(deviceName, (*devi)-> deviceName()))206 if (!strcmp(deviceName, (*devi)->getDeviceName())) 182 207 return (*devi); 183 208 … … 193 218 void INDI::BaseClient::listenINDI() 194 219 { 220 char buffer[MAXINDIBUF]; 195 221 char msg[MAXRBUF]; 196 char buffer[MAXINDIBUF]; 222 197 223 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 198 231 199 232 if (cDeviceNames.empty()) … … 208 241 fflush (svrwfp); 209 242 243 FD_SET(sockfd, &rs); 244 210 245 lillp = newLilXML(); 246 211 247 212 248 /* read from server, exit if find all requested properties */ 213 249 while (sConnected) 214 250 { 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) 218 254 { 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; 223 258 } 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 224 274 225 275 for (int i=0; i < n; i++) 226 276 { 277 //IDLog("Getting #%d bytes in for loop, calling readXMLEle for byte %d\n", n, i); 227 278 XMLEle *root = readXMLEle (lillp, buffer[i], msg); 279 //IDLog("############# BLOCK # POST READ XML ELE #####################\n"); 280 228 281 if (root) 229 282 { … … 233 286 if (err_code != INDI_PROPERTY_DUPLICATED) 234 287 { 235 IDLog("Dispatch command error : %s\n", msg);288 IDLog("Dispatch command error(%d): %s\n", err_code, msg); 236 289 prXMLEle (stderr, root, 0); 237 290 } … … 248 301 } 249 302 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 250 312 } 251 313 … … 258 320 259 321 /* Get the device, if not available, create it */ 260 INDI::BaseD river*dp = findDev (root, 1, errmsg);322 INDI::BaseDevice *dp = findDev (root, 1, errmsg); 261 323 if (dp == NULL) 262 324 { … … 264 326 return INDI_DEVICE_NOT_FOUND; 265 327 } 328 329 // FIXME REMOVE THIS 330 331 // Ignore echoed newXXX 332 if (strstr(tagXMLEle(root), "new")) 333 return 0; 266 334 267 335 if ((!strcmp (tagXMLEle(root), "defTextVector")) || … … 289 357 { 290 358 XMLAtt *ap; 291 INDI::BaseD river*dp;359 INDI::BaseDevice *dp; 292 360 293 361 /* dig out device and optional property name */ … … 296 364 return INDI_DEVICE_NOT_FOUND; 297 365 298 checkMsg(root, dp);366 dp->checkMessage(root); 299 367 300 368 ap = findXMLAtt (root, "name"); … … 302 370 /* Delete property if it exists, otherwise, delete the whole device */ 303 371 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 } 305 379 // delete the whole device 306 380 else 307 return removeDevice(dp-> deviceName(), errmsg);381 return removeDevice(dp->getDeviceName(), errmsg); 308 382 } 309 383 310 384 int INDI::BaseClient::removeDevice( const char * devName, char * errmsg ) 311 385 { 312 std::vector<INDI::BaseD river*>::iterator devicei;386 std::vector<INDI::BaseDevice *>::iterator devicei; 313 387 314 388 for (devicei =cDevices.begin(); devicei != cDevices.end();) 315 389 { 316 if (strcmp(devName, (*devicei)->deviceName())) 390 391 if (!strcmp(devName, (*devicei)->getDeviceName())) 317 392 { 318 393 delete *devicei; … … 328 403 } 329 404 330 INDI::BaseD river* INDI::BaseClient::findDev( const char * devName, char * errmsg )331 { 332 333 std::vector<INDI::BaseD river*>::const_iterator devicei;405 INDI::BaseDevice * INDI::BaseClient::findDev( const char * devName, char * errmsg ) 406 { 407 408 std::vector<INDI::BaseDevice *>::const_iterator devicei; 334 409 335 410 for (devicei = cDevices.begin(); devicei != cDevices.end(); devicei++) 336 411 { 337 if (!strcmp(devName, (*devicei)-> deviceName()))412 if (!strcmp(devName, (*devicei)->getDeviceName())) 338 413 return (*devicei); 339 414 … … 345 420 346 421 /* add new device */ 347 INDI::BaseD river* INDI::BaseClient::addDevice (XMLEle *dep, char * errmsg)422 INDI::BaseDevice * INDI::BaseClient::addDevice (XMLEle *dep, char * errmsg) 348 423 { 349 424 //devicePtr dp(new INDI::BaseDriver()); 350 INDI::BaseD river *dp = new INDI::BaseDriver();425 INDI::BaseDevice *dp = new INDI::BaseDevice(); 351 426 XMLAtt *ap; 352 427 char * device_name; … … 367 442 cDevices.push_back(dp); 368 443 369 newDevice(d evice_name);444 newDevice(dp); 370 445 371 446 /* ok */ … … 373 448 } 374 449 375 INDI::BaseD river* INDI::BaseClient::findDev (XMLEle *root, int create, char * errmsg)450 INDI::BaseDevice * INDI::BaseClient::findDev (XMLEle *root, int create, char * errmsg) 376 451 { 377 452 XMLAtt *ap; 378 INDI::BaseD river*dp;453 INDI::BaseDevice *dp; 379 454 char *dn; 380 455 … … 407 482 int INDI::BaseClient::messageCmd (XMLEle *root, char * errmsg) 408 483 { 409 checkMsg (root, findDev (root, 0, errmsg)); 484 INDI::BaseDevice *dp =findDev (root, 0, errmsg); 485 486 if (dp) 487 dp->checkMessage(root); 488 410 489 return (0); 411 490 } 412 491 413 /* add message to queue414 * 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 else441 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 log449 dp->addMessage(msgBuffer);450 dp->addMessage(valuXMLAtt(message));451 dp->addMessage("\n");452 \453 }454 492 455 493 void INDI::BaseClient::sendNewText (ITextVectorProperty *tvp) … … 471 509 } 472 510 511 void 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 473 535 void INDI::BaseClient::sendNewNumber (INumberVectorProperty *nvp) 474 536 { … … 489 551 } 490 552 491 void INDI::BaseClient::sendNewSwitch (ISwitchVectorProperty *svp, ISwitch *sp) 492 { 553 void 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 577 void INDI::BaseClient::sendNewSwitch (ISwitchVectorProperty *svp) 578 { 579 ISwitch *onSwitch = IUFindOnSwitch(svp); 580 493 581 fprintf(svrwfp, "<newSwitchVector\n"); 494 582 495 583 fprintf(svrwfp, " device='%s'\n", svp->device); 496 584 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 } 501 604 502 605 fprintf(svrwfp, "</newSwitchVector>\n"); 503 606 504 607 fflush(svrwfp); 608 } 609 610 void 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 505 632 } 506 633 … … 513 640 } 514 641 515 void INDI::BaseClient::sendOneBlob( const char *blobName, unsigned int blobSize, const char *blobFormat, unsigned char* blobBuffer)642 void INDI::BaseClient::sendOneBlob( const char *blobName, unsigned int blobSize, const char *blobFormat, void * blobBuffer) 516 643 { 517 644 fprintf(svrwfp, " <oneBLOB\n"); … … 521 648 522 649 for (unsigned i = 0; i < blobSize; i += 72) 523 fprintf(svrwfp, " %.72s\n", blobBuffer+i);650 fprintf(svrwfp, " %.72s\n", ((char *) blobBuffer+i)); 524 651 525 652 fprintf(svrwfp, " </oneBLOB>\n"); -
BAORadio/libindi/libindi/libs/indibase/baseclient.h
r642 r697 38 38 BaseClient enables accelerated development of INDI Clients by providing a framework that facilitates communication, device 39 39 handling, and event notification. By subclassing BaseClient, clients can quickly connect to an INDI server, and query for 40 a set of INDI::BaseD riverdevices, and read and write properties seamlessly. Event driven programming is possible due to40 a set of INDI::BaseDevice devices, and read and write properties seamlessly. Event driven programming is possible due to 41 41 notifications upon reception of new devices or properties. 42 42 … … 52 52 public: 53 53 enum { INDI_DEVICE_NOT_FOUND=-1, INDI_PROPERTY_INVALID=-2, INDI_PROPERTY_DUPLICATED = -3, INDI_DISPATCH_ERROR=-4 }; 54 //typedef boost::shared_ptr<INDI::BaseD river> devicePtr;54 //typedef boost::shared_ptr<INDI::BaseDevice> devicePtr; 55 55 56 56 BaseClient(); … … 67 67 A client may select to receive notifications of only a specific device or a set of devices. 68 68 If the client encounters any of the devices set via this function, it will create a corresponding 69 INDI::BaseD riverobject to handle them. If no devices are watched, then all devices owned by INDI server69 INDI::BaseDevice object to handle them. If no devices are watched, then all devices owned by INDI server 70 70 will be created and handled. 71 71 */ … … 87 87 bool disconnectServer(); 88 88 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 92 90 \param deviceName Name of the device to connect to. 93 91 */ 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); 95 98 96 99 /** \param deviceName Name of device to search for in the list of devices owned by INDI server, 97 100 \returns If \e deviceName exists, it returns an instance of the device. Otherwise, it returns NULL. 98 101 */ 99 INDI::BaseD river * getDriver(const char * deviceName);102 INDI::BaseDevice * getDevice(const char * deviceName); 100 103 101 104 /** \returns Returns a vector of all devices created in the client. 102 105 */ 103 const vector<INDI::BaseD river *> & getDrivers() const { return cDevices; }106 const vector<INDI::BaseDevice *> & getDevices() const { return cDevices; } 104 107 105 108 /** \brief Set Binary Large Object policy mode … … 125 128 static void * listenHelper(void *context); 126 129 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; } 151 132 152 133 /** \brief Send new Text command to server */ 153 134 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); 154 137 /** \brief Send new Number command to server */ 155 138 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); 156 141 /** \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 158 146 /** \brief Send opening tag for BLOB command to server */ 159 147 void startBlob( const char *devName, const char *propName, const char *timestamp); 160 148 /** \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); 162 150 /** \brief Send closing tag for BLOB command to server */ 163 151 void finishBlob(); 164 152 153 protected: 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 165 175 private: 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); 166 183 167 184 // Listen to INDI server and process incoming messages … … 171 188 pthread_t listen_thread; 172 189 173 vector<INDI::BaseD river*> cDevices;190 vector<INDI::BaseDevice *> cDevices; 174 191 vector<string> cDeviceNames; 175 192 -
BAORadio/libindi/libindi/libs/indibase/indibase.h
r642 r697 33 33 class BaseMediator; 34 34 class BaseClient; 35 class BaseD river;36 class DefaultD river;35 class BaseDevice; 36 class DefaultDevice; 37 37 class FilterInterface; 38 38 class GuiderInterface; … … 41 41 class FilterWheel; 42 42 class Focuser; 43 class USBDevice; 43 class USBDevice; 44 class Property; 44 45 } 46 47 /*! INDI property type */ 48 typedef 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; 45 57 46 58 … … 56 68 \param device_name Name of the new device 57 69 */ 58 virtual void newDevice( const char *device_name) =0;70 virtual void newDevice(INDI::BaseDevice *dp) =0; 59 71 60 72 /** \brief Emmited when a new property is created for an INDI driver. 61 \param device_name Name of the device62 \param property_name Name of the new property 73 \param property Pointer to the Property Container 74 63 75 */ 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 65 85 66 86 /** \brief Emmited when a new BLOB value arrives from INDI server. … … 89 109 virtual void newLight(ILightVectorProperty *lvp) =0; 90 110 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 91 116 /** \brief Emmited when the server is connected. 92 117 */ … … 94 119 95 120 /** \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. 96 122 */ 97 virtual void serverDisconnected( ) =0;123 virtual void serverDisconnected(int exit_code) =0; 98 124 }; 99 125 -
BAORadio/libindi/libindi/libs/indibase/indiccd.cpp
r642 r697 162 162 HasSt4Port=false; 163 163 InExposure=false; 164 TelescopeTP = new ITextVectorProperty;164 ActiveDeviceTP = new ITextVectorProperty; 165 165 } 166 166 167 167 INDI::CCD::~CCD() 168 168 { 169 delete TelescopeTP;169 delete ActiveDeviceTP; 170 170 } 171 171 172 172 bool INDI::CCD::initProperties() 173 173 { 174 DefaultD river::initProperties(); // let the base class flesh in what it wants174 DefaultDevice::initProperties(); // let the base class flesh in what it wants 175 175 176 176 // PRIMARY CCD Init … … 180 180 IUFillNumber(&PrimaryCCD.ImageFrameN[2],"WIDTH","Width","%4.0f",0,1392.0,0,1392.0); 181 181 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); 183 183 184 184 IUFillSwitch(&PrimaryCCD.FrameTypeS[0],"FRAME_LIGHT","Light",ISS_ON); … … 186 186 IUFillSwitch(&PrimaryCCD.FrameTypeS[2],"FRAME_DARK","Dark",ISS_OFF); 187 187 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); 189 189 190 190 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); 192 192 193 193 IUFillNumber(&PrimaryCCD.ImageBinN[0],"HOR_BIN","X","%2.0f",1,4,1,1); 194 194 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); 196 196 197 197 IUFillNumber(&PrimaryCCD.ImagePixelSizeN[0],"CCD_MAX_X","Resolution x","%4.0f",1,40,0,6.45); … … 201 201 IUFillNumber(&PrimaryCCD.ImagePixelSizeN[4],"CCD_PIXEL_SIZE_Y","Pixel size Y","%5.2f",1,40,0,6.45); 202 202 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); 204 204 205 205 IUFillSwitch(&PrimaryCCD.CompressS[0],"COMPRESS","Compress",ISS_OFF); 206 206 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); 208 208 209 209 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); 211 211 212 212 // GUIDER CCD Init … … 216 216 IUFillNumber(&GuideCCD.ImageFrameN[2],"WIDTH","Width","%4.0f",0,1392.0,0,1392.0); 217 217 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); 219 219 220 220 IUFillNumber(&GuideCCD.ImagePixelSizeN[0],"Image_MAX_X","Resolution x","%4.0f",1,40,0,6.45); … … 224 224 IUFillNumber(&GuideCCD.ImagePixelSizeN[4],"Image_PIXEL_SIZE_Y","Pixel size Y","%5.2f",1,40,0,6.45); 225 225 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); 227 227 228 228 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); 230 230 231 231 IUFillSwitch(&GuideCCD.CompressS[0],"GCOMPRESS","Compress",ISS_OFF); 232 232 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); 234 234 235 235 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); 237 237 238 238 // CCD Class Init 239 239 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); 242 243 243 244 IUFillNumber(&EqN[0],"RA_PEC","Ra (hh:mm:ss)","%010.6m",0,24,0,0); 244 245 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 246 252 247 253 // Guider Interface 248 initGuiderProperties( deviceName(), GUIDE_CONTROL_TAB);254 initGuiderProperties(getDeviceName(), GUIDE_CONTROL_TAB); 249 255 250 256 return true; … … 257 263 //IDLog("INDI::CCD IsGetProperties with %s\n",dev); 258 264 259 DefaultD river::ISGetProperties(dev);265 DefaultDevice::ISGetProperties(dev); 260 266 261 267 return; … … 296 302 } 297 303 defineSwitch(PrimaryCCD.FrameTypeSP); 298 defineText( TelescopeTP);304 defineText(ActiveDeviceTP); 299 305 } 300 306 else … … 321 327 } 322 328 deleteProperty(PrimaryCCD.FrameTypeSP->name); 323 deleteProperty( TelescopeTP->name);329 deleteProperty(ActiveDeviceTP->name); 324 330 } 325 331 return true; 326 332 } 327 333 328 voidINDI::CCD::ISSnoopDevice (XMLEle *root)334 bool INDI::CCD::ISSnoopDevice (XMLEle *root) 329 335 { 330 336 //fprintf(stderr," ################# CCDSim handling snoop ##############\n"); … … 346 352 //fprintf(stderr,"Snoop Failed\n"); 347 353 } 354 355 return true; 348 356 } 349 357 … … 353 361 //IDLog("IndiTelescope got %d new text items name %s\n",n,name); 354 362 // first check if it's for our device 355 if(strcmp(dev, deviceName())==0)363 if(strcmp(dev,getDeviceName())==0) 356 364 { 357 365 // This is for our device 358 366 // Now lets see if it's something we process here 359 if(strcmp(name, TelescopeTP->name)==0)367 if(strcmp(name,ActiveDeviceTP->name)==0) 360 368 { 361 369 int rc; 362 370 //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); 365 373 //IDLog("update text returns %d\n",rc); 366 374 // Update client display 367 IDSetText( TelescopeTP,NULL);375 IDSetText(ActiveDeviceTP,NULL); 368 376 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"); 371 382 // We processed this one, so, tell the world we did it 372 383 return true; … … 375 386 } 376 387 377 return INDI::DefaultD river::ISNewText(dev,name,texts,names,n);388 return INDI::DefaultDevice::ISNewText(dev,name,texts,names,n); 378 389 } 379 390 … … 382 393 // first check if it's for our device 383 394 //IDLog("INDI::CCD::ISNewNumber %s\n",name); 384 if(strcmp(dev, deviceName())==0)395 if(strcmp(dev,getDeviceName())==0) 385 396 { 386 397 // This is for our device … … 497 508 //IDSetNumber(GuiderFrameNP,NULL); 498 509 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", 500 512 GuideCCD.ImageFrameN[0].value,GuideCCD.ImageFrameN[1].value,GuideCCD.ImageFrameN[2].value,GuideCCD.ImageFrameN[3].value); 501 513 //GSubX=GuiderFrameN[0].value; … … 517 529 IDSetNumber(GuideNSP,NULL); 518 530 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); 520 533 521 534 if(GuideNS[0].value != 0) … … 542 555 IDSetNumber(GuideEWP,NULL); 543 556 544 fprintf(stderr,"GuiderEastWest set to %6.3f,%6.3f\n",545 557 if (isDebug()) 558 fprintf(stderr,"GuiderEastWest set to %6.3f,%6.3f\n", GuideEW[0].value,GuideEW[1].value); 546 559 547 560 if(GuideEW[0].value != 0) … … 564 577 // if we didn't process it, continue up the chain, let somebody else 565 578 // give it a shot 566 return DefaultD river::ISNewNumber(dev,name,values,names,n);579 return DefaultDevice::ISNewNumber(dev,name,values,names,n); 567 580 } 568 581 … … 570 583 { 571 584 572 if(strcmp(dev, deviceName())==0)585 if(strcmp(dev,getDeviceName())==0) 573 586 { 574 587 … … 623 636 624 637 // let the default driver have a crack at it 625 return DefaultD river::ISNewSwitch(dev, name, states, names, n);638 return DefaultDevice::ISNewSwitch(dev, name, states, names, n); 626 639 } 627 640 … … 789 802 { 790 803 // lets try sending a ccd preview 791 //IDLog("Enter Uploadfile with %d total sending via %s\n",total,FitsBP->name); 804 792 805 PrimaryCCD.FitsB.blob=fitsdata; 793 806 PrimaryCCD.FitsB.bloblen=total; … … 795 808 strcpy(PrimaryCCD.FitsB.format,".fits"); 796 809 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); 797 811 IDSetBLOB(PrimaryCCD.FitsBP,NULL); 798 812 -
BAORadio/libindi/libindi/libs/indibase/indiccd.h
r642 r697 23 23 #include <fitsio.h> 24 24 25 #include "defaultd river.h"25 #include "defaultdevice.h" 26 26 #include "indiguiderinterface.h" 27 27 … … 122 122 \author Gerry Rozema, Jasem Mutlaq 123 123 */ 124 class INDI::CCD : public INDI::DefaultD river, INDI::GuiderInterface124 class INDI::CCD : public INDI::DefaultDevice, INDI::GuiderInterface 125 125 { 126 126 public: … … 134 134 virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n); 135 135 virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n); 136 virtual voidISSnoopDevice (XMLEle *root);136 virtual bool ISSnoopDevice (XMLEle *root); 137 137 138 138 protected: … … 240 240 virtual bool GuideWest(float ms); 241 241 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 242 248 float RA; 243 249 float Dec; … … 254 260 INumber EqN[2]; 255 261 256 ITextVectorProperty *TelescopeTP; 257 IText TelescopeT[1]; 258 259 void addFITSKeywords(fitsfile *fptr); 262 ITextVectorProperty *ActiveDeviceTP; 263 IText ActiveDeviceT[2]; 264 260 265 int uploadfile(void *fitsdata,int total); 261 266 -
BAORadio/libindi/libindi/libs/indibase/indifilterinterface.h
r646 r697 53 53 /** \brief Obtains a list of filter names from the hardware and initilizes the FilterNameTP property. The function should check for the number of filters 54 54 available in the filter wheel and build the FilterNameTP property accordingly. 55 \param groupName group name for FilterNameTP property to be created. 55 56 \return True if successful, false if unsupported or failed operation 56 57 \see QSI CCD implementation of the FilterInterface. QSI CCD is available as a 3rd party INDI driver. 57 58 */ 58 virtual bool GetFilterNames(const char *deviceName, const char* groupName) = 0;59 virtual bool GetFilterNames(const char* groupName) = 0; 59 60 60 61 /** \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 35 35 bool INDI::FilterWheel::initProperties() 36 36 { 37 DefaultD river::initProperties();37 DefaultDevice::initProperties(); 38 38 39 initFilterProperties(deviceName(), FILTER_TAB); 39 initFilterProperties(getDeviceName(), FILTER_TAB); 40 41 return true; 40 42 } 41 43 … … 44 46 // First we let our parent populate 45 47 //IDLog("INDI::FilterWheel::ISGetProperties %s\n",dev); 46 DefaultD river::ISGetProperties(dev);48 DefaultDevice::ISGetProperties(dev); 47 49 if(isConnected()) 48 50 { 49 51 defineNumber(FilterSlotNP); 50 52 51 if (GetFilterNames( deviceName(),FILTER_TAB))53 if (GetFilterNames(FILTER_TAB)) 52 54 defineText(FilterNameTP); 53 55 } … … 62 64 if(isConnected()) 63 65 { 64 initFilterProperties(deviceName(), FILTER_TAB);66 //initFilterProperties(getDeviceName(), FILTER_TAB); 65 67 defineNumber(FilterSlotNP); 66 if (GetFilterNames( deviceName(),FILTER_TAB))68 if (GetFilterNames(FILTER_TAB)) 67 69 defineText(FilterNameTP); 68 70 } else … … 77 79 bool INDI::FilterWheel::ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) 78 80 { 79 return DefaultD river::ISNewSwitch(dev, name, states, names,n);81 return DefaultDevice::ISNewSwitch(dev, name, states, names,n); 80 82 } 81 83 … … 84 86 // first check if it's for our device 85 87 //IDLog("INDI::FilterWheel::ISNewNumber %s\n",name); 86 if(strcmp(dev, deviceName())==0)88 if(strcmp(dev,getDeviceName())==0) 87 89 { 88 90 // This is for our device … … 119 121 // if we didn't process it, continue up the chain, let somebody else 120 122 // give it a shot 121 return DefaultD river::ISNewNumber(dev,name,values,names,n);123 return DefaultDevice::ISNewNumber(dev,name,values,names,n); 122 124 } 123 125 … … 127 129 //IDLog("INDI::FilterWheel got %d new text items name %s\n",n,name); 128 130 // first check if it's for our device 129 if(strcmp(dev, deviceName())==0)131 if(strcmp(dev,getDeviceName())==0) 130 132 { 131 133 // This is for our device … … 151 153 } 152 154 153 return DefaultD river::ISNewText(dev,name,texts,names,n);155 return DefaultDevice::ISNewText(dev,name,texts,names,n); 154 156 } 155 157 … … 170 172 } 171 173 172 void INDI::FilterWheel::ISSnoopDevice (XMLEle *root) 174 175 bool INDI::FilterWheel::GetFilterNames(const char* groupName) 173 176 { 174 return;175 }176 177 178 bool INDI::FilterWheel::GetFilterNames(const char *deviceName, const char* groupName)179 {180 INDI_UNUSED(deviceName);181 177 INDI_UNUSED(groupName); 182 178 return false; -
BAORadio/libindi/libindi/libs/indibase/indifilterwheel.h
r642 r697 20 20 #define INDI_FILTERWHEEL_H 21 21 22 #include "defaultd river.h"22 #include "defaultdevice.h" 23 23 #include "indifilterinterface.h" 24 24 … … 32 32 \see INDI::FilterInterface 33 33 */ 34 class INDI::FilterWheel: public INDI::DefaultD river, public INDI::FilterInterface34 class INDI::FilterWheel: public INDI::DefaultDevice, public INDI::FilterInterface 35 35 { 36 36 protected: … … 47 47 virtual bool ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n); 48 48 virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n); 49 virtual void ISSnoopDevice (XMLEle *root);50 49 51 50 protected: … … 54 53 virtual bool SelectFilter(int); 55 54 virtual bool SetFilterNames(); 56 virtual bool GetFilterNames(const char *deviceName, const char* groupName);55 virtual bool GetFilterNames(const char* groupName); 57 56 58 57 }; -
BAORadio/libindi/libindi/libs/indibase/indifocuser.cpp
r642 r697 38 38 bool INDI::Focuser::initProperties() 39 39 { 40 DefaultD river::initProperties(); // let the base class flesh in what it wants40 DefaultDevice::initProperties(); // let the base class flesh in what it wants 41 41 42 42 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); 44 44 45 45 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); 47 47 48 48 IUFillSwitch(&FocusMotionS[0],"FOCUS_INWARD","Focus In",ISS_ON); 49 49 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); 51 51 52 52 return 0; … … 56 56 { 57 57 // First we let our parent populate 58 DefaultD river::ISGetProperties(dev);58 DefaultDevice::ISGetProperties(dev); 59 59 60 60 return; … … 82 82 { 83 83 // first check if it's for our device 84 if(strcmp(dev, deviceName())==0)84 if(strcmp(dev,getDeviceName())==0) 85 85 { 86 86 // This is for our device … … 127 127 128 128 129 return DefaultD river::ISNewNumber(dev,name,values,names,n);129 return DefaultDevice::ISNewNumber(dev,name,values,names,n); 130 130 } 131 131 … … 133 133 { 134 134 135 if(strcmp(dev, deviceName())==0)135 if(strcmp(dev,getDeviceName())==0) 136 136 { 137 137 // This one is for us … … 150 150 151 151 // Nobody has claimed this, so, ignore it 152 return DefaultD river::ISNewSwitch(dev,name,states,names,n);152 return DefaultDevice::ISNewSwitch(dev,name,states,names,n); 153 153 } 154 154 155 155 bool INDI::Focuser::ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n) 156 156 { 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); 163 158 } 164 159 … … 172 167 } 173 168 169 bool INDI::Focuser::ISSnoopDevice (XMLEle *root) 170 { 171 return false; 172 } 173 -
BAORadio/libindi/libindi/libs/indibase/indifocuser.h
r642 r697 20 20 #define INDIFOCUSSER_H 21 21 22 #include "defaultd river.h"22 #include "defaultdevice.h" 23 23 24 24 /** … … 30 30 \author Gerry Rozema 31 31 */ 32 class INDI::Focuser : public INDI::DefaultD river32 class INDI::Focuser : public INDI::DefaultDevice 33 33 { 34 34 public: … … 44 44 virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n); 45 45 virtual bool ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n); 46 virtual voidISSnoopDevice (XMLEle *root);46 virtual bool ISSnoopDevice (XMLEle *root); 47 47 48 48 protected: -
BAORadio/libindi/libindi/libs/indibase/inditelescope.cpp
r642 r697 46 46 MovementWESP = new ISwitchVectorProperty; 47 47 ConfigSV = new ISwitchVectorProperty; 48 ScopeParametersNP = new INumberVectorProperty; 48 49 49 50 } … … 60 61 delete MovementWESP; 61 62 delete ConfigSV; 63 delete ScopeParametersNP; 62 64 } 63 65 64 66 bool INDI::Telescope::initProperties() 65 67 { 66 DefaultD river::initProperties();68 DefaultDevice::initProperties(); 67 69 68 70 IUFillNumber(&EqN[0],"RA","RA (hh:mm:ss)","%010.6m",0,24,0,0); 69 71 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); 71 73 72 74 IUFillNumber(&EqReqN[0],"RA","RA (hh:mm:ss)","%010.6m",0,24,0,0); 73 75 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); 75 77 76 78 IUFillNumber(&LocationN[0],"LAT","Lat (dd:mm:ss)","%010.6m",-90,90,0,0.0); 77 79 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); 79 81 80 82 IUFillSwitch(&CoordS[0],"TRACK","Track",ISS_OFF); 81 83 IUFillSwitch(&CoordS[1],"SLEW","Slew",ISS_OFF); 82 84 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); 84 86 85 87 IUFillSwitch(&ConfigS[0], "CONFIG_LOAD", "Load", ISS_OFF); 86 88 IUFillSwitch(&ConfigS[1], "CONFIG_SAVE", "Save", ISS_OFF); 87 89 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); 89 91 90 92 91 93 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); 93 95 94 96 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); 96 98 97 99 IUFillSwitch(&MovementNSS[MOTION_NORTH], "MOTION_NORTH", "North", ISS_OFF); 98 100 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); 100 102 101 103 IUFillSwitch(&MovementWES[MOTION_WEST], "MOTION_WEST", "West", ISS_OFF); 102 104 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); 104 110 105 111 TrackState=SCOPE_PARKED; … … 111 117 // First we let our parent populate 112 118 //IDLog("INDI::Telescope::ISGetProperties %s\n",dev); 113 DefaultD river::ISGetProperties(dev);119 DefaultDevice::ISGetProperties(dev); 114 120 115 121 // We may need the port set before we can connect … … 128 134 defineSwitch(MovementWESP); 129 135 defineSwitch(ConfigSV); 136 defineNumber(ScopeParametersNP); 130 137 131 138 } … … 136 143 { 137 144 defineText(PortTV); 145 138 146 if(isConnected()) 139 147 { … … 146 154 defineNumber(LocationNV); 147 155 defineSwitch(ParkSV); 148 149 } else 150 { 151 //IDLog("INDI::Telescope deleting properties\n"); 156 defineNumber(ScopeParametersNP); 157 158 } 159 else 160 { 152 161 deleteProperty(CoordSV->name); 153 162 deleteProperty(EqNV->name); … … 157 166 deleteProperty(LocationNV->name); 158 167 deleteProperty(ParkSV->name); 159 160 //initProperties(); 161 } 168 deleteProperty(ScopeParametersNP->name); 169 170 } 171 162 172 defineSwitch(ConfigSV); 163 173 … … 217 227 { 218 228 // 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"); 220 230 return false; 221 231 } … … 223 233 bool INDI::Telescope::MoveNS(TelescopeMotionNS dir) 224 234 { 225 IDMessage( deviceName(),"Mount does not support North/South motion");235 IDMessage(getDeviceName(),"Mount does not support North/South motion"); 226 236 IUResetSwitch(MovementNSSP); 227 237 MovementNSSP->s = IPS_IDLE; … … 232 242 bool INDI::Telescope::MoveWE(TelescopeMotionWE dir) 233 243 { 234 IDMessage( deviceName(),"Mount does not support West/East motion");244 IDMessage(getDeviceName(),"Mount does not support West/East motion"); 235 245 IUResetSwitch(MovementWESP); 236 246 MovementWESP->s = IPS_IDLE; … … 247 257 //IDLog("INDI::Telescope got %d new text items name %s\n",n,name); 248 258 // first check if it's for our device 249 if(strcmp(dev, deviceName())==0)259 if(strcmp(dev,getDeviceName())==0) 250 260 { 251 261 // This is for our device … … 275 285 // We processed this one, so, tell the world we did it 276 286 return true; 277 } 278 279 } 280 281 return DefaultD river::ISNewText(dev,name,texts,names,n);287 } 288 289 } 290 291 return DefaultDevice::ISNewText(dev,name,texts,names,n); 282 292 } 283 293 … … 289 299 // first check if it's for our device 290 300 //IDLog("INDI::Telescope::ISNewNumber %s\n",name); 291 if(strcmp(dev, deviceName())==0)301 if(strcmp(dev,getDeviceName())==0) 292 302 { 293 303 if(strcmp(name,"EQUATORIAL_EOD_COORD_REQUEST")==0) … … 348 358 IDSetNumber(LocationNV,NULL); 349 359 } 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); 355 376 } 356 377 … … 365 386 //} 366 387 367 if(strcmp(dev, deviceName())==0)388 if(strcmp(dev,getDeviceName())==0) 368 389 { 369 390 // This one is for us … … 420 441 421 442 // Nobody has claimed this, so, ignore it 422 return DefaultD river::ISNewSwitch(dev,name,states,names,n);443 return DefaultDevice::ISNewSwitch(dev,name,states,names,n); 423 444 } 424 445 … … 466 487 //if (isDebug()) 467 488 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); 469 490 470 491 return false; … … 481 502 { 482 503 // We got a valid scope status read 483 IDMessage( deviceName(),"Telescope is online.");504 IDMessage(getDeviceName(),"Telescope is online."); 484 505 return rc; 485 506 } … … 488 509 // So, we need to close our handle and send error messages 489 510 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"); 491 512 492 513 return false; … … 502 523 503 524 close(PortFD); 504 IDMessage( deviceName(),"Telescope is offline.");525 IDMessage(getDeviceName(),"Telescope is offline."); 505 526 506 527 return true; -
BAORadio/libindi/libindi/libs/indibase/inditelescope.h
r642 r697 20 20 #define INDI_TELESCOPE_H 21 21 22 #include "defaultd river.h"22 #include "defaultdevice.h" 23 23 24 24 /** … … 42 42 \see TelescopeSimulator and SynScan drivers for examples of implementations of INDI::Telescope. 43 43 */ 44 class INDI::Telescope : public INDI::DefaultD river44 class INDI::Telescope : public INDI::DefaultDevice 45 45 { 46 46 private: … … 173 173 ISwitchVectorProperty *MovementWESP; 174 174 175 INumber ScopeParametersN[2]; 176 INumberVectorProperty *ScopeParametersNP; 177 175 178 176 179 }; -
BAORadio/libindi/libindi/libs/indicom.c
r642 r697 1151 1151 } 1152 1152 1153 /* Find index of the ON member of an ISwitchVectorProperty */ 1154 int 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 1153 1164 /* Set all switches to off */ 1154 1165 void -
BAORadio/libindi/libindi/libs/lilxml.c
r642 r697 15 15 You should have received a copy of the GNU Lesser General Public 16 16 License along with this library; if not, write to the Free Software 17 Foundation, Inc., 5 9 Temple Place, Suite 330, Boston, MA 02111-1307USA17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 18 19 19 #endif -
BAORadio/libindi/libindi/libs/webcam/v4l2_base.cpp
r490 r697 218 218 219 219 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); 221 221 222 222 break; … … 253 253 254 254 if (-1 == xioctl (fd, VIDIOC_QBUF, &buf)) 255 errno_exit ("VIDIOC_QBUF", errmsg);255 errno_exit ("ReadFrame IO_METHOD_USERPTR: VIDIOC_QBUF", errmsg); 256 256 257 257 break; … … 303 303 304 304 case IO_METHOD_MMAP: 305 for (i = 0; i < n_buffers; ++i) { 305 for (i = 0; i < n_buffers; ++i) 306 { 306 307 struct v4l2_buffer buf; 307 308 … … 313 314 314 315 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); 316 317 317 318 } 318 319 319 320 type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 320 321 … … 340 341 341 342 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); 343 344 } 344 345
Note: See TracChangeset
for help on using the changeset viewer.