mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-10-01 03:43:42 +08:00
openpilot v0.8.13 release
This commit is contained in:
committed by
Adeeb Shihadeh
parent
9779e34f75
commit
14adf3afa2
@@ -13,7 +13,7 @@ from cereal import log as capnp_log
|
||||
|
||||
|
||||
class RobustLogReader(LogReader):
|
||||
def __init__(self, fn, canonicalize=True, only_union_types=False): # pylint: disable=super-init-not-called
|
||||
def __init__(self, fn, canonicalize=True, only_union_types=False, sort_by_time=False): # pylint: disable=super-init-not-called
|
||||
data_version = None
|
||||
_, ext = os.path.splitext(urllib.parse.urlparse(fn).path)
|
||||
with FileReader(fn) as f:
|
||||
@@ -45,7 +45,7 @@ class RobustLogReader(LogReader):
|
||||
while True:
|
||||
try:
|
||||
ents = capnp_log.Event.read_multiple_bytes(dat)
|
||||
self._ents = list(ents)
|
||||
self._ents = list(sorted(ents, key=lambda x: x.logMonoTime) if sort_by_time else ents)
|
||||
break
|
||||
except capnp.lib.capnp.KjException:
|
||||
if progress is None:
|
||||
|
||||
Reference in New Issue
Block a user