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

Hawktang #171

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Hawktang #171

wants to merge 3 commits into from

Conversation

hawktang
Copy link

Add usb type c support

@newAM
Copy link
Owner

newAM commented May 19, 2022

Can you point me to the specification that defines this value?

This isn't defined by the existing specifications and is vendor specific as far as I know; this value may not be the same on other Type-C monitors.

@hawktang
Copy link
Author

hawktang commented May 20, 2022 via email

@newAM
Copy link
Owner

newAM commented May 20, 2022

set_input_source will allow an int to be used:

def set_input_source(self, value: Union[int, str, InputSource]):

get_input_source has an example of how to handle out-of-range values:

Handling out-of-spec inputs (observed for USB type-C inputs)::
from monitorcontrol import get_monitors, InputSourceValueError
for monitor in get_monitors():
with monitor:
try:
print(monitor.get_input_source())
except InputSourceValueError as e:
print(e.value)

Does that cover your usecases?

@newAM newAM mentioned this pull request Mar 11, 2023
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.

None yet

2 participants