Commit 3cced9a
authored
* refactor: move sign_extend helpers to crate library (Phase 1)
- Create src/parser/helpers.rs with 7 sign_extend functions
- Export helpers from parser/mod.rs
- Remove bbl_format from lib.rs (will be CLI-only module)
- Update stream.rs to use shared helpers
- Update bbl_format.rs to use shared helpers
- All tests pass, CSV output identical to master
* refactor: unify parse_frame_data and BBLDataStream (Phase 2+3)
- Add debug parameter to crate's parse_frame_data
- Add apply_predictor_with_debug with field_names, skipped_frames support
- Add vbatLatest corruption prevention logic to crate
- Add read_tag8_8svb_counted method with proper group counting
- Fix ENCODING_TAG8_8SVB handling to count consecutive fields
- Update main.rs to import from bbl_parser crate:
* BBLDataStream, parse_frame_data, FrameDefinition
* sign_extend_14bit, encoding constants
- Remove duplicate FieldDefinition/FrameDefinition from main.rs
- Delete bbl_format.rs entirely (509 lines removed)
- All CSV outputs verified identical to master branch
* fix: simplify PREDICT_MINMOTOR logic (remove dead code)
Remove nonsensical string parsing of i32 values in PREDICT_MINMOTOR.
Since sysconfig is HashMap<String, i32>, the values are already integers
and don't need comma-separated string parsing.
Addresses CodeRabbit review feedback.
* refactor: address CodeRabbit nitpick feedback
- Extract magic number 1000 to MAX_REASONABLE_VBAT_RAW constant
- Add debug logging for PREDICT_MOTOR_0 hardcoded fallback
- Remove redundant function-scoped import (decoder::* glob already includes it)
All tests pass, no clippy warnings.
* refactor: reorganize MAX_REASONABLE_VBAT_RAW constant placement
Move MAX_REASONABLE_VBAT_RAW constant to after predictor constants
for better organization. Groups domain-specific constants together
and improves code clarity by placing the constant near related
corruption detection logic.
1 parent e20e467 commit 3cced9a
9 files changed
Lines changed: 409 additions & 879 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | | - | |
29 | | - | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
18 | 26 | | |
19 | 27 | | |
20 | 28 | | |
| |||
224 | 232 | | |
225 | 233 | | |
226 | 234 | | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 235 | + | |
293 | 236 | | |
294 | 237 | | |
295 | 238 | | |
| |||
1763 | 1706 | | |
1764 | 1707 | | |
1765 | 1708 | | |
1766 | | - | |
| 1709 | + | |
1767 | 1710 | | |
1768 | 1711 | | |
1769 | 1712 | | |
| |||
1804 | 1747 | | |
1805 | 1748 | | |
1806 | 1749 | | |
1807 | | - | |
| 1750 | + | |
1808 | 1751 | | |
1809 | 1752 | | |
1810 | 1753 | | |
| |||
1886 | 1829 | | |
1887 | 1830 | | |
1888 | 1831 | | |
1889 | | - | |
| 1832 | + | |
1890 | 1833 | | |
1891 | 1834 | | |
1892 | 1835 | | |
| |||
2080 | 2023 | | |
2081 | 2024 | | |
2082 | 2025 | | |
2083 | | - | |
| 2026 | + | |
2084 | 2027 | | |
2085 | 2028 | | |
2086 | 2029 | | |
| |||
2354 | 2297 | | |
2355 | 2298 | | |
2356 | 2299 | | |
2357 | | - | |
| 2300 | + | |
2358 | 2301 | | |
2359 | 2302 | | |
2360 | 2303 | | |
| |||
2363 | 2306 | | |
2364 | 2307 | | |
2365 | 2308 | | |
2366 | | - | |
2367 | | - | |
2368 | | - | |
2369 | | - | |
2370 | | - | |
2371 | | - | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
2372 | 2313 | | |
2373 | 2314 | | |
2374 | 2315 | | |
| |||
2387 | 2328 | | |
2388 | 2329 | | |
2389 | 2330 | | |
2390 | | - | |
| 2331 | + | |
2391 | 2332 | | |
2392 | 2333 | | |
2393 | 2334 | | |
| |||
2398 | 2339 | | |
2399 | 2340 | | |
2400 | 2341 | | |
2401 | | - | |
| 2342 | + | |
2402 | 2343 | | |
2403 | 2344 | | |
2404 | 2345 | | |
2405 | 2346 | | |
2406 | | - | |
| 2347 | + | |
2407 | 2348 | | |
2408 | 2349 | | |
2409 | 2350 | | |
2410 | 2351 | | |
2411 | | - | |
2412 | | - | |
| 2352 | + | |
| 2353 | + | |
2413 | 2354 | | |
2414 | 2355 | | |
2415 | 2356 | | |
2416 | | - | |
| 2357 | + | |
2417 | 2358 | | |
2418 | 2359 | | |
2419 | 2360 | | |
| |||
2427 | 2368 | | |
2428 | 2369 | | |
2429 | 2370 | | |
2430 | | - | |
| 2371 | + | |
2431 | 2372 | | |
2432 | 2373 | | |
2433 | 2374 | | |
| |||
2450 | 2391 | | |
2451 | 2392 | | |
2452 | 2393 | | |
2453 | | - | |
| 2394 | + | |
2454 | 2395 | | |
2455 | 2396 | | |
2456 | 2397 | | |
| |||
2467 | 2408 | | |
2468 | 2409 | | |
2469 | 2410 | | |
2470 | | - | |
2471 | | - | |
2472 | | - | |
2473 | | - | |
2474 | | - | |
2475 | | - | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
2476 | 2415 | | |
2477 | 2416 | | |
2478 | 2417 | | |
| |||
2494 | 2433 | | |
2495 | 2434 | | |
2496 | 2435 | | |
2497 | | - | |
| 2436 | + | |
2498 | 2437 | | |
2499 | 2438 | | |
2500 | 2439 | | |
| |||
2660 | 2599 | | |
2661 | 2600 | | |
2662 | 2601 | | |
2663 | | - | |
| 2602 | + | |
2664 | 2603 | | |
2665 | 2604 | | |
2666 | 2605 | | |
| |||
0 commit comments