Skip to content

Libcamera interfaces fix for get_camera#16

Open
rasshe wants to merge 1 commit into
sushantnadkar:masterfrom
rasshe:master
Open

Libcamera interfaces fix for get_camera#16
rasshe wants to merge 1 commit into
sushantnadkar:masterfrom
rasshe:master

Conversation

@rasshe
Copy link
Copy Markdown

@rasshe rasshe commented Nov 5, 2023

-Modified get_camera

Fox for behavior:

from vcgencmd import Vcgencmd

vcgm = Vcgencmd()
output = vcgm.version()
output = vcgm.get_camera()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.11/dist-packages/vcgencmd/vcgencmd.py", line 60, in get_camera
response[j[0].strip()] = j[1].strip()
~^^^
IndexError: list index out of range

Where
vcgencmd get_camera
Returns
supported=1 detected=1, libcamera interfaces=0

After this merge the expected output of the function is:
{'supported': '1', 'detected': '1,', 'libcamera_interfaces': '0'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant