Commit 14162ab
fix(eucstats-meta): split wheel serial out of the model name
The InMotion P6 adapter was concatenating its serial into the model
name ("InMotion P6 (SN12345)") as a temporary workaround until a
proper P6 parser landed. The KingSong 0xB3 sub-cmd was doing the
same thing — emitting a ModelName whose `name` was the bare serial,
which overwrote the model set by the earlier 0xBB sub-cmd.
Both made the eucstats upload meta non-uniform across riders: V14
uploads as `model = "InMotion V14"`, P6 was uploading as `model =
"InMotion P6 (SN12345)"`, KingSong as `model = "SN98765432"`.
Add a proper DecodeResult.Serial slot, lift the serial out of both
adapters into it, route it through WheelRepository.wheelSerial, and
populate the eucstats meta's existing `serial` JSON field that was
previously hardcoded to null.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 4e99868 commit 14162ab
5 files changed
Lines changed: 32 additions & 9 deletions
File tree
- app/src/main/java/com/eried/eucplanet
- ble
- data/repository
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
428 | 431 | | |
429 | 432 | | |
430 | | - | |
431 | | - | |
432 | | - | |
| 433 | + | |
433 | 434 | | |
434 | 435 | | |
435 | 436 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
194 | 199 | | |
195 | | - | |
| 200 | + | |
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
311 | 316 | | |
312 | 317 | | |
313 | 318 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
251 | 258 | | |
252 | 259 | | |
253 | 260 | | |
| |||
557 | 564 | | |
558 | 565 | | |
559 | 566 | | |
| 567 | + | |
560 | 568 | | |
561 | 569 | | |
562 | 570 | | |
| |||
1302 | 1310 | | |
1303 | 1311 | | |
1304 | 1312 | | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
1305 | 1317 | | |
1306 | 1318 | | |
1307 | 1319 | | |
| |||
0 commit comments