Can anyone please point me at any concise driver development tutorials. I've spent around 20 or 30 hours trying to get my head around it but the documentation is, to say the least, scattered and sparse, often relying on information auto generated from the source code. For example I need a few numbers in my driver for a dome to set the likes of PID tunings etc. I followed the tutorial projects as best I could but it took me ages to find the register property function as I actually had no idea it even existed. Even then there were questions as to where it should go in my code. As for how to send and receive data to my arduino physical device I really haven't even started to tackle that. And it seems all the tutorial projects are simulators so this topic isn't even covered.
Several of the links to the developers manual are broken as well, I just get a 404 message which is frustrating and makes me wonder how active the development of INDI is and whether it will continue. Add in the kdesudo problem which hasn't had a resolution and even setting up the environment is "tricky". I quote from the page
"For completeness, the following is a short video on how (you used to be able to) to setup libindi in QtCreator in Debug mode (for Celestron GPS driver) and how to use KStars to connect to it while under development. Some of it may still be applicable, but other parts will likely need some modification."
This is less than useful. What modifications do I need to use ? This is the first time I've used QTCreator and I really don't have the time to become an expert in all it's settings as well as try and get my head around how INDI itself works.
I have to say the INDI looks very promising but this lack of good documentation and tutorials is making me feel that the learning curve is way too steep. I developed an ASCOM driver in just a day or so following the excellent resources they have.
What is really needed is a tutorial that leads beginners in INDI like myself by the hand. This is how you add a switch, how you add a number (not a standard one), how you communicate over the serial port to your device, how you deploy your driver etc etc. Without that I fear you will lock out amateur developers like myself who can write code but struggle with the other aspects of development.
I know one response is likely to be "search the forum". The trouble with that is it is very very time consuming. You have to find a topic related to the issue you have and then read pages of it to try and find the nugget of information you need. And that's when you've actually stumbled upon the search term that leads to that nugget.
Hey Tim, as someone who has just recently started feeling like I really understand how to code for INDI, I agree that a good tutorial would be nice to have. In the meantime, here's a link to a standalone driver I wrote for my mount. It uses serial communication, so there is a working example there.
I'll read through them both. That's very kind of you . In theory if I can write the driver for my dome everything else should run fine on INDI. The dome drive was home made with a friend of mine originally designing the electronics and software. I have since heavily modified both and under ASCOM it works very well. But at heart I prefer to use linux hence the shift to INDI
I worked through the My Custom Driver example and it all worked fine except KStars could not find it. After some slewthing I copied the contents of the indi_mycustomdrive.xml into the drivers.xml file in /usr/share/indi and KStars found it and all ran as expected.
Thanks, I'll try your suggestions and report back.
I've been working through the serial communication code and can successfully connect to mu arduino that controls the dome. I can also send a command and see the RX light flash on the arduino. The protocol I use has a set and read function.
So if I send M1# it starts the motors in a clockwise motion and it returns M1# to acknowledge it got there OK. M0# stops them etc. But I can also interrogate the arduino to see what state the motors are in, so m# returns m1# . I cannot see how to do a) the error checking and b) the interrogation.
I store a lot of the arduino required settings in the arduino itself, PID motor control settings for example. So when I 1st connect it would be nice to be able to read them all out and display them. Here's a sample of the command set
<code>// Command set
// An# Set maximum RPM
// a# Get maximum RPM
// Bn# Set minimum RPM
// b# Get minimum RPM
// Cn# Set RPMCalibration
// c# Get RPMCalibration</code>
A few clues on how to do this would be much appreciated. I guess I put the commands in the updateproperties function ?
Once I have my head around this then most of the rest of writing the dome driver will just be grunt work