paramsd: fix variable cpu usage (#24281)

* paramsd: fix variable cpu usage

* fix that

* increase that a bit
old-commit-hash: f7c2b8b46e87f9f32eaeb5a11d20d3df24fe96e4
This commit is contained in:
Adeeb Shihadeh
2022-04-20 14:08:52 -07:00
committed by GitHub
parent b57808e650
commit 9b9d332a54
4 changed files with 10 additions and 12 deletions
+2 -5
View File
@@ -1,14 +1,12 @@
#!/usr/bin/env python3
import gc
import math
import json
import numpy as np
import cereal.messaging as messaging
from cereal import car
from common.params import Params, put_nonblocking
from common.realtime import set_realtime_priority, DT_MDL
from common.realtime import config_realtime_process, DT_MDL
from common.numpy_fast import clip
from selfdrive.locationd.models.car_kf import CarKalman, ObservationKind, States
from selfdrive.locationd.models.constants import GENERATED_DIR
@@ -103,8 +101,7 @@ class ParamsLearner:
def main(sm=None, pm=None):
gc.disable()
set_realtime_priority(5)
config_realtime_process([0, 1, 2, 3], 5)
if sm is None:
sm = messaging.SubMaster(['liveLocationKalman', 'carState'], poll=['liveLocationKalman'])