根据新版本调整set_pattern:0~65535
This commit is contained in:
@@ -13,15 +13,15 @@ lUniTAP = UniTAP.TsiLib()
|
||||
#
|
||||
# For opening device, please, put serial number of the device as 8 symbol str or put index of device.
|
||||
#
|
||||
dev = lUniTAP.open("NNNNNNNN")
|
||||
dev = lUniTAP.open(0)
|
||||
|
||||
# After opening device as in UCD Console device role should be selected.
|
||||
role = dev.select_role(UniTAP.dev.UCD422.HDMISourceHDMISink)
|
||||
# role = dev.select_role(UniTAP.dev.UCD323.HDMISource)
|
||||
role.hdtx.sdpg.add_packet(bytearray([0x81, 0x01, 0x1B, 0x16, 0x8B, 0x84, 0x90, 0x40, 0x00, 0x00, 0x06, 0x64, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00]))
|
||||
role.hdtx.sdpg.load_packet("PATH_TO_PACKET_FILE")
|
||||
# role = dev.select_role(UniTAP.dev.UCD422.HDMISourceHDMISink)
|
||||
role = dev.select_role(UniTAP.dev.UCD323.HDMISource)
|
||||
# role.hdtx.sdpg.add_packet(bytearray([0x81, 0x01, 0x1B, 0x16, 0x8B, 0x84, 0x90, 0x40, 0x00, 0x00, 0x06, 0x64, 0x00, 0x00, 0x00, 0x00,
|
||||
# 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
# 0x00, 0x00, 0x00, 0x00]))
|
||||
role.hdtx.sdpg.load_packet("UniTAP/dev/modules/dut_tests/cfg/hdr10/vsif1.bin")
|
||||
|
||||
role.hdtx.sdpg.stop()
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ lUniTAP = UniTAP.TsiLib()
|
||||
#
|
||||
# For opening device, please, put serial number of the device as 8 symbol str or put index of device.
|
||||
#
|
||||
# dev = lUniTAP.open(0) # Open first device
|
||||
dev = lUniTAP.open("NNNNNNNN") # Put your device serial number here
|
||||
dev = lUniTAP.open(0) # Open first device
|
||||
# dev = lUniTAP.open("NNNNNNNN") # Put your device serial number here
|
||||
|
||||
# After opening device as in UCD Console device role should be selected.
|
||||
role = dev.select_role(UniTAP.dev.UCD323.HDMISource)
|
||||
@@ -26,10 +26,12 @@ role.hdtx.pg.set_pattern(pattern=UniTAP.VideoPattern.SolidColor)
|
||||
role.hdtx.pg.set_vm(vm=video_mode)
|
||||
role.hdtx.pg.apply()
|
||||
|
||||
for i in range(1024):
|
||||
print(f"Set color: {hex(i)} {hex(i)} {hex(i)}")
|
||||
role.hdtx.pg.set_pattern_params(pattern_params=UniTAP.SolidColorParams(i, i, i))
|
||||
time.sleep(0.01)
|
||||
# for i in range(1024):
|
||||
# print(f"Set color: {hex(i)} {hex(i)} {hex(i)}")
|
||||
# role.hdtx.pg.set_pattern_params(pattern_params=UniTAP.SolidColorParams(i, i, i))
|
||||
# time.sleep(0.01)
|
||||
print(f"Set color: {hex(0)} {hex(65535)} {hex(65535)}")
|
||||
role.hdtx.pg.set_pattern_params(pattern_params=UniTAP.SolidColorParams(0, 65535, 65535))
|
||||
|
||||
#
|
||||
# Since the 3.5 version, TsiLib and TSIDevice objects have the option to be closed earlier.
|
||||
|
||||
Reference in New Issue
Block a user