Skip to content

Commit dc09a8c

Browse files
committed
Merge pull request jnohlgard#8 from Mizux/patch-1
Fix some getter
2 parents 27c5008 + c5ea5f7 commit dc09a8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

v4l2capture.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ static PyObject *Video_device_get_exposure_auto(Video_device *self)
483483
struct v4l2_control ctrl;
484484
CLEAR(ctrl);
485485
ctrl.id = V4L2_CID_EXPOSURE_AUTO;
486-
if(my_ioctl(self->fd, VIDIOC_S_CTRL, &ctrl)){
486+
if(my_ioctl(self->fd, VIDIOC_G_CTRL, &ctrl)){
487487
return NULL;
488488
}
489489
return Py_BuildValue("i",ctrl.value);
@@ -520,7 +520,7 @@ static PyObject *Video_device_get_focus_auto(Video_device *self)
520520
struct v4l2_control ctrl;
521521
CLEAR(ctrl);
522522
ctrl.id = V4L2_CID_FOCUS_AUTO;
523-
if(my_ioctl(self->fd, VIDIOC_S_CTRL, &ctrl)){
523+
if(my_ioctl(self->fd, VIDIOC_G_CTRL, &ctrl)){
524524
return NULL;
525525
}
526526
return Py_BuildValue("i",ctrl.value);

0 commit comments

Comments
 (0)