Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Problem with auto-focus #9

Open
markbyrne opened this issue May 11, 2024 · 1 comment
Open

[BUG] Problem with auto-focus #9

markbyrne opened this issue May 11, 2024 · 1 comment

Comments

@markbyrne
Copy link

Summary

Auto-focus is not working. There seems to be a key error for the setting "default"

self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default']
openscan Node-RED[4233]: KeyError: 'default'

Screenshots/Video

Screenshot 2024-05-11 at 17 33 49

Steps to reproduce
On launch, the camera attempts to auto-focus and fails due to key error.

@markbyrne
Copy link
Author

Focuser get_ctrls(self.fd) returns the following:
[{'id': 10092545, 'type': 6, 'name': b'Camera Controls', 'minimum': 0, 'maximum': 0, 'step': 0, 'default_value': 0, 'flags': 68}, {'id': 10094858, 'type': 1, 'name': b'Focus, Absolute',>

Updating the following in Arducam.py seems to hav fixed the error:

try:
    self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default']
except KeyError as e:
    self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default_value']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant