Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): Change the camera device to /dev/camera2 #14790

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Welcome to the v7.2.2 release of the Opentrons robot software!
### Bug Fixes

- Restores the ability to use the speaker and camera on OT-2.
- Restores the ability to use the camera on Flex.

---

Expand Down
3 changes: 2 additions & 1 deletion api/src/opentrons/system/camera.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import asyncio
import os
from pathlib import Path

from opentrons.config import ARCHITECTURE, SystemArchitecture
from opentrons_shared_data.errors.exceptions import CommunicationError
from opentrons_shared_data.errors.codes import ErrorCodes
Expand Down Expand Up @@ -29,7 +30,7 @@ async def take_picture(filename: Path) -> None:
pass

if ARCHITECTURE == SystemArchitecture.YOCTO:
cmd = f"v4l2-ctl --device /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=MJPG --stream-mmap --stream-to={str(filename)} --stream-count=1"
cmd = f"v4l2-ctl --device /dev/video2 --set-fmt-video=width=1280,height=720,pixelformat=MJPG --stream-mmap --stream-to={str(filename)} --stream-count=1"
elif ARCHITECTURE == SystemArchitecture.BUILDROOT:
cmd = f"ffmpeg -f video4linux2 -s 640x480 -i /dev/video0 -ss 0:0:1 -frames 1 {str(filename)}"
else: # HOST
Expand Down
Loading