diff --git a/selfdrive/car/__init__.py b/selfdrive/car/__init__.py index afd05f0ddd..11af70a539 100644 --- a/selfdrive/car/__init__.py +++ b/selfdrive/car/__init__.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 diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index f5c7265f21..0a5ec94aa0 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -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