feat(led): showErr(code) + WS fail>=3 shows ERRa or AP on VFD

Made-with: Cursor
This commit is contained in:
stswangzhiping
2026-03-19 22:44:56 +08:00
parent e36bec8660
commit 53b9804c72
2 changed files with 25 additions and 1 deletions

View File

@@ -108,6 +108,18 @@ class Display {
log.info('display', '显示屏 → AP');
}
/**
* 网络错误 → 显示错误码ERR + 单字母代码)
* code='a' → ERRa网络正常但 VPS 不可达)
* code='b' → ERRb预留
*/
showErr(code = 'a') {
this._stopBlink();
const s = ('ERR' + code).slice(0, 4);
this._write('#m3' + s);
log.info('display', `显示屏 → ${s}`);
}
/** 网络已连接 → 显示时间 */
showTime() {
this._stopBlink();