Open ZalgoSoft opened 2 years ago
and another request
if we have 'fragmented' enum like
scene_mode 0x009a091a (menu) : min=0 max=13 default=0 value=11
0: None
8: Night
11: Sports
code is unable to enum this menu fully and cannot allow to change value
proposed patch: seems works as expected without side effects
--- ./ctrl_widgets.py 2022-06-24 23:36:35.343450892 +0800
+++ /usr/local/lib/python3.8/dist-packages/pyvidctrl/ctrl_widgets.py 2022-06-24 23:41:28.462543056 +0800
@@ -237,6 +237,9 @@
# still be more valid indexes
pass
+ except UnicodeDecodeError:
+ options[i] = querymenu.name
+ pass
self.menu = Menu(options)
self.widgets[2] = self.menu
Can you submit a PR with the proposed changes?
Can you submit a PR with the proposed changes?
unfortunately I'm unknown with python , i tried some changes, with no effect.
I stepped on this, too
https://www.kernel.org/doc/html/v5.0/media/uapi/v4l/vidioc-queryctrl.html#c.v4l2_ctrl_type
V4L2_CTRL_TYPE_U8 V4L2_CTRL_TYPE_U16 V4L2_CTRL_TYPE_U32 V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS V4L2_CTRL_TYPE_MPEG2_QUANTIZATION
please add support at least for _U8 , _U16 , _U32 raspbery pi platform v4l2 has options such this