×

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

Bi-monthly release with minor bug fixes and improvements

API for Rust

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust


Thanks! I have already written the rust INDI API and am making a program that uses it. This is not a separate crate, but a simple indi_api.rs module. I will look you code any way
1 year 3 months ago #89017

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

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

Hm... Have no idea how to set gain for CCD properly.
For CCD simulator gain is stored in "CCD_GAIN / GAIN" property. For Toupcam camera there is no "CCD_GAIN / GAIN" property and gain is stored in "CCD_CONTROLS / Gain"
What is rule to find property where gain is stored?
1 year 3 months ago #89235

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

  • Posts: 5
  • Thank you received: 1

Replied by Chris Constantine on topic API for Rust

> Thanks! I have already written the rust INDI API and am making a program that uses it. This is not a separate crate, but a simple indi_api.rs module. I will look you code any way

Cool, glad you've got something working. I'd be interested in seeing your implementation if you're comfortable showing it.

> What is rule to find property where gain is stored?

I have no idea. I haven't been able to find any documentation of what each class of device's (CCD, focuser, mount, etc)
properties mean or do. I hope there is some kind of standard, but I fear that each device implementation has s different set of properties.
1 year 3 months ago #89247

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

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

I haven't published my sources on github yet because the program is not complete.This is simple application for live stacking for weak computers (like Raspberry Pi or Orange Pi). When I publish it I will write in this thread
1 year 3 months ago #89263

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

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

Almost done. Simple client in rust for astrophotography or live stacking on my Orange PI 4 LTS
1 year 2 months ago #89724
Attachments:

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

  • Posts: 5
  • Thank you received: 1

Replied by Chris Constantine on topic API for Rust

Whoa, that's looking awesome. It looks like you're making way more progress than I am.
1 year 2 months ago #89806

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

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

I bad already written stuff for live stacking before I asked about rust API. That's why I'm making more progress.
Now I struggle with INDI server and GTK )) Possible I will publish my sources at end of month
Last edit: 1 year 2 months ago by Denis.
1 year 2 months ago #89813

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

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

github.com/art-den/astra_lite/blob/main/src/indi_api.rs
My API is just module of rust application (not crate)
1 year 1 month ago #90147

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

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

What is a reliable way to determine that the driver has crashed? indi_toupcam_ccd for arm64 crashes randomly. I want to make recovery from ccd driver crash.
1 year 1 month ago #90446

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

Replied by Jasem Mutlaq on topic API for Rust

You can watch for stderr and check for this message

QRegularExpression re("Driver (.*): Terminated after #0 restarts");

But this assumes you started the server yourself. If connected to a remote server, you would only know if a device was removed and not crashed.
1 year 1 month ago #90447

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

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

If the device was removed (via the xml protocol), and then added again, then it most likely crashed?
Btw `delProperty` command contains `message` attribute where INDI server may put information about device crashing
1 year 1 month ago #90479

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

Replied by Jasem Mutlaq on topic API for Rust

That sounds like a good INDI PR to have! ;-)
1 year 1 month ago #90503

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

Time to create page: 1.387 seconds