refactor(ops): 重构 TTS 语音播报队列,解耦 ttsFlag 与队列优先级
移除 Thread.sleep(5000) 阻塞,改由 TTS 队列按设备维度控制播报顺序和间隔: - 解耦 ttsFlag(硬件行为 0x09)与 priority(队列位置),全部使用 0x09 发送 - TtsQueueMessage 新增 inOrder/urgent 工厂方法,VoiceBroadcastService 精简为 broadcastInOrder(FIFO rightPush)和 broadcastUrgent(leftPush 插队)两个入口 - 同设备播报间隔 3s → 6s,消息过期时间 30s → 60s - 修复原 leftPush+leftPop LIFO 导致连续入队顺序反转的问题 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -338,7 +338,7 @@ public class CleanOrderEndToEndTest {
|
||||
verify(eventLogRecorder).record(any());
|
||||
|
||||
// 2. TTS sent (orderId can be null for TTS_REQUEST events)
|
||||
verify(voiceBroadcastService).broadcast(eq(5001L), contains("请回到作业区域"), eq((Long) null));
|
||||
verify(voiceBroadcastService).broadcastInOrder(eq(5001L), contains("请回到作业区域"), eq((Long) null));
|
||||
}
|
||||
|
||||
// ==========================================
|
||||
|
||||
Reference in New Issue
Block a user