My first problem for start working with the driver develop is that I don't understand how to create a make file that compiles the custom dome code easily. I'm not an expert with C programming. I have read all developers tutorials from indilib.org but wothout luck.
Finally, I think that the driver code folder should contains these files:
- indi-plc-dome.cpp
- indi-plc-dome.h
- CMakeLists.txt
Feel free to fork the repository (brunch: feature/indi-dev) and send a pull request.
PS: The dome with industrial PLC has been installed in the astronomical observatory of Science Museum of Castilla-La Mancha (Spain). I collaborate with this institution since 2014 when my final degree project will be done. Now I would improve this work and publish it as OpenSource/OpenHardware project in GitHub.
Please follow the structure of that driver. If you're planning to make an out-of-tree build, then you need to include in your project CMake Modules: github.com/indilib/indi/tree/master/cmake_modules
I checked the Github repo but couldn't see any INDI driver code there.
Sorry, there are not code published in the repository because I don't know how to create the main structure.
According to your recomendation, I think the easy way for srtart with the driver develop is clonning the maxdome folder inside 3rdparty directory and rename it (for example "indi-plcdome"). This is just now the content of the driver directory right now: github.com/jgm1986/MCCM-Robotic-Observat...drivers/indi-plcdome
On the other hand, I don't know if I am compiling correctly the driver... I have executed this commands:
cp -r indi-plcdome/ ~/projects/indi/3rdparty/
cd ~/projects/indi/3rdparty/indi-plcdome/
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug .
make
sudo make install
If this is correct, I'll remove the unnecessary code and customize the methods with my own code. Thanks for your help!
First thing is a preference, but it's recommended that you separate the build and source directories. Make a build directory somewhere and build against the source.
Also, you need cmake_modules directory as well, so copy it there so that it can find INDI and other pre-requisites. The rest is correct.
By the moment I have renamed all files and Class inside driver directory. The compilation is done without errors (at least I think so ). By the moment the build directory it's not prioritary... maybe this will requires changes the CMakeList file. Now the driver directory is copied from repository to a temporal project folder. Thanks for your help. I hope I'll give to you good news in a few months.