ASCOMInitiative / ASCOMDeviceHub

ASCOM Device Hub
4 stars 4 forks source link

Device Hub - User Interface #14

Closed chasmiller46 closed 1 year ago

chasmiller46 commented 1 year ago

I recently added Device Hub support for slaving a scope/dome to my imaging application. When the Device Hub GUI is presented, you must check the option "Slaved To Telescope" in order to enable that feature. However, this check mark is not remembered by the Device Hub GUI and the user must remember to enter it every time. I would like to request an option be added so that the user's preference can be remembered. Some ideas:

  1. Dome Setup already has two slaving options, add the Slaved To Telescope option as the default to be automatically selected on start-up.
  2. Since the main purpose of Device Hub is to slave the dome to the scope, make Enabled as the start-up default.
  3. Make Device Hub respond to "myDome.Slaved = true;" to enable the option programmatically.

Thanks for considering. Charlie Miller

astroman133 commented 1 year ago

Charlie,

It is by design that the dome is not slaved to the scope until the user or application selects it to be slaved. This can be done by either checking the checkbox in the DH U/I or by setting the DeviceHubDome.Slaved = true by the application.

Setting the Slaved property to true from a client application will only work if some prerequisite conditions are met:

  1. the dome is connected
  2. the DeviceHubDome.CanSetAzimuth property is set to true
  3. the telescope is connected
  4. the telescope must have provided its Altitude and Azimuth to DH

If a client application attempts to set Dome.Slaved to true and it fails, an error should be raised back to the application.

I would discourage trying to set the initial Slaved state to true "at startup". From a user perspective this would provide inconsistent behavior since slaving is not possible if no telescope is connected or if the telescope's position has not yet been read. This would mean that DH Dome would Slaved to the Telescope in some cases but not others. In addition, some control application could do that automatically.

It would be possible to persist a setting to automatically slave the dome to the scope as soon as the prerequisites are met and in a perfect world this could work, but in an imperfect world with weak or buggy drivers it may cause problems. It may be a shock to the user if the dome unexpectedly started slewing in altitude and azimuth. This may be an problem if the dome were to collide with the scope, because the scope is still at a Park position where the shutter motor could run into the scope. It is much better to force the user to say "slave it now". Then if there is a collision it is a user error, not an application error.

I hope this makes sense.

Let me know how you feel. If I don't hear I will close this issue.

Thanks!

astroman133 commented 1 year ago

No response from requestor. Closing.