×

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

Bi-monthly release with minor bug fixes and improvements

Trying to write a telescope driver - need help

  • Posts: 3
  • Thank you received: 3
Hi, I am new here, please be kind.
I am very new to INDI, but I do have experience with C++ (however not with CMake)

I have a telescope controller (Boxdörfer MTS-3SDI) with some non-standard LX200 firmware. It does not behave properly in KStars if I try any of the INDI LX200 drivers. So I thought I might try to write my own driver, fixing the problems of formatting that I think is the problem. This is also thinking ahead, as another firmware exists for the controller, giving me more detailed control. So the goal is to try to learn how to make a basic INDI telescope driver by fixing the LX200 issues. If I can get it to work under Kubuntu, the plan is to port it to raspberry PI afterwards, so I can connect to it wirelessly.

However, I am really having a hard time figuring things out. Here is what i have done (working on Kubuntu 14.04)

I wrote a driver class: class lx200mts : public INDI::Telescope { ...}
I managed to link it using CMake (not so easy....)
Its name shows up in KStars, but nothing really works

I also tried to start the driver from the command line:

2014-10-03T14:05:44: startup: indiserver ./indi_lx200mts
*** Error in `': malloc(): memory corruption (fast): 0x0000000002058180 ***
2014-10-03T14:05:44: Driver ./indi_lx200mts: stderr EOF
2014-10-03T14:05:44: Driver ./indi_lx200mts: restart #1
*** Error in `': malloc(): memory corruption (fast): 0x0000000000ea0180 ***
2014-10-03T14:05:45: Driver ./indi_lx200mts: stderr EOF
2014-10-03T14:05:45: Driver ./indi_lx200mts: restart #2

it goes on and on about memory corruption.

I have added some "Hello" printouts in the code like this, but it never shows up

void ISGetProperties (const char *dev)
{
cout << "ISGetProperties " << endl;
ISInit();
telescope->ISGetProperties(dev);
}

I would be grateful for some assistance!
9 years 5 months ago #2022

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

Did you read and run the tutorials that come with INDI Library? There is a simple telescope driver you can use and add to it as necessary. No need to edit LX200 driver as it is complex, you should start with something simpler.
9 years 5 months ago #2023

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

  • Posts: 3
  • Thank you received: 3
I am using the tutorials as starting point - btw. they are missing info on header files etc. I have read it in quite some detail, but not executed exactly as shown.

I am not editing an existing LX200 driver and just trying to get a skeleton working at the moment (much like the tutorial). The idea is not to write a complete LX200 driver, just intercept what is returned from my controller, reformat it so it is understood by KStars.

A very basic question: I have used DEBUG and DEBUGF macros in the code, but I don't see a single message, where do they end up? It is difficult to help oneself when you can't debug like I'm used to (e.g. in Code::Blocks). To me it looks like the driver is never even loaded, but I can't understand why.
Last edit: 9 years 5 months ago by Carsten Arnholm.
9 years 5 months ago #2024

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

What's missing header info? If you compile libindi, all tutorials are also built and can be run immediately. The DEBUG macro are used to log to the client and/or file, please check the API documentation.

I'd recommend you use Qt Creator IDE, open libindi, go to examples/tutorial_two, this is a simple telescope driver and it has everything you need now to get started. Run it first to make sure everything is OK.
9 years 5 months ago #2025

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

  • Posts: 3
  • Thank you received: 3
Thanks for the input.

I was referring to indilib.org/develop/tutorials.html , which is the first you meet as a newcomer (via Develop -> Totorials menu at www.indilib.org/ ). There is some good information there, but the code shown is missing header info and info on how to build/link. I see your point about the tutorials being runnable at once from the source package, thank you for that info, I wasn't aware of it (even though I had buit indilib).

I am looking at the API doc at www.indilib.org/api/ - it is not so easy to find the documentation for the macros as there is no search function and no index mentioning it.

I installed Qt Creator IDE, but I don't quite understand why I should. I am not interested in Qt and any editor can view those example files, I had already reviewed them. Is there any special support for INDI in the Qt Creator IDE? I tried to build by opening CMakeLists.txt, but it failed. As mentioned I am using Code::Blocks normally, and not inclined to use anything else unless there is a good reason.

Anyway, I will try to get the example running as written, but that was what I started with. I take your point to start simpler. Thanks again.
9 years 5 months ago #2028

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

Ok, I edited the tutorials page to show how to build and run the tutorials so it is more clear now. Regarding the API, INDI Debugging & Logging API is on the first page there!

Qt Creator is just a personal preference, you can use whatever you like, but I find it easy to use and it's packed with features, plus it supports cmake/svn/git..out of the box.
9 years 5 months ago #2029

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

  • Posts: 24
  • Thank you received: 2
Hi, If you have any success in writing an INDI-driver for the MTS-3SDI, I am very interested.
I have an old Vixen GPDX mount with this controller, and would love to control it using Stellarmate.

Regards,
Odd
4 years 4 months ago #45209

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

Time to create page: 0.536 seconds