don't update any params until CP is initialized

no-block
Shane Smiskol 2 months ago
parent 66a499ac8c
commit 348a2f0fc2
  1. 7
      selfdrive/selfdrived/selfdrived.py

@ -477,16 +477,15 @@ class SelfdriveD:
def params_thread(self, evt):
while not evt.is_set():
if self.CP_initialized:
self.is_metric = self.params.get_bool("IsMetric")
self.experimental_mode = self.params.get_bool("ExperimentalMode") and self.CP.openpilotLongitudinalControl
self.personality = self.read_personality_param()
if not self.CP_initialized:
else:
CP = self.params.get("CarParams")
if CP is not None:
self.initialize_car_params(messaging.log_from_bytes(CP, car.CarParams))
cloudlog.info("selfdrived got CarParams")
else:
self.experimental_mode = self.params.get_bool("ExperimentalMode") and self.CP.openpilotLongitudinalControl
time.sleep(0.1)

Loading…
Cancel
Save