fix: Resume BLE writes on disconnect instead of restarting #12
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "schwifty/fix-disconnect-resume"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Beacon disconnects 4 times during provisioning — it connects, writes some commands, disconnects, then reconnects and starts all 24 commands over from scratch. This wastes time, confuses the beacon firmware with duplicate writes, and burns through retries fast.
Root Cause
The disconnect handler was calling
dxSmartCommandQueue.removeAll()anddxSmartWriteIndex = 0— nuking the saved progress on every reconnect.Fix
dxSmartSendNextCommand()at the saved index.Test Plan
Pull request closed