Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix op_params bug #507

Merged
merged 1 commit into from
Jan 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/op_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def put(self, key, value):
def get(self, key=None, default=None): # can specify a default value if key doesn't exist
if key is None:
return self.params
if not travis and self.default_params[key]['live']: # if is a live param, we want get updates while openpilot is running
if not travis and key in self.default_params and self.default_params[key]['live']: # if is a live param, we want get updates while openpilot is running
if time.time() - self.last_read_time >= self.read_frequency: # make sure we aren't reading file too often
self.params, read_status = read_params(self.params_file, self.format_default_params())
if not read_status:
Expand Down