×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

How to create an INDI dome driver?

  • Posts: 3
  • Thank you received: 0
Hello,

I'm working in my free time to improve my final degree project (more info in Spanish: jgusmar.blogspot.com.es/2014/01/sistema-...eoperacion-para.html). The idea is create a full compliance INDI driver for domes with industrial PLC as control unit. This is the repository where all will be published: github.com/jgm1986/MCCM-Robotic-Observatory

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.

Thanks for your help.

Regards,

Javier
Last edit: 6 years 8 months ago by Javier.
6 years 8 months ago #17958

Please Log in or Create an account to join the conversation.

Javier,

You can take a look at INDI MaxDomeII dome driver. It is a 3rd party driver that compiles just fine: github.com/indilib/indi/tree/master/3rdparty/indi-maxdomeii

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.
The following user(s) said Thank You: Javier
6 years 8 months ago #17967

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
Thanks for your answer!

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!
6 years 8 months ago #17974

Please Log in or Create an account to join the conversation.

You're almost there!

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.

Good luck on your project!
The following user(s) said Thank You: Javier
6 years 8 months ago #17979

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
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.
6 years 8 months ago #18109

Please Log in or Create an account to join the conversation.

Time to create page: 0.350 seconds