OK, I've written a dome driver for my observatory, it compiles, builds, and runs fine on my kubuntu desktop.
However I cant seem to get it to compile on my raspberry pi....
Code is here github.com/dokeeffe/indi-aldiroof
The error I get is... undefined reference to `INDI::Dome::SetDomeCapability(unsigned int)'
pi@raspberrypi ~/source-code/github/indi-aldiroof-master/indi-driver/build $ make
Scanning dependencies of target firmata
[20%] Building CXX object CMakeFiles/firmata.dir/libfirmata/src/firmata.o
[40%] Building CXX object CMakeFiles/firmata.dir/libfirmata/src/arduino.o
[60%] Linking CXX static library libfirmata.a
[60%] Built target firmata
Scanning dependencies of target indi_aldiroof
[80%] Building CXX object CMakeFiles/indi_aldiroof.dir/aldiroof.o
[100%] Linking CXX executable indi_aldiroof
CMakeFiles/indi_aldiroof.dir/aldiroof.o: In function `RollOff::RollOff()':
aldiroof.cpp:(.text+0x2e4): undefined reference to `INDI::Dome::SetDomeCapability(unsigned int)'
CMakeFiles/indi_aldiroof.dir/aldiroof.o:(.rodata+0x390): undefined reference to `INDI::DefaultDevice::getDriverInterface()'
/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/libindidriver.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/libindidriver.so: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'
/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/libindidriver.so: undefined reference to `clock_gettime@GLIBC_2.17'
collect2: ld returned 1 exit status
CMakeFiles/indi_aldiroof.dir/build.make:96: recipe for target 'indi_aldiroof' failed
make[2]: *** [indi_aldiroof] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/indi_aldiroof.dir/all' failed
make[1]: *** [CMakeFiles/indi_aldiroof.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I updated from svn and build indi on the RPI fine. Looks like the correct headers are in /usr/include/libindi/indidome.h
DISCLAIMER: I'm a java developer and have *very* little experience with c++ (I havent a clue what I'm doing )
Btw, I'm very interested in how your repurposed the hoist for the dome since I am about to begin construction of my home observatory and would like to know what is involved and how much $$$ it costs.
Furthermore, I looked at your code and it's pretty nice! Some comments:
1. Always use DEBUG(...) or DEBUGF(..), avoid IDLog.
2. No need to put \n, it it appended for you.
3. Do not set the Connection switch in Connect().. only return true or false and that's enough.
Thanks for the code review too I've made those changes.
Regarding the hoist, I'll let you know how it goes. I should be installing the relay box this week / weekend. The mechanics are all working. The hoist opens and closes the roof really well using the manual switch. Fingers crossed the relays work too. Anyway I'll let you know and add more details to the github readme.