24 lines
807 B
Python
24 lines
807 B
Python
"""
|
|
Helper script — uruchom raz aby sprawdzic aktualne wartosci VCP wejscia monitorow.
|
|
Wyniki wpisz do config/config.json -> profiles -> monitor_inputs -> vcp_value
|
|
"""
|
|
from monitorcontrol import get_monitors
|
|
|
|
VCP_INPUT_SOURCE = 0x60
|
|
|
|
print("Skanowanie monitorow (VCP code 0x60 - Input Source)...")
|
|
for i, handle in enumerate(get_monitors()):
|
|
with handle as monitor:
|
|
try:
|
|
current = monitor.vcp.get_vcp_feature(VCP_INPUT_SOURCE)
|
|
val = current[0]
|
|
print(f" Monitor {i}: VCP input = {val} (0x{val:02X})")
|
|
except Exception as e:
|
|
print(f" Monitor {i}: blad odczytu - {e}")
|
|
print()
|
|
print("Typowe wartosci:")
|
|
print(" 0x0F (15) = DisplayPort-1")
|
|
print(" 0x10 (16) = DisplayPort-2")
|
|
print(" 0x11 (17) = HDMI-1")
|
|
print(" 0x12 (18) = HDMI-2")
|