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.
Read More...
  • Page:
  • 1

TOPIC: Doubts in Filter Wheel driver development

Doubts in Filter Wheel driver development 5 months 3 weeks ago #24562

  • nag
  • nag's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
hello

First of all, my English it's far from be the best one, so i'm sorry for that.

Now, i want to try Ekos + INDI, but for that i have to develop a driver for my DIY motorized Filter Wheel. The driver it's almost done, but as an ASCOM user i have my head ASCOM Formatted, so there are a few things that i dont understood yet.

Questions:
- The filter Wheel driver dont have a 'Connect' and 'Disconnect' functions. I supose that all the process it's INDI internal, and every time the INDI Connect the driver, the function initProperties() it's called. Am i correct ?

- The filter Slots in INDI, start from 1 (not from 0 as ASCOM) ?

- In KStars, Every time i change a filter in the INDI Control Panel, it actualy start to run the wheel to the desired slot. Do i have an option to just set the filter number (without turn the wheel) or i have to implement that function in the driver ?

- What apends when the INDI connects the driver ? The Slot goes to the number set by CurrentFilter = <number> in the InitProperties() or it's set by the last filter slot when disconnect the Driver ? I'm asking this, because even if i remove the CurrentFilter = <number> in the initProperties(), it seams that the wheel starts always in filter 1, then moves to the last filter when disconnected.
So if, when i disconnect the wheel the filter its number 3, when i connect it turns always 2 filters.

Thanks
Nuno Gameiro

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

Doubts in Filter Wheel driver development 5 months 3 weeks ago #24573

How do you communication with your filter wheel? Serial? Ethernet? USB? If it is Serial/Ethernet, but the connection plugins take care of connecting/disconnecting your filter wheel in that case and you do not need explicit connect/disconnect and instead you have a Handshake() function in which you test the actual communication with your device.

+ For USB, you need connect/disconnect. Filters in INDI start from 1.
+ Not sure what you mean by turn wheel? The filter control is fairly simple: set the target filter. Where is this turn wheel?
+ Nothing happens by default. However, if you Save Configuration, then the current filter number is saved in the config, and next time you connect, Ekos automatically loads the configuration, which includes the desired filter position.

Good luck!

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

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Doubts in Filter Wheel driver development 4 months 3 weeks ago #25598

  • nag
  • nag's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
hello

Thanks for your answer, and i'm sorry for mine takes some time.

- I'm using Arduino. So i need the connect/disconnect routines ?
- Using Ekos, i have to save configuration manually to save the slot number ? When i click in the 'set' button to change the slot number, or change using a sequence the slot number it's not saved ? If so, how can i save the slot number every time i change using the SelectFilter() routine ?

I'm sorry if i'm asking basic questions.

Thank you very much
Nuno Gameiro

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

Doubts in Filter Wheel driver development 4 months 3 weeks ago #25599

1. For Arduino, just implement Handshake(..) function.
2. If you want to save the slot number when changed, just save it in the INDI driver (use saveConfig(...))
The following user(s) said Thank You: nag

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

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Doubts in Filter Wheel driver development 4 months 2 weeks ago #25678

  • nag
  • nag's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
Thank you very much, that's works :)
One last question, and one thought...

When the client (Ekos) connects the wheel, the slot number it's defined by currentFilter or it takes the slot number on the config file ? If it's the first option how can i get the slot number in config file (currentFilter = <get_slot_number> ) ? If it's the second option, i'm doing something wrong :dry:

A thought...
What's the reason for the client don't save the slot number when the filter change ? If it's the case, everytime I stop and start INDI, the slot number in the config file never correspond to the efective slot number in the wheel. Am i wrong ?

Thank you once more
Nuno Gameiro

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

Doubts in Filter Wheel driver development 4 months 2 weeks ago #25681

Clients do not read configuration files, the driver do. So all clients will read FILTER_SLOT property and try to find the value of FILTER_SLOT_VALUE.

Driver configuration files are usually NOT loaded automatically by the driver, but some clients like Ekos have the option to invoke loading of configuration files after connection is establishing with the filter wheel. Clients do not save anything about devices, it's all defined by the driver itself.

The current filter value is ONLY saved to the configuration file when the user explicitly saves the configuration file by clicking Save under Options. If you want your filter wheel to always remember the last slot set, then simply call saveConfig(true, "FILTER_SLOT"); in your SelectFilter(..) function. This is whenever the slot is updated, it is immediately saved to the configuration file.
The following user(s) said Thank You: nag

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

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Doubts in Filter Wheel driver development 4 months 2 weeks ago #25682

  • nag
  • nag's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
Ok, thank you a lot.

As i said in the begining, i'm ASCOM formatted. B)

The command of my filter wheel it's very simple. "M23" to move from filter 2 to 3. But even setting Ekos to load configuration file on connection, the comand sent when i connect it's M02 (2 it's the filter saved on FILTER_SLOT property) .
CurrentFilter it's 0, i believe.

I'm almost there :)

Nuno Gameiro

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

Doubts in Filter Wheel driver development 4 months 2 weeks ago #25738

  • nag
  • nag's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
Hello

Just to say that i successfully finished the driver :)

Thank you very much for your help :)

Nuno Gameiro
The following user(s) said Thank You: knro

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

  • Page:
  • 1
Time to create page: 0.091 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