everything works now

pull/31607/head
Shane Smiskol 1 year ago
parent 02194be5e5
commit 6b94b71039
  1. 7
      selfdrive/car/__init__.py
  2. 3
      selfdrive/car/interfaces.py

@ -273,12 +273,9 @@ class Platforms(str, ReprEnum):
config: PlatformConfig
def __new__(cls, platform_config: PlatformConfig):
_str = platform_config
if type(_str) != str:
_str = platform_config.platform_str
member = str.__new__(cls, _str)
member = str.__new__(cls, platform_config.platform_str)
member.config = platform_config
member._value_ = _str
member._value_ = platform_config.platform_str
return member
@classmethod

@ -113,8 +113,7 @@ class CarInterfaceBase(ABC):
ret = CarInterfaceBase.get_std_params(candidate)
if hasattr(candidate, "config"):
print(candidate.config)
if type(candidate.config) != str and candidate.config.specs is not None:
if candidate.config.specs is not None:
ret.mass = candidate.config.specs.mass
ret.wheelbase = candidate.config.specs.wheelbase
ret.steerRatio = candidate.config.specs.steerRatio

Loading…
Cancel
Save