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

TOPIC: Writing my first INDI (Focuser) driver

Writing my first INDI (Focuser) driver 4 months 1 week ago #18288

  • kbrown
  • kbrown's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 0
Hi,

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 4 months 1 week ago #18290

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.086 seconds

Login



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!


Gallery

Replica

Why INDI

Replica