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:
Walter Morales 2024-11-14 15:45:40 +00:00 committed by GitHub
parent af2333f7c9
commit b693229521
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ class PandaRunner(AbstractContextManager):
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."
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.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)