mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 21:14:01 +08:00
LogReader: fix plotjuggler not reading properly (#31023)
* fix plotjuggler
* simpler
* fix juggler
* fix that
old-commit-hash: 61fe705160
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
import multiprocessing
|
||||
import os
|
||||
import sys
|
||||
import platform
|
||||
@@ -76,10 +75,7 @@ def process(can, lr):
|
||||
def juggle_route(route_or_segment_name, can, layout, dbc=None):
|
||||
sr = LogReader(route_or_segment_name)
|
||||
|
||||
with multiprocessing.Pool(24) as pool:
|
||||
all_data = []
|
||||
for p in pool.map(partial(process, can), sr.lrs):
|
||||
all_data.extend(p)
|
||||
all_data = sr.run_across_segments(24, partial(process, can))
|
||||
|
||||
# Infer DBC name from logs
|
||||
if dbc is None:
|
||||
|
||||
@@ -31,6 +31,8 @@ class TestPlotJuggler(unittest.TestCase):
|
||||
self.assertEqual(p.poll(), None)
|
||||
os.killpg(os.getpgid(p.pid), signal.SIGTERM)
|
||||
|
||||
self.assertNotIn("Raw file read failed", output)
|
||||
|
||||
# TODO: also test that layouts successfully load
|
||||
def test_layouts(self):
|
||||
bad_strings = (
|
||||
|
||||
Reference in New Issue
Block a user