Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The latest version of the userland code allows us to manually set the analog and digital gain of the camera. As far as I understand it, these are the last two parameters between where we are currently and full manual control of the camera. I've modified my fork to make
PiCamera.analog_gain
andPiCamera.digital_gain
writeable, because this is much neater than my work-around.I realise this may not be an appropriate pull request because it relies on things that aren't present on most people's systems (the latest userland is not yet in Raspbian), on the other hand it does just fail with a PiCameraMMALError if you set the parameter and that isn't supported. The current version also results in an AttributeError if you try to set the analog gain, so I don't think I've broken anything even for people without the latest userland.
I have tried to make my docstrings consistent and so on, but please do say if I can tidy up my changes.