MCPcopy
hub / github.com/commaai/openpilot / mock_update

Function mock_update

tools/clip/run.py:117–126  ·  view source on GitHub ↗
(timeout=None)

Source from the content-addressed store, hash-verified

115 ui_state.started_time = time.monotonic()
116
117 def mock_update(timeout=None):
118 sm, t = ui_state.sm, time.monotonic()
119 sm.updated = dict.fromkeys(sm.services, False)
120 if sm.frame < len(message_chunks):
121 for svc, msg in message_chunks[sm.frame].items():
122 if svc in sm.data:
123 sm.seen[svc] = sm.updated[svc] = sm.alive[svc] = sm.valid[svc] = True
124 sm.data[svc] = getattr(msg.as_builder(), svc)
125 sm.logMonoTime[svc], sm.recv_time[svc], sm.recv_frame[svc] = msg.logMonoTime, t, sm.frame
126 sm.frame += 1
127 ui_state.sm.update = mock_update
128
129

Callers

nothing calls this directly

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected