Skip to content

Commit

Permalink
fix print err
Browse files Browse the repository at this point in the history
  • Loading branch information
wweiye committed May 27, 2024
1 parent 91560fc commit 51f9f1e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ async def _matches_state(_state: TipStateType) -> bool:
print(f"found {tip_state.name} displacement: {current_z} ({passed})")

if not passed:
printsig = f"06-02:状态{tip_state.name}移动值为{current_z})结果为{passed}阈值为{min(criteria)} ~ {max(criteria)}"
printsig = f"06-02:状态{tip_state.name}移动值为{current_z}结果为{passed}阈值为{min(criteria)} ~ {max(criteria)}"
ui.print_fail(printsig)
FINAL_TEST_FAIL_INFOR.append(printsig)
return passed
Expand Down Expand Up @@ -1951,13 +1951,16 @@ async def _main(test_config: TestConfig) -> None: # noqa: C901
await api.move_to(OT3Mount.RIGHT, attach_pos._replace(z=current_pos.z))

setflag = 0
sensor_err = []
if len(FINAL_TEST_FAIL_INFOR) > 0:
for errval in FINAL_TEST_FAIL_INFOR:
if "07-" in FINAL_TEST_FAIL_INFOR:
ui.print_test_results(errval)
sensor_err.append(errval)
setflag = 1
if setflag == 0:
ui.print_results(FINAL_TEST_FAIL_INFOR,False)
elif setflag == 1:
ui.print_results(sensor_err,False)
else:
ui.print_results(FINAL_TEST_FAIL_INFOR,True)
print("done")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,15 @@ async def _main(is_simulating: bool, trials: int, continue_after_stall: bool) ->


if len(PASS_PRINT_LIST) > 0:
ui.print_title("电流测试不通过(CURRENT SPEED TESTING FAIL)")
printlist = list(set(PASS_PRINT_LIST))
for printval in printlist:
print(" - ",printval)
# ui.print_title("电流测试不通过(CURRENT SPEED TESTING FAIL)")
# printlist = list(set(PASS_PRINT_LIST))
# for printval in printlist:
# print(" - ",printval)

ui.print_results(set(PASS_PRINT_LIST),False)
else:
ui.print_title("电流测试通过(CURRENT SPEED TESTING PASS)")
ui.print_test_results("电流测试通过(CURRENT SPEED TESTING PASS)",True)
#ui.print_title("电流测试通过(CURRENT SPEED TESTING PASS)")

if api.is_simulator:
break
Expand Down

0 comments on commit 51f9f1e

Please sign in to comment.