Revert "can't directly access sockets anymore", was supposed to be on branch

This reverts commit 1046c572b4e49608137f687263d443eab6c430f8.

old-commit-hash: acb25751b75059a6e212192064528afe0ebd5e03
This commit is contained in:
Adeeb Shihadeh
2020-07-28 18:41:39 -07:00
parent 59ade6c2f6
commit 6e7fde5d61
3 changed files with 4 additions and 6 deletions
+1 -1
Submodule cereal updated: 32300930f6...29099e87a1
+1 -3
View File
@@ -61,9 +61,7 @@ class Controls:
self.can_sock = messaging.sub_sock('can', timeout=can_timeout)
# wait for one health and one CAN packet
while not sm.updated['health']:
sm.update()
hw_type = sm['health'].hwType
hw_type = messaging.recv_one(self.sm.sock['health']).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)
@@ -27,7 +27,7 @@ def camera_replay(lr, fr):
spinner = Spinner()
pm = messaging.PubMaster(['frame', 'liveCalibration'])
model_sock = messaging.sub_sock("model", conflate=False)
sm = messaging.SubMaster(['model'])
# 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(model_sock))
log_msgs.append(messaging.recv_one(sm.sock['model']))
spinner.update("modeld replay %d/%d" % (frame_idx, fr.frame_count))