轮询每1秒读一次sysfs,卡片还贴着时会再次读到卡号, 导致回调触发两次→API调两次→音效播放两次。 读到有效卡号后立即stopScan()+return,只触发一次回调。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
轮询每1秒读一次sysfs,卡片还贴着时会再次读到卡号, 导致回调触发两次→API调两次→音效播放两次。 读到有效卡号后立即stopScan()+return,只触发一次回调。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>