AstroHuntsman / huntsman-pocs

POCS on the Huntsman Telescope
MIT License
7 stars 8 forks source link

Focus position offset bug #524

Closed danjampro closed 2 years ago

danjampro commented 2 years ago

Looks like there is a bug in the focus position offset, as the initial position for focusing in luminance is meant to be 22000:

D 08-09 11:32:27.306 (11:32:27 UTC) | panoptes.pocs.focuser.focuser autofocus:247                      | Starting autofocus
I 08-09 11:32:27.312 (11:32:27 UTC) | panoptes.pocs.focuser.focuser autofocus:323                      | Moving filterwheel to luminance for autofocusing on Astromechanics Focuser (XXXXXX) on /dev/ttyUSB0.
D 08-09 11:32:27.326 (11:32:27 UTC) | panoptes.pocs.filterwheel.filterwheel _apply_filter_focus_offset:352 | Applying focus position offset of -34 moving from filter r_band to luminance.
D 08-09 11:32:39.846 (11:32:39 UTC) | huntsman.pocs.focuser.astromechanics _move_to_device_position:80     | Moved to encoder position 21966 (-10801) in 1 step(s)

I suspect this can be caused by connecting to a camera not already in the luminance filter, as the initial offset stored in the camera instance will be 0

danjampro commented 2 years ago

The problem is that the initial position does not care about which filter is in position when the camera is created. So either the initial position has to have an associated filter, or we need to specify an initial filter.