can't directly access sockets anymore

pull/1946/head
Adeeb Shihadeh 2020-07-28 18:37:16 -07:00
parent e03f9d7c73
commit 6acda96a16
3 changed files with 6 additions and 4 deletions

2
cereal

@ -1 +1 @@
Subproject commit 29099e87a1372694fb81b426faaa57e832bbe87a
Subproject commit 32300930f65425bbba136461446149af8f8b42d9

View File

@ -61,7 +61,9 @@ class Controls:
self.can_sock = messaging.sub_sock('can', timeout=can_timeout)
# wait for one health and one CAN packet
hw_type = messaging.recv_one(self.sm.sock['health']).health.hwType
while not sm.updated['health']:
sm.update()
hw_type = sm['health'].hwType
has_relay = hw_type in [HwType.blackPanda, HwType.uno, HwType.dos]
print("Waiting for CAN messages...")
messaging.get_one_can(self.can_sock)

View File

@ -27,7 +27,7 @@ def camera_replay(lr, fr):
spinner = Spinner()
pm = messaging.PubMaster(['frame', 'liveCalibration'])
sm = messaging.SubMaster(['model'])
model_sock = messaging.sub_sock("model", conflate=False)
# TODO: add dmonitoringmodeld
print("preparing procs")
@ -56,7 +56,7 @@ def camera_replay(lr, fr):
frame_idx += 1
pm.send(msg.which(), f)
log_msgs.append(messaging.recv_one(sm.sock['model']))
log_msgs.append(messaging.recv_one(model_sock))
spinner.update("modeld replay %d/%d" % (frame_idx, fr.frame_count))