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

Method _read_param

selfdrive/test/test_updated.py:104–112  ·  view source on GitHub ↗
(self, key, timeout=1)

Source from the content-addressed store, hash-verified

102
103 # TODO: this should be implemented in params
104 def _read_param(self, key, timeout=1):
105 ret = None
106 start_time = time.monotonic()
107 while ret is None:
108 ret = self.params.get(key)
109 if time.monotonic() - start_time > timeout:
110 break
111 time.sleep(0.01)
112 return ret
113
114 def _wait_for_update(self, timeout=30, clear_param=False):
115 if clear_param:

Callers 2

_wait_for_updateMethod · 0.95
_check_update_stateMethod · 0.95

Calls 2

sleepMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected