diff --git a/selfdrive/car/tesla/carstate.py b/selfdrive/car/tesla/carstate.py index 226feaf4a7a39a..e838944225a50a 100644 --- a/selfdrive/car/tesla/carstate.py +++ b/selfdrive/car/tesla/carstate.py @@ -250,6 +250,8 @@ def __init__(self, CP): # Tesla Model self.teslaModelDetected = 1 self.teslaModel = read_db('/data/params','TeslaModel') + if self.teslaModel is not None: + self.teslaModel = self.teslaModel.decode() if self.teslaModel is None: self.teslaModel = "S" self.teslaModelDetected = 0 diff --git a/selfdrive/car/tesla/interface.py b/selfdrive/car/tesla/interface.py index 8b6e1d03364bbf..270ca8db2528ef 100644 --- a/selfdrive/car/tesla/interface.py +++ b/selfdrive/car/tesla/interface.py @@ -103,6 +103,8 @@ def get_params(candidate, fingerprint, vin="", is_panda_black=False): ret.isPandaBlack = is_panda_black teslaModel = read_db('/data/params','TeslaModel') + if teslaModel is not None: + teslaModel = teslaModel.decode() if teslaModel is None: teslaModel = "S"