Welcome, Guest
Username: Password: Remember me
25 Jul 2018
Glad to announce of release of INDI Library v1.7.4 on 2018-07-25. A few drivers were added in this release as we continue to improve & stabilize existing drivers.
  • Page:
  • 1

TOPIC: Writing my first INDI (Focuser) driver

Writing my first INDI (Focuser) driver 1 year 1 month ago #18288

  • kbrown
  • kbrown's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 27
  • Thank you received: 0

I have just started learning how to write INDI drivers and have a somewhat working version for my arduino based DIY focuser but I have a few questions:

The focuser can be controlled with a hand controller too. When the position is changed using the hand controller I'm sending a notification to INDI via the USB serial comms. I've set up my INDI driver to poll the serial comms periodically using the SetTimer() / TimerHit() mechanisms. The serial data is sent to a parser which then calls the relevant callback functions. One of them is updating the current position where I log the incoming position and set the FocusAbsPosN[0].value.

Doing it this way seems to leave the UI widget in the INDI Control Panel in KStars out of sync. It seems to display the previous value instead of the most recent one.

Q1: Is this how you normally would hook up incoming serial communications?
Q2: Do I need to somehow notify the client I've changed the FocusAbsPosN[0].value?

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

Writing my first INDI (Focuser) driver 1 year 1 month ago #18290

  • jpaana
  • jpaana's Avatar
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 85
  • Karma: 2
  • Thank you received: 28
A2: Yes you need to call IDSetNumber(&FocusAbsPosNP, nullptr); or similar
The following user(s) said Thank You: kbrown

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

  • Page:
  • 1
Time to create page: 0.088 seconds


3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!