×

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

Bi-monthly release with minor bug fixes and improvements

How to add a property to a standard driver?

  • Posts: 2
  • Thank you received: 1
Hi, I'm developing a telescope driver for the MCMTII mount, documented here , code of the current INDI driver is here .
I'm using the standard Telescope driver. I'd like to add a "allow flip" property for German mounts. The tutorials and documentation on the website seem to refer to the versions of libindi in which there were not already the standard drivers, or at least don't seem to inherit from the standard classes (INDI::Telescope for me). The code that manages all properties seems quite complicated, is it possible to only have some simple code to manage a non-default property? Are there examples somewhere?
Thanks!
11 years 2 weeks ago #145

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

  • Posts: 712
  • Thank you received: 174
Hi, good location to define custom properties are initProperties()/updateProperties() methods. Look at telescope_simulator.cpp for a working example.

Peter
11 years 2 weeks ago #149

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

  • Posts: 2
  • Thank you received: 1
Indeed, it was pretty easy. Sorry that I missed this one. Thanks!
11 years 2 weeks ago #153

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

  • Posts: 6
  • Thank you received: 0
I'm sorry I'm still missing something... Actually I'm totally new to INDI. I read all tutorials but I still can't figure out how to add a property.
Let's take the tutorial one: if I want to add a property "stupidmessage" as switch, for example, to the SimpleDevice, what I have to do?
I try to open (and modify something) SimpleDevice.h but It's still not clear looking at this.
Thanks a lot.
6 years 11 months ago #16416

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

Please read the INDI Developer Manual , it has all the details.

EDIT: I updated the driver development section to include a section on how to extend simple device.
Last edit: 6 years 10 months ago by Jasem Mutlaq.
6 years 10 months ago #16417

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

  • Posts: 6
  • Thank you received: 0
ok thank you very much! I think those new declarations go under public, that works for me.
6 years 10 months ago #16463

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

Time to create page: 0.691 seconds