fix: 自动化开始前清除旧透传记录,重置所有计数和显示
This commit is contained in:
@@ -8,6 +8,7 @@ from app.models import (
|
||||
get_serialnet_stats,
|
||||
get_latest_test_state,
|
||||
get_automation_averages,
|
||||
clear_serialnet_records,
|
||||
)
|
||||
|
||||
bp = Blueprint("test_op", __name__)
|
||||
@@ -54,7 +55,8 @@ def api_automation_start():
|
||||
dnt_id = data.get("dnt_id")
|
||||
count = int(data.get("count", 1))
|
||||
|
||||
# 插入第一条 0xB0 指令
|
||||
# 清除旧记录,然后插入第一条 0xB0
|
||||
clear_serialnet_records(dnt_id)
|
||||
record_id = insert_serialnet(dnt_id, COMMANDS["B0"])
|
||||
return jsonify({
|
||||
"ok": True,
|
||||
|
||||
Reference in New Issue
Block a user