feat: 添加局域网设备发现功能和链路胶囊优化
- 实现局域网设备发现面板,支持探测ESP32中继板并自动切换端点 - 添加POST /api/lan/probe接口用于设备探测,返回三态判决结果 - 实现快扫和全段扫描两种模式,支持种子地址优先探测 - 添加端点唯一写手机制,防止多处同时修改设备IP - 优化链路胶囊UI显示WiFi/EtherCAT/BLE连接状态和设备名称 - 修复EtherCAT链路OTA刷写期间PDO循环暂停和AL状态处理问题 - 调整PDO周期设置范围为0.125-4ms,支持亚毫秒显示为微秒 - 添加ESP32 WiFi使能开关控件样式和数据来源角标显示
This commit is contained in:
@@ -26,20 +26,13 @@ import time
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.insert(0, HERE)
|
||||
from guard_probe import Blocked, bridge_of, guard_of, open_link, preflight, verdict # noqa: E402
|
||||
from guard_probe import (Blocked, ask, bridge_of, guard_of, open_link, # noqa: E402
|
||||
preflight, verdict)
|
||||
|
||||
NATIVE_LOG = os.path.abspath(os.path.join(HERE, os.pardir, os.pardir, "ecat",
|
||||
"build_native", "native_stdout.log"))
|
||||
|
||||
|
||||
def ask(prompt):
|
||||
if not sys.stdin or not hasattr(sys.stdin, "isatty") or not sys.stdin.isatty():
|
||||
raise Blocked("这一步要人在场,但 stdin 不是终端:%s" % prompt)
|
||||
raw = input(prompt + "(回车继续 / 输入 s 放弃本测试): ").strip().lower()
|
||||
if raw == "s":
|
||||
raise Blocked("用户放弃")
|
||||
|
||||
|
||||
def ck(fails, cond, msg):
|
||||
print((" OK " if cond else " FAIL ") + msg)
|
||||
if not cond:
|
||||
|
||||
Reference in New Issue
Block a user