mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 00:03:45 +08:00
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:
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user