type hints for messaging (#2061)

* bump cereal

* fix bugs found by mypy

* bump cereal
This commit is contained in:
Adeeb Shihadeh
2020-08-23 00:33:19 -07:00
committed by GitHub
parent 8c4c8e6bbe
commit 520c2676b6
4 changed files with 8 additions and 2 deletions
+1 -1
Submodule cereal updated: 50d3751489...b9a54adaf4
+3
View File
@@ -17,6 +17,9 @@ logcan = messaging.sub_sock('can')
msgs = {}
while True:
lc = messaging.recv_sock(logcan, True)
if lc is None:
continue
for c in lc.can:
# read also msgs sent by EON on CAN bus 0x80 and filter out the
# addr with more than 11 bits
@@ -11,6 +11,9 @@ if __name__ == "__main__":
while True:
m = messaging.recv_one(modeld_sock)
if m is None:
continue
frame_id = m.model.frameId
t = m.logMonoTime / 1e9
frame_cnt += 1
+1 -1
View File
@@ -26,7 +26,7 @@ if __name__ == "__main__":
while 1:
fpkt = messaging.recv_one(frame)
if len(fpkt.frame.image) == 0:
if fpkt is None or len(fpkt.frame.image) == 0:
continue
sm.update(timeout=1)
rgb_img_raw = fpkt.frame.image