Skip to content

Conversation

@mrosseel
Copy link
Collaborator

@mrosseel mrosseel commented Oct 24, 2025

TODO:

  • test with real camera
  • test under the stars

detected during plate solving, targeting an optimal count for
reliable solving performance.
Attributes:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double description, see init below

self._integral = 0.0
self._last_error: Optional[float] = None

logger.info(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relatively high log level, isn‘t it? I believe these need to be tuned down once the feature becomes stable.

self.exposure_time = int(exp_value)
self.set_camera_config(self.exposure_time, self.gain)
# Update config to reflect manual exposure value
cfg.set_option("camera_exp", self.exposure_time)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to store the PID parameters in config, here?

# Manual exposure adjustments disable auto-exposure
self._auto_exposure_enabled = False
if command == "exp_up":
self.exposure_time = int(self.exposure_time * 1.25)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sets strange ‚in between‘ exposure times, if I am not mistaken and not those from the selection list in menu_structure, if auto exposure has been on before. Should the code go to nearest setting here? It also seems that the cam driver selects an exposure that is supported by the camera. What about gain?

@jscheidtmann
Copy link
Collaborator

Love this upcoming feature!

@mrosseel mrosseel changed the title [WIP] Camera auto exposure Camera auto exposure Nov 11, 2025
@brickbots
Copy link
Owner

This is one of the more exciting features we've had added in a while! Thanks @mrosseel for the work on this. I'm excited to get this tested a bit more and released 🙌

@brickbots brickbots merged commit 2770f2b into brickbots:main Nov 11, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants