fix: 还原 inactive 路径 restartGateway + showTime keepalive
1. 还原 7737e08:removeProviderByName 重新调用 restartGateway(), inactive/active 状态变化均重启 gateway 使 openclaw.json 生效 2. led.js showTime() 加 30s keepalive 定时器:持续向 vfdservice 管道写入,防止长时间无写入后管道"冷却",导致随后 showPin() 调用 openSync(FIFO, 'w') 因无读端而阻塞、blink timer 无法触发 Made-with: Cursor
This commit is contained in:
@@ -254,9 +254,15 @@ class Display {
|
|||||||
|
|
||||||
showTime() {
|
showTime() {
|
||||||
this._stopBlink();
|
this._stopBlink();
|
||||||
log.debug('display', '[vfd] #s1');
|
|
||||||
writeVfdPipeClock();
|
writeVfdPipeClock();
|
||||||
log.info('display', '显示屏 → 时间');
|
log.info('display', '显示屏 → 时间');
|
||||||
|
// 每 30s 刷新一次,保持 vfdservice 持续从管道读取,
|
||||||
|
// 防止长时间无写入后管道"冷却",导致后续 showPin 写入阻塞
|
||||||
|
const refresh = () => {
|
||||||
|
writeVfdPipeClock();
|
||||||
|
this._blinkTimer = setTimeout(refresh, 30_000);
|
||||||
|
};
|
||||||
|
this._blinkTimer = setTimeout(refresh, 30_000);
|
||||||
}
|
}
|
||||||
|
|
||||||
showPin(pin) {
|
showPin(pin) {
|
||||||
|
|||||||
@@ -161,9 +161,7 @@ function removeProviderByName(providerId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.info('openclaw-provider', `provider 已移除: ${providerId}`);
|
log.info('openclaw-provider', `provider 已移除: ${providerId}`);
|
||||||
// 注意:此处不重启 gateway。inactive 期间 frp 隧道已断开,无人访问 gateway;
|
restartGateway();
|
||||||
// 下次 active 时 applyFullProviderFromVps 会写完整 config 并重启。
|
|
||||||
// 若在此处 kill gateway,会破坏 vfdservice 管道,导致 PIN 码无法在数码管上闪烁。
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeProviderFromConfig(config, providerId) {
|
function removeProviderFromConfig(config, providerId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user