Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
Add missing import, versionadded, and a link to the revision attribute
  • Loading branch information
waveform80 committed Nov 4, 2018
1 parent 5117914 commit 71871b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion picamera/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
PiCameraPortDisabled,
mmal_check,
)
from picamera.mmalobj import PiResolution, PiFramerateRange
from picamera.mmalobj import PiResolution, PiFramerateRange, PiSensorMode
from picamera.camera import PiCamera
from picamera.display import PiDisplay
from picamera.frames import PiVideoFrame, PiVideoFrameType
Expand Down
4 changes: 3 additions & 1 deletion picamera/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -2195,14 +2195,16 @@ def _set_framerate(self, value):
def sensor_modes(self):
"""
Returns a mapping describing the available sensor modes for the
camera model.
camera's :attr:`revision`.
This read-only attribute returns a dictionary mapping sensor mode
numbers (1..7) to instances of :class:`PiSensorMode` which contain the
resolution, range of framerates, and other details about the mode.
Note that the default mode (0) is not represented, as this indicates
that the mode should be selected automatically by the firmware based
on the requested :attr:`resolution` and :attr:`framerate`.
.. versionadded:: 1.14
"""
return PiCamera.SENSOR_MODES[self.revision]

Expand Down

0 comments on commit 71871b6

Please sign in to comment.