|
48 | 48 | _OV5640_CMD_TRIGGER_AUTOFOCUS = const(0x03)
|
49 | 49 | _OV5640_CMD_AUTO_AUTOFOCUS = const(0x04)
|
50 | 50 | _OV5640_CMD_RELEASE_FOCUS = const(0x08)
|
51 |
| -_OV5640_CMD_AF_SET_VCM_STEP = const(0x1a) |
52 |
| -_OV5640_CMD_AF_GET_VCM_STEP = const(0x1b) |
| 51 | +_OV5640_CMD_AF_SET_VCM_STEP = const(0x1A) |
| 52 | +_OV5640_CMD_AF_GET_VCM_STEP = const(0x1B) |
53 | 53 |
|
54 | 54 | _OV5640_CMD_MAIN = const(0x3022)
|
55 | 55 | _OV5640_CMD_ACK = const(0x3023)
|
@@ -498,14 +498,16 @@ def autofocus(self) -> list[int]:
|
498 | 498 | @property
|
499 | 499 | def autofocus_vcm_step(self):
|
500 | 500 | """Get the voice coil motor step location"""
|
501 |
| - if not self._send_autofocus_command(_OV5640_CMD_AF_GET_VCM_STEP, "get vcm step"): |
| 501 | + if not self._send_autofocus_command( |
| 502 | + _OV5640_CMD_AF_GET_VCM_STEP, "get vcm step" |
| 503 | + ): |
502 | 504 | return None
|
503 | 505 | return self.read_camera_register(_OV5640_CMD_PARA4)
|
504 | 506 |
|
505 | 507 | @autofocus_vcm_step.setter
|
506 | 508 | def autofocus_vcm_step(self, step):
|
507 | 509 | """Get the voice coil motor step location, from 0 to 255"""
|
508 |
| - if not (0 <= step <= 255): |
| 510 | + if not 0 <= step <= 255: |
509 | 511 | raise RuntimeError("VCM step must be 0 to 255")
|
510 | 512 | self.write_camera_register(_OV5640_CMD_PARA3, 0x00)
|
511 | 513 | self.write_camera_register(_OV5640_CMD_PARA4, step)
|
|
0 commit comments