r-almendarez / dpam-vif-generator

DPAM VIF Generator generates a USBIF/DPAM VIF file based on user inputs for use with test equipment correlation, proper test coverage for certification, and at VESA Plugtest events.
MIT License
6 stars 2 forks source link

DP_Capability field is 1 less than the value in the VIF spec #7

Closed TimWei888 closed 4 months ago

TimWei888 commented 5 months ago

DP Sink Capable should be 1 DP Source Capable should be 2 Both DP Source & Sink Capable should be 3

bleungatchromium commented 5 months ago

So this is because DP_Capability is a pulldown menu, right, and this by default 0 indexes enums? I think @r-almendarez mentioned that we could come up with a custom handler in the mainwindow.py for this UI element which does a +1 to the index.

Another way of solving this would be to convert this dropdown menu to a "groupbox" since the enum and definition happens to be structured that way logically (ie, a device setting 3 is a combination of 1 and 2), and Robert's apply_groupbox_setting already handles bitfield style (for example DP_Src_Pin_Assignments).

Which way would you prefer, Tim?

TimWei888 commented 5 months ago

Yes. It's because the pulldown menu is 0 indexed. I prefer the groupbox way, since it doesn't need special handling of a standard GUI item. Thank you.

So this is because DP_Capability is a pulldown menu, right, and this by default 0 indexes enums? I think @r-almendarez mentioned that we could come up with a custom handler in the mainwindow.py for this UI element which does a +1 to the index.

Another way of solving this would be to convert this dropdown menu to a "groupbox" since the enum and definition happens to be structured that way logically (ie, a device setting 3 is a combination of 1 and 2), and Robert's apply_groupbox_setting already handles bitfield style (for example DP_Src_Pin_Assignments).

Which way would you prefer, Tim?

bleungatchromium commented 5 months ago

I'll make the change and post it as a PR for review. Thanks, Tim.