Commit 77dcfe7
committed
fix(battery): pick first battery when multiple detected instead of silently failing
The showBatteryPicker, showManualBatteryInput, and batteryChoices
properties were set but never consumed by any view: discoveredBatId was never assigned,
sensors never armed, and battery data never appeared.
- Auto-select first detected battery when ids.length > 1
- Add console.warn diagnostics for multi-battery and exhausted fallback paths
- Remove dead properties: showBatteryPicker, showManualBatteryInput, batteryChoices1 parent bf2bb85 commit 77dcfe7
1 file changed
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 46 | | |
50 | 47 | | |
51 | 48 | | |
| |||
140 | 137 | | |
141 | 138 | | |
142 | 139 | | |
143 | | - | |
144 | | - | |
| 140 | + | |
| 141 | + | |
145 | 142 | | |
146 | 143 | | |
147 | 144 | | |
| |||
159 | 156 | | |
160 | 157 | | |
161 | 158 | | |
162 | | - | |
| 159 | + | |
163 | 160 | | |
164 | 161 | | |
165 | 162 | | |
| |||
0 commit comments