1
0
Fork 0
This commit is contained in:
YujinChu 2023-09-11 05:57:25 +00:00
parent 5d42b474b6
commit 17349db5f3
2 changed files with 6 additions and 5 deletions

View File

@ -168,7 +168,7 @@ def cwt_thread(evt, chip_index, port_a_ai_id , port_a_do_id, port_b_ai_id , port
ai_array = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
random_index = random.randint(0, len(ai_array) -1)
ai_array = [random.randint(1,50000) for _ in range(16)]
ai_array = [random.randint(1,50000) for _ in range(32)]
prev_a_ai = ai_array
prev_b_ai = ai_array
@ -194,7 +194,7 @@ def cwt_thread(evt, chip_index, port_a_ai_id , port_a_do_id, port_b_ai_id , port
'''
timenow = int(time.time()*1000)
isSuccess = True
# PORT A
port_a_do_value = list(b[:16])
try:

View File

@ -167,8 +167,8 @@ def cwt_thread(evt, chip_index, port_a_ai_id , port_a_do_id, port_b_ai_id , port
#prev_b_ai = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
ai_array = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
random_index = random.randint(0, len(my_array) -1)
ai_array = [random.randint(1,50000) for _ in range(16)]
random_index = random.randint(0, len(ai_array) -1)
ai_array = [random.randint(1,50000) for _ in range(32)]
prev_a_ai = ai_array
prev_b_ai = ai_array
@ -194,7 +194,8 @@ def cwt_thread(evt, chip_index, port_a_ai_id , port_a_do_id, port_b_ai_id , port
'''
timenow = int(time.time()*1000)
isSuccess = True
print(f"[test]: ", ai_array)
# PORT A
port_a_do_value = list(b[:16])
try: