v0.1.7.3(2024/07/01)

1. [APIs: openapi.py] 继续完善封包解包操作,并优化了所有调试信息,默认打开状态,直到bug数量明显减少
2. [APIs: do_current.py] 使用原工程的工程名进行move操作,语义更加明确

> 目前看openapi.py封包解包没有任何问题了,但是所有的调试信息都默认打开,以便可以第一时间保留现场
This commit is contained in:
2024-07-01 14:09:47 +08:00
parent fc3d5482f8
commit ad4b6ae8d6
3 changed files with 173 additions and 159 deletions

View File

@ -71,13 +71,14 @@ def prj_to_xcore(prj_file):
print(stdout.read().decode()) # 必须得输出一下stdout才能正确执行sudo
print(stderr.read().decode()) # 顺便也执行以下stderr
cmd = 'cd /home/luoshi/bin/controller/; sudo mv projects/target/_build/*.prj projects/target/_build/target.prj '
_prj_name = prj_file.split('\\')[-1].removesuffix('.zip')
cmd = f'cd /home/luoshi/bin/controller/; '
cmd += f'sudo mv projects/target/_build/{_prj_name}.prj projects/target/_build/target.prj '
stdin, stdout, stderr = ssh.exec_command(cmd, get_pty=True)
stdin.write('luoshi2019' + '\n')
stdin.flush()
print(stdout.read().decode()) # 必须得输出一下stdout才能正确执行sudo
print(stderr.read().decode()) # 顺便也执行以下stderr
ssh.close()
@ -154,6 +155,7 @@ def run_rl(hr, w2t):
_response = execution('diagnosis.open', hr, w2t, open=False, display_open=False)
print(f"关闭诊断: {_response}")
_response = execution('rl_task.stop', hr, w2t, tasks=['brake'])
_response = execution('state.switch_motor_off', hr, w2t)
_response = execution('state.switch_manual', hr, w2t)