×

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

Bi-monthly release with minor bug fixes and improvements

myFocuserPro or myFocuserPro2 and INDI

  • Posts: 35
  • Thank you received: 3
I think that the only way you might to the bottom of this is if the serial log files are looked at,
Thant would determine if it is a serial timeout issue, a serial timing issue on connect, or if it is a problem in either the firmware or higher up the chain.

Regards
Robert
The following user(s) said Thank You: Acapulco Rolf
4 years 5 months ago #44867
The topic has been locked.
  • Posts: 52
  • Thank you received: 15
Thanks Rob

I'm now able to reproduce the issue consistently


Steps to reproduce the issue:

I'll walk through the steps to reproduce the issue based on Stellarmate as that's the build I use

1. Start up the Stellarmate Web Manager
stellarmate.local:8624

2. Start the INDI server
All devices defined in the equipment profile will start-up as expected

3. Open Kstars
4. From the Kstars "Tools" menu select "Ekos"
5. "Start" Ekos from the "Ekos Profile - KStars" GUI
In my case, I have it set in my equipmemt profile to "auto connect" all devices

6. Click "Connect" to connect all devices defined in the equipment profile
7. Once the "INDI Control Panel - Kstars" screen opens then navigate to the MyFocuserPro2 page

Note the values shown in "Absolute Position" and "Max Position" fields
e.g. In my case see the first screen capture below

Note the empty fields for Absolute Position and Max Position

8. Close the "INDI Control Panel - Kstars" screen
9. Click "Disconnect" to disconnect all devices
10. Stop Ekos
11. Close Kstars


Follow steps 3 through 7 again
Now note that this time once you get to step 7, the Absolute Position and Max Position fields are now populated as expected
e.g. In my case see the second screen capture below

12. Close all screens and disconnect devices
13. Stop the indi server via the Stellarmate web manager
stellarmate.local:8624


Repeat the steps 1 through 7 to reproduce the issue again

If you don't use Stellarmate, substitute steps 1,2 and 13 for the equivalent steps for your set-up

Abs and Max fields not populated




Abs and Max fields populated


Last edit: 4 years 5 months ago by Acapulco Rolf.
4 years 5 months ago #44869
Attachments:
The topic has been locked.
  • Posts: 77
  • Thank you received: 14
I think we may have a misunderstanding here. Your first picture clearly shows the abs and max fields are filled in. The zeros are in the set fields, what ever value you choose to put in those fields and then click set will either move the focuser to the new position, or update the max field.
4 years 5 months ago #44884
The topic has been locked.
  • Posts: 52
  • Thank you received: 15
Thanks Alan

What causes the behaviour with the fields "to the right" getting populated/non-populated given the steps followed ?
NB: Nothing was manually changed when walking through those steps yet the fields "to the right" got set to zero and then subsequently got populated without any intervention
Last edit: 4 years 5 months ago by Acapulco Rolf.
4 years 5 months ago #44889
The topic has been locked.
  • Posts: 77
  • Thank you received: 14
All I can say is that it is not driven from the driver. At the end of the day is it a bug or an annoyance, either way it is unexpected behaviour. Maybe ask the question in a separate thread, is there a gui forum?
Last edit: 4 years 5 months ago by Alan Townshend.
4 years 5 months ago #44890
The topic has been locked.
  • Posts: 29
  • Thank you received: 6
Hi,

It seems to me this behaviour is frequent in other drivers and cannot be regarded as a bug nor an annoyance. In my opinion, there is no clear interest having this box filled out, as the value is already set in the left one at the connection.

Great thanks to the developer(s). I hope this driver will be included soon in the stable indi library.

BR, Pierre-Yves
4 years 5 months ago #44894
The topic has been locked.
  • Posts: 52
  • Thank you received: 15
Hi Pierre-Yves

I wasn't aware that this behaviour was frequent in other drivers too. Good to know

I've logged it as an issue on the INDI github page

Thanks to Alan for the driver and also thanks to Rob :)
Last edit: 4 years 5 months ago by Acapulco Rolf.
4 years 5 months ago #44899
The topic has been locked.
Ok, here is what causes this behavior. If all drivers, you have updateProperties() function. In this function, we define or delete properties based on whether we are connecting or disconnecting.

If the properties are initialized _before_ we define them, then both the right and left fields in KStars would be equal. I just took a look at the driver code, and made changes so that values are read before we define them. I pushed the changes to master, please compile and retest.
The following user(s) said Thank You: Acapulco Rolf
4 years 5 months ago #44904
The topic has been locked.
  • Posts: 52
  • Thank you received: 15
Thanks Jasem
I've compiled the latest build with the v 0,5 MyFP2 changes and all appears to be well

I'm no longer able to reproduce the issue

Nice one

Thanks Alan, Rob and Jasem
4 years 5 months ago #44916
The topic has been locked.
  • Posts: 77
  • Thank you received: 14
I have just committed change for serial connection poll period to be specified from 1 - 30s.

Regards, the commit that fills in the max and abs "set" points to be the same as the actual values just seems wrong to me. I think the change should have been to make sure these fields always be zeroed on connection.

Also things like reverse direction, max step, temp comp. should also be on the options page, as they are options and probably only need setting once, but this would require overrides and so perhaps should be applied in the base class? The abort button should also be more accessible and obvious, possibly next option after Direction, or better still when the Abs or Relative Set buttons are pressed, they toggle to Abort buttons?

The next thing in my sights is "Home Position" and "Backlash", both of which I need to understand a bit more before implementing.

I saw that the auto focus control in Ekos has a backlash tick box and value, but they are greyed out. I do not know why I cannot access them, but if I could it negates having to do it in the focuser driver?

I am nervous about implementing "Home Position" as I do not understand the logic behind it yet. Is it a button that triggers the focuser to move toward zero until the switch input is seen? If so is there any protection against just endlessly driving the focuser in, perhaps because the switch has fallen off, or does it get to maybe -10 and then stop, as a safety measure? Or is it just an option , that if selected causes the focuser to do the same as already described but on startup?

If Robert does not respond in this thread I will ask in his forums.
4 years 5 months ago #44954
The topic has been locked.
  • Posts: 35
  • Thank you received: 3
Hi Alan
In myFocuserPro2, home position is a method of going to position 0.
If no hardware switch is fitted, the focuser will stop when the focuser position is 0.

If a hardware switch is implemented, then myfocuserpro2 firmware will manage and find the 0 position based on the switch value. And yes there are limits and methods in firmware to prevent endlessly winding the motor to oblivion. But INDI shouldnt really know about this, its in firmware and that is where it is managed.

Thus is any case the end result of HOME POSITION is ending up at position 0.

This does not need to be managed by INDI, in fact it would not be a good thing in my opinion. INDI should not be concerned with exactly how that is done.

In terms of backlash, there are two ways to look at this.
1. Let the client application handle it [disable backlash in the firmware]
2. Let the firmware handle it [enable backlash in the firmware]. In this case the application should not handle backlash else you have two competing methods fighting against it.

If backlash is enabled in firmware, it really does not need to be changed/altered that much over time. It is not like tommorrow one wakes up and backlash has suddenly halved or doubled. Once set it is remembered by the controller in EEPROM, thus retored when the controller boots.

So if one used windows or even a serial terminal to configure the backlash in firmware it will be remmebered and thus INI would not be required to remember it. It depends if you want to place that capability in the INDI driver or leave it to a client app to manage.

regards
Robert
4 years 5 months ago #44969
The topic has been locked.
  • Posts: 77
  • Thank you received: 14
Thanks for the reply Robert. It was not my intention to code anything clever, keep things simple, all I want to do is send a command to either Enable/Disable home or one shot command to say go to home position. I will have a look at the code and see what I need to do.

I think I will tackle backlash next, and add two fields in options tab, Backlash In, Backlash Out (0-512 range). A value of zero will be treated as disable, and I will send a disable command for the given input, otherwise I will send an enable and the value for the given input.

A useful feature that maybe you could add is a single return value of a bit mask to show what features have been enabled on the focuser,

i.e
Display = 1
Temp Sensor = 2
Backlash = 4
so a value of 5 would mean has Display and Backlash but no temp sensor.

I could then potentially use this value to show or hide the associated controls. What do you think?
4 years 5 months ago #44985
The topic has been locked.
Time to create page: 1.154 seconds