Fix bug of PandaRunner (#1483)
* Fixed bug with safety_model on PandaRunner class * Fixed bug with PandaRunner --------- Co-authored-by: car <its@jku.at>
This commit is contained in:
parent
af2333f7c9
commit
b693229521
|
@ -16,7 +16,7 @@ class PandaRunner(AbstractContextManager):
|
||||||
self.CI = get_car(self._can_recv, self.p.can_send_many, self.p.set_obd, True)
|
self.CI = get_car(self._can_recv, self.p.can_send_many, self.p.set_obd, True)
|
||||||
assert self.CI.CP.carFingerprint.lower() != "mock", "Unable to identify car. Check connections and ensure car is supported."
|
assert self.CI.CP.carFingerprint.lower() != "mock", "Unable to identify car. Check connections and ensure car is supported."
|
||||||
|
|
||||||
safety_model = list(CarParams.SafetyModel).index(self.CI.CP.safetyConfigs[0].safetyModel)
|
safety_model = CarParams.SafetyModel.schema.enumerants[self.CI.CP.safetyConfigs[0].safetyModel]
|
||||||
self.p.set_safety_mode(Panda.SAFETY_ELM327, 1)
|
self.p.set_safety_mode(Panda.SAFETY_ELM327, 1)
|
||||||
self.CI.init(self.CI.CP, self._can_recv, self.p.can_send_many)
|
self.CI.init(self.CI.CP, self._can_recv, self.p.can_send_many)
|
||||||
self.p.set_safety_mode(safety_model, self.CI.CP.safetyConfigs[0].safetyParam)
|
self.p.set_safety_mode(safety_model, self.CI.CP.safetyConfigs[0].safetyParam)
|
||||||
|
|
Loading…
Reference in New Issue