Commit 47fe7ce
fix: move WiFi handling after BLE command queue processing (#30)
In v1.6, handleWiFiServer() and the WiFi reconnection check were moved
to the top of loop(), before BLE command/response queue processing.
This can cause BLE commands to sit unprocessed in the queue when
handleWiFiServer() blocks or takes a slow path, resulting in BLE
timeouts for clients (Home Assistant integration, py-opendisplay).
Observed symptoms:
- BLE READ CONFIG commands queued but never processed
- 'ESP32: Command queued for processing' appears in serial log but
'ESP32: Processing queued command' never follows
- Home Assistant integration fails with 'ble_timeout' during device
interrogation
- py-opendisplay image uploads timeout after 10s
This commit moves WiFi handling back to after the BLE command queue
drain and response notification loop, restoring the v1.3 execution
order where BLE is always serviced first. WiFi functionality is
preserved — only the ordering within the loop iteration changes.
Co-authored-by: Oz <oz-agent@warp.dev>1 parent 48d9255 commit 47fe7ce
1 file changed
Lines changed: 18 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | 116 | | |
133 | 117 | | |
134 | 118 | | |
| |||
188 | 172 | | |
189 | 173 | | |
190 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
| |||
0 commit comments