Welcome, Guest
Username: Password: Remember me
08 Apr 2018
INDI development team is happy to announce the release of INDI Library v1.7.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers.
  • Page:
  • 1

TOPIC: Writing my first INDI (Focuser) driver

Writing my first INDI (Focuser) driver 10 months 2 weeks ago #18288

  • kbrown
  • kbrown's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 18
  • 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 10 months 2 weeks ago #18290

  • jpaana
  • jpaana's Avatar
  • Away
  • Senior Boarder
  • Senior Boarder
  • Posts: 77
  • Karma: 1
  • Thank you received: 27
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.172 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!