diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 8802a36f46..bf0aa58999 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -69,7 +69,7 @@ class HyundaiFlags(IntFlag): HYBRID = 2 ** 10 EV = 2 ** 11 - # Static Flags + # Static flags # If 0x500 is present on bus 1 it probably has a Mando radar outputting radar points. # If no points are outputted by default it might be possible to turn it on using selfdrive/debug/hyundai_enable_radar_points.py @@ -121,15 +121,14 @@ class HyundaiPlatformConfig(PlatformConfig): self.dbc_dict = dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar_generated') if self.flags & HyundaiFlags.MIN_STEER_32_MPH: - self.specs = self.specs.override(minSteerSpeed = 32 * CV.MPH_TO_MS) + self.specs = self.specs.override(minSteerSpeed=32 * CV.MPH_TO_MS) @dataclass -class HyundaiCanFDPlatformConfig(HyundaiPlatformConfig): +class HyundaiCanFDPlatformConfig(PlatformConfig): dbc_dict: DbcDict = field(default_factory=lambda: dbc_dict("hyundai_canfd", None)) def init(self): - super().init() self.flags |= HyundaiFlags.CANFD @@ -147,7 +146,7 @@ class CAR(Platforms): HyundaiCarInfo("Hyundai Azera Hybrid 2020", "All", car_parts=CarParts.common([CarHarness.hyundai_k])), ], CarSpecs(mass=1675, wheelbase=2.885, steerRatio=14.5), - flags=HyundaiFlags.HYBRID + flags=HyundaiFlags.HYBRID, ) ELANTRA = HyundaiPlatformConfig( "HYUNDAI ELANTRA 2017", @@ -158,7 +157,7 @@ class CAR(Platforms): ], # steerRatio: 14 is Stock | Settled Params Learner values are steerRatio: 15.401566348670535, stiffnessFactor settled on 1.0081302973865127 CarSpecs(mass=1275, wheelbase=2.7, steerRatio=15.4, tireStiffnessFactor=0.385), - flags=HyundaiFlags.LEGACY | HyundaiFlags.CLUSTER_GEARS | HyundaiFlags.MIN_STEER_32_MPH + flags=HyundaiFlags.LEGACY | HyundaiFlags.CLUSTER_GEARS | HyundaiFlags.MIN_STEER_32_MPH, ) ELANTRA_GT_I30 = HyundaiPlatformConfig( "HYUNDAI I30 N LINE 2019 & GT 2018 DCT", @@ -167,20 +166,20 @@ class CAR(Platforms): HyundaiCarInfo("Hyundai i30 2017-19", car_parts=CarParts.common([CarHarness.hyundai_e])), ], ELANTRA.specs, - flags=HyundaiFlags.LEGACY | HyundaiFlags.CLUSTER_GEARS | HyundaiFlags.MIN_STEER_32_MPH + flags=HyundaiFlags.LEGACY | HyundaiFlags.CLUSTER_GEARS | HyundaiFlags.MIN_STEER_32_MPH, ) ELANTRA_2021 = HyundaiPlatformConfig( "HYUNDAI ELANTRA 2021", HyundaiCarInfo("Hyundai Elantra 2021-23", video_link="https://youtu.be/_EdYQtV52-c", car_parts=CarParts.common([CarHarness.hyundai_k])), - CarSpecs(mass=2800*CV.LB_TO_KG, wheelbase=2.72, steerRatio=12.9, tireStiffnessFactor=0.65), - flags=HyundaiFlags.CHECKSUM_CRC8 + CarSpecs(mass=2800 * CV.LB_TO_KG, wheelbase=2.72, steerRatio=12.9, tireStiffnessFactor=0.65), + flags=HyundaiFlags.CHECKSUM_CRC8, ) ELANTRA_HEV_2021 = HyundaiPlatformConfig( "HYUNDAI ELANTRA HYBRID 2021", HyundaiCarInfo("Hyundai Elantra Hybrid 2021-23", video_link="https://youtu.be/_EdYQtV52-c", - car_parts=CarParts.common([CarHarness.hyundai_k])), + car_parts=CarParts.common([CarHarness.hyundai_k])), CarSpecs(mass=3017 * CV.LB_TO_KG, wheelbase=2.72, steerRatio=12.9, tireStiffnessFactor=0.65), - flags=HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID + flags=HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID, ) HYUNDAI_GENESIS = HyundaiPlatformConfig( "HYUNDAI GENESIS 2015-2016", @@ -190,7 +189,7 @@ class CAR(Platforms): HyundaiCarInfo("Genesis G80 2017", "All", min_enable_speed=19 * CV.MPH_TO_MS, car_parts=CarParts.common([CarHarness.hyundai_j])), ], CarSpecs(mass=2060, wheelbase=3.01, steerRatio=16.5, minSteerSpeed=60 * CV.KPH_TO_MS), - flags=HyundaiFlags.CHECKSUM_6B | HyundaiFlags.LEGACY + flags=HyundaiFlags.CHECKSUM_6B | HyundaiFlags.LEGACY, ) IONIQ = HyundaiPlatformConfig( "HYUNDAI IONIQ HYBRID 2017-2019", @@ -202,102 +201,102 @@ class CAR(Platforms): "HYUNDAI IONIQ HYBRID 2020-2022", HyundaiCarInfo("Hyundai Ioniq Hybrid 2020-22", car_parts=CarParts.common([CarHarness.hyundai_h])), # TODO: confirm 2020-21 harness, CarSpecs(mass=1490, wheelbase=2.7, steerRatio=13.73, tireStiffnessFactor=0.385), - flags=HyundaiFlags.HYBRID | HyundaiFlags.LEGACY + flags=HyundaiFlags.HYBRID | HyundaiFlags.LEGACY, ) IONIQ_EV_LTD = HyundaiPlatformConfig( "HYUNDAI IONIQ ELECTRIC LIMITED 2019", HyundaiCarInfo("Hyundai Ioniq Electric 2019", car_parts=CarParts.common([CarHarness.hyundai_c])), CarSpecs(mass=1490, wheelbase=2.7, steerRatio=13.73, tireStiffnessFactor=0.385), - flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.EV | HyundaiFlags.LEGACY | HyundaiFlags.MIN_STEER_32_MPH + flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.EV | HyundaiFlags.LEGACY | HyundaiFlags.MIN_STEER_32_MPH, ) IONIQ_EV_2020 = HyundaiPlatformConfig( "HYUNDAI IONIQ ELECTRIC 2020", HyundaiCarInfo("Hyundai Ioniq Electric 2020", "All", car_parts=CarParts.common([CarHarness.hyundai_h])), CarSpecs(mass=1490, wheelbase=2.7, steerRatio=13.73, tireStiffnessFactor=0.385), - flags=HyundaiFlags.EV + flags=HyundaiFlags.EV, ) IONIQ_PHEV_2019 = HyundaiPlatformConfig( "HYUNDAI IONIQ PLUG-IN HYBRID 2019", HyundaiCarInfo("Hyundai Ioniq Plug-in Hybrid 2019", car_parts=CarParts.common([CarHarness.hyundai_c])), CarSpecs(mass=1490, wheelbase=2.7, steerRatio=13.73, tireStiffnessFactor=0.385), - flags=HyundaiFlags.HYBRID | HyundaiFlags.MIN_STEER_32_MPH + flags=HyundaiFlags.HYBRID | HyundaiFlags.MIN_STEER_32_MPH, ) IONIQ_PHEV = HyundaiPlatformConfig( "HYUNDAI IONIQ PHEV 2020", HyundaiCarInfo("Hyundai Ioniq Plug-in Hybrid 2020-22", "All", car_parts=CarParts.common([CarHarness.hyundai_h])), CarSpecs(mass=1490, wheelbase=2.7, steerRatio=13.73, tireStiffnessFactor=0.385), - flags=HyundaiFlags.HYBRID + flags=HyundaiFlags.HYBRID, ) KONA = HyundaiPlatformConfig( "HYUNDAI KONA 2020", HyundaiCarInfo("Hyundai Kona 2020", car_parts=CarParts.common([CarHarness.hyundai_b])), CarSpecs(mass=1275, wheelbase=2.6, steerRatio=13.42, tireStiffnessFactor=0.385), - flags=HyundaiFlags.CLUSTER_GEARS + flags=HyundaiFlags.CLUSTER_GEARS, ) KONA_EV = HyundaiPlatformConfig( "HYUNDAI KONA ELECTRIC 2019", HyundaiCarInfo("Hyundai Kona Electric 2018-21", car_parts=CarParts.common([CarHarness.hyundai_g])), CarSpecs(mass=1685, wheelbase=2.6, steerRatio=13.42, tireStiffnessFactor=0.385), - flags=HyundaiFlags.EV + flags=HyundaiFlags.EV, ) KONA_EV_2022 = HyundaiPlatformConfig( "HYUNDAI KONA ELECTRIC 2022", HyundaiCarInfo("Hyundai Kona Electric 2022-23", car_parts=CarParts.common([CarHarness.hyundai_o])), CarSpecs(mass=1743, wheelbase=2.6, steerRatio=13.42, tireStiffnessFactor=0.385), - flags=HyundaiFlags.CAMERA_SCC | HyundaiFlags.EV + flags=HyundaiFlags.CAMERA_SCC | HyundaiFlags.EV, ) KONA_EV_2ND_GEN = HyundaiCanFDPlatformConfig( "HYUNDAI KONA ELECTRIC 2ND GEN", HyundaiCarInfo("Hyundai Kona Electric (with HDA II, Korea only) 2023", video_link="https://www.youtube.com/watch?v=U2fOCmcQ8hw", - car_parts=CarParts.common([CarHarness.hyundai_r])), + car_parts=CarParts.common([CarHarness.hyundai_r])), CarSpecs(mass=1740, wheelbase=2.66, steerRatio=13.6, tireStiffnessFactor=0.385), - flags=HyundaiFlags.EV | HyundaiFlags.CANFD_NO_RADAR_DISABLE + flags=HyundaiFlags.EV | HyundaiFlags.CANFD_NO_RADAR_DISABLE, ) KONA_HEV = HyundaiPlatformConfig( "HYUNDAI KONA HYBRID 2020", HyundaiCarInfo("Hyundai Kona Hybrid 2020", car_parts=CarParts.common([CarHarness.hyundai_i])), # TODO: check packages, CarSpecs(mass=1425, wheelbase=2.6, steerRatio=13.42, tireStiffnessFactor=0.385), - flags=HyundaiFlags.HYBRID + flags=HyundaiFlags.HYBRID, ) SANTA_FE = HyundaiPlatformConfig( "HYUNDAI SANTA FE 2019", HyundaiCarInfo("Hyundai Santa Fe 2019-20", "All", video_link="https://youtu.be/bjDR0YjM__s", - car_parts=CarParts.common([CarHarness.hyundai_d])), + car_parts=CarParts.common([CarHarness.hyundai_d])), CarSpecs(mass=3982 * CV.LB_TO_KG, wheelbase=2.766, steerRatio=16.55, tireStiffnessFactor=0.82), - flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8 + flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8, ) SANTA_FE_2022 = HyundaiPlatformConfig( "HYUNDAI SANTA FE 2022", - HyundaiCarInfo("Hyundai Santa Fe 2021-23", "All", video_link="https://youtu.be/VnHzSTygTS4", - car_parts=CarParts.common([CarHarness.hyundai_l])), + HyundaiCarInfo("Hyundai Santa Fe 2021-23", "All", video_link="https://youtu.be/VnHzSTygTS4", + car_parts=CarParts.common([CarHarness.hyundai_l])), SANTA_FE.specs, - flags=HyundaiFlags.CHECKSUM_CRC8 + flags=HyundaiFlags.CHECKSUM_CRC8, ) SANTA_FE_HEV_2022 = HyundaiPlatformConfig( "HYUNDAI SANTA FE HYBRID 2022", HyundaiCarInfo("Hyundai Santa Fe Hybrid 2022-23", "All", car_parts=CarParts.common([CarHarness.hyundai_l])), SANTA_FE.specs, - flags=HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID + flags=HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID, ) SANTA_FE_PHEV_2022 = HyundaiPlatformConfig( "HYUNDAI SANTA FE PlUG-IN HYBRID 2022", HyundaiCarInfo("Hyundai Santa Fe Plug-in Hybrid 2022-23", "All", car_parts=CarParts.common([CarHarness.hyundai_l])), SANTA_FE.specs, - flags=HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID + flags=HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID, ) SONATA = HyundaiPlatformConfig( "HYUNDAI SONATA 2020", HyundaiCarInfo("Hyundai Sonata 2020-23", "All", video_link="https://www.youtube.com/watch?v=ix63r9kE3Fw", - car_parts=CarParts.common([CarHarness.hyundai_a])), + car_parts=CarParts.common([CarHarness.hyundai_a])), CarSpecs(mass=1513, wheelbase=2.84, steerRatio=13.27 * 1.15, tireStiffnessFactor=0.65), # 15% higher at the center seems reasonable - flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8 + flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8, ) SONATA_LF = HyundaiPlatformConfig( "HYUNDAI SONATA 2019", HyundaiCarInfo("Hyundai Sonata 2018-19", car_parts=CarParts.common([CarHarness.hyundai_e])), CarSpecs(mass=1536, wheelbase=2.804, steerRatio=13.27 * 1.15), # 15% higher at the center seems reasonable - flags=HyundaiFlags.UNSUPPORTED_LONGITUDINAL | HyundaiFlags.TCU_GEARS + flags=HyundaiFlags.UNSUPPORTED_LONGITUDINAL | HyundaiFlags.TCU_GEARS, ) STARIA_4TH_GEN = HyundaiCanFDPlatformConfig( "HYUNDAI STARIA 4TH GEN", @@ -311,7 +310,7 @@ class CAR(Platforms): HyundaiCarInfo("Hyundai Tucson Diesel 2019", car_parts=CarParts.common([CarHarness.hyundai_l])), ], CarSpecs(mass=3520 * CV.LB_TO_KG, wheelbase=2.67, steerRatio=16.1, tireStiffnessFactor=0.385), - flags=HyundaiFlags.TCU_GEARS + flags=HyundaiFlags.TCU_GEARS, ) PALISADE = HyundaiPlatformConfig( "HYUNDAI PALISADE 2020", @@ -320,19 +319,19 @@ class CAR(Platforms): HyundaiCarInfo("Kia Telluride 2020-22", "All", car_parts=CarParts.common([CarHarness.hyundai_h])), ], CarSpecs(mass=1999, wheelbase=2.9, steerRatio=15.6 * 1.15, tireStiffnessFactor=0.63), - flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8 + flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8, ) VELOSTER = HyundaiPlatformConfig( "HYUNDAI VELOSTER 2019", HyundaiCarInfo("Hyundai Veloster 2019-20", min_enable_speed=5. * CV.MPH_TO_MS, car_parts=CarParts.common([CarHarness.hyundai_e])), - CarSpecs(mass=2917 * CV.LB_TO_KG, wheelbase=2.8, steerRatio=13.75 * 1.15, tireStiffnessFactor = 0.5), - flags=HyundaiFlags.LEGACY | HyundaiFlags.TCU_GEARS + CarSpecs(mass=2917 * CV.LB_TO_KG, wheelbase=2.8, steerRatio=13.75 * 1.15, tireStiffnessFactor=0.5), + flags=HyundaiFlags.LEGACY | HyundaiFlags.TCU_GEARS, ) SONATA_HYBRID = HyundaiPlatformConfig( "HYUNDAI SONATA HYBRID 2021", HyundaiCarInfo("Hyundai Sonata Hybrid 2020-23", "All", car_parts=CarParts.common([CarHarness.hyundai_a])), SONATA.specs, - flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID + flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID, ) IONIQ_5 = HyundaiCanFDPlatformConfig( "HYUNDAI IONIQ 5 2022", @@ -342,13 +341,13 @@ class CAR(Platforms): HyundaiCarInfo("Hyundai Ioniq 5 (with HDA II) 2022-23", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_q])), ], CarSpecs(mass=1948, wheelbase=2.97, steerRatio=14.26, tireStiffnessFactor=0.65), - flags=HyundaiFlags.EV + flags=HyundaiFlags.EV, ) IONIQ_6 = HyundaiCanFDPlatformConfig( "HYUNDAI IONIQ 6 2023", HyundaiCarInfo("Hyundai Ioniq 6 (with HDA II) 2023", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_p])), IONIQ_5.specs, - flags=HyundaiFlags.EV | HyundaiFlags.CANFD_NO_RADAR_DISABLE + flags=HyundaiFlags.EV | HyundaiFlags.CANFD_NO_RADAR_DISABLE, ) TUCSON_4TH_GEN = HyundaiCanFDPlatformConfig( "HYUNDAI TUCSON 4TH GEN", @@ -368,8 +367,8 @@ class CAR(Platforms): CUSTIN_1ST_GEN = HyundaiPlatformConfig( "HYUNDAI CUSTIN 1ST GEN", HyundaiCarInfo("Hyundai Custin 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_k])), - CarSpecs(mass=1690, wheelbase=3.055, steerRatio=17), # mass: from https://www.hyundai-motor.com.tw/clicktobuy/custin#spec_0, steerRatio: from learner - flags=HyundaiFlags.CHECKSUM_CRC8 + CarSpecs(mass=1690, wheelbase=3.055, steerRatio=17), # mass: from https://www.hyundai-motor.com.tw/clicktobuy/custin#spec_0, steerRatio: from learner + flags=HyundaiFlags.CHECKSUM_CRC8, ) # Kia @@ -385,13 +384,13 @@ class CAR(Platforms): "KIA K5 2021", HyundaiCarInfo("Kia K5 2021-24", car_parts=CarParts.common([CarHarness.hyundai_a])), CarSpecs(mass=3381 * CV.LB_TO_KG, wheelbase=2.85, steerRatio=13.27, tireStiffnessFactor=0.5), # 2021 Kia K5 Steering Ratio (all trims) - flags=HyundaiFlags.CHECKSUM_CRC8 + flags=HyundaiFlags.CHECKSUM_CRC8, ) KIA_K5_HEV_2020 = HyundaiPlatformConfig( "KIA K5 HYBRID 2020", HyundaiCarInfo("Kia K5 Hybrid 2020-22", car_parts=CarParts.common([CarHarness.hyundai_a])), KIA_K5_2021.specs, - flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID + flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID, ) KIA_K8_HEV_1ST_GEN = HyundaiCanFDPlatformConfig( "KIA K8 HYBRID 1ST GEN", @@ -408,13 +407,13 @@ class CAR(Platforms): HyundaiCarInfo("Kia Niro EV 2022", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", car_parts=CarParts.common([CarHarness.hyundai_h])), ], CarSpecs(mass=3543 * CV.LB_TO_KG, wheelbase=2.7, steerRatio=13.6, tireStiffnessFactor=0.385), # average of all the cars - flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.EV + flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.EV, ) KIA_NIRO_EV_2ND_GEN = HyundaiCanFDPlatformConfig( "KIA NIRO EV 2ND GEN", HyundaiCarInfo("Kia Niro EV 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_a])), KIA_NIRO_EV.specs, - flags=HyundaiFlags.EV + flags=HyundaiFlags.EV, ) KIA_NIRO_PHEV = HyundaiPlatformConfig( "KIA NIRO HYBRID 2019", @@ -423,7 +422,7 @@ class CAR(Platforms): HyundaiCarInfo("Kia Niro Plug-in Hybrid 2020", "All", car_parts=CarParts.common([CarHarness.hyundai_d])), ], KIA_NIRO_EV.specs, - flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.HYBRID | HyundaiFlags.UNSUPPORTED_LONGITUDINAL | HyundaiFlags.MIN_STEER_32_MPH + flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.HYBRID | HyundaiFlags.UNSUPPORTED_LONGITUDINAL | HyundaiFlags.MIN_STEER_32_MPH, ) KIA_NIRO_PHEV_2022 = HyundaiPlatformConfig( "KIA NIRO PLUG-IN HYBRID 2022", @@ -432,7 +431,7 @@ class CAR(Platforms): HyundaiCarInfo("Kia Niro Plug-in Hybrid 2022", "All", car_parts=CarParts.common([CarHarness.hyundai_f])), ], KIA_NIRO_EV.specs, - flags=HyundaiFlags.HYBRID | HyundaiFlags.MANDO_RADAR + flags=HyundaiFlags.HYBRID | HyundaiFlags.MANDO_RADAR, ) KIA_NIRO_HEV_2021 = HyundaiPlatformConfig( "KIA NIRO HYBRID 2021", @@ -441,7 +440,7 @@ class CAR(Platforms): HyundaiCarInfo("Kia Niro Hybrid 2022", car_parts=CarParts.common([CarHarness.hyundai_f])), ], KIA_NIRO_EV.specs, - flags=HyundaiFlags.HYBRID + flags=HyundaiFlags.HYBRID, ) KIA_NIRO_HEV_2ND_GEN = HyundaiCanFDPlatformConfig( "KIA NIRO HYBRID 2ND GEN", @@ -451,34 +450,34 @@ class CAR(Platforms): KIA_OPTIMA_G4 = HyundaiPlatformConfig( "KIA OPTIMA 4TH GEN", HyundaiCarInfo("Kia Optima 2017", "Advanced Smart Cruise Control", - car_parts=CarParts.common([CarHarness.hyundai_b])), # TODO: may support 2016, 2018 + car_parts=CarParts.common([CarHarness.hyundai_b])), # TODO: may support 2016, 2018 CarSpecs(mass=3558 * CV.LB_TO_KG, wheelbase=2.8, steerRatio=13.75, tireStiffnessFactor=0.5), - flags=HyundaiFlags.LEGACY | HyundaiFlags.TCU_GEARS | HyundaiFlags.MIN_STEER_32_MPH + flags=HyundaiFlags.LEGACY | HyundaiFlags.TCU_GEARS | HyundaiFlags.MIN_STEER_32_MPH, ) KIA_OPTIMA_G4_FL = HyundaiPlatformConfig( "KIA OPTIMA 4TH GEN FACELIFT", HyundaiCarInfo("Kia Optima 2019-20", car_parts=CarParts.common([CarHarness.hyundai_g])), CarSpecs(mass=3558 * CV.LB_TO_KG, wheelbase=2.8, steerRatio=13.75, tireStiffnessFactor=0.5), - flags=HyundaiFlags.UNSUPPORTED_LONGITUDINAL | HyundaiFlags.TCU_GEARS + flags=HyundaiFlags.UNSUPPORTED_LONGITUDINAL | HyundaiFlags.TCU_GEARS, ) # TODO: may support adjacent years. may have a non-zero minimum steering speed KIA_OPTIMA_H = HyundaiPlatformConfig( "KIA OPTIMA HYBRID 2017 & SPORTS 2019", HyundaiCarInfo("Kia Optima Hybrid 2017", "Advanced Smart Cruise Control", car_parts=CarParts.common([CarHarness.hyundai_c])), CarSpecs(mass=3558 * CV.LB_TO_KG, wheelbase=2.8, steerRatio=13.75, tireStiffnessFactor=0.5), - flags=HyundaiFlags.HYBRID | HyundaiFlags.LEGACY + flags=HyundaiFlags.HYBRID | HyundaiFlags.LEGACY, ) KIA_OPTIMA_H_G4_FL = HyundaiPlatformConfig( "KIA OPTIMA HYBRID 4TH GEN FACELIFT", HyundaiCarInfo("Kia Optima Hybrid 2019", car_parts=CarParts.common([CarHarness.hyundai_h])), CarSpecs(mass=3558 * CV.LB_TO_KG, wheelbase=2.8, steerRatio=13.75, tireStiffnessFactor=0.5), - flags=HyundaiFlags.HYBRID | HyundaiFlags.UNSUPPORTED_LONGITUDINAL + flags=HyundaiFlags.HYBRID | HyundaiFlags.UNSUPPORTED_LONGITUDINAL, ) KIA_SELTOS = HyundaiPlatformConfig( "KIA SELTOS 2021", HyundaiCarInfo("Kia Seltos 2021", car_parts=CarParts.common([CarHarness.hyundai_a])), CarSpecs(mass=1337, wheelbase=2.63, steerRatio=14.56), - flags=HyundaiFlags.CHECKSUM_CRC8 + flags=HyundaiFlags.CHECKSUM_CRC8, ) KIA_SPORTAGE_5TH_GEN = HyundaiCanFDPlatformConfig( "KIA SPORTAGE 5TH GEN", @@ -493,17 +492,17 @@ class CAR(Platforms): "KIA SORENTO GT LINE 2018", [ HyundaiCarInfo("Kia Sorento 2018", "Advanced Smart Cruise Control & LKAS", video_link="https://www.youtube.com/watch?v=Fkh3s6WHJz8", - car_parts=CarParts.common([CarHarness.hyundai_e])), + car_parts=CarParts.common([CarHarness.hyundai_e])), HyundaiCarInfo("Kia Sorento 2019", video_link="https://www.youtube.com/watch?v=Fkh3s6WHJz8", car_parts=CarParts.common([CarHarness.hyundai_e])), ], CarSpecs(mass=1985, wheelbase=2.78, steerRatio=14.4 * 1.1), # 10% higher at the center seems reasonable - flags=HyundaiFlags.CHECKSUM_6B | HyundaiFlags.UNSUPPORTED_LONGITUDINAL + flags=HyundaiFlags.CHECKSUM_6B | HyundaiFlags.UNSUPPORTED_LONGITUDINAL, ) KIA_SORENTO_4TH_GEN = HyundaiCanFDPlatformConfig( "KIA SORENTO 4TH GEN", HyundaiCarInfo("Kia Sorento 2021-23", car_parts=CarParts.common([CarHarness.hyundai_k])), - CarSpecs(mass=3957 * CV.LB_TO_KG, wheelbase=2.81, steerRatio=13.5), # average of the platforms - flags=HyundaiFlags.RADAR_SCC + CarSpecs(mass=3957 * CV.LB_TO_KG, wheelbase=2.81, steerRatio=13.5), # average of the platforms + flags=HyundaiFlags.RADAR_SCC, ) KIA_SORENTO_HEV_4TH_GEN = HyundaiCanFDPlatformConfig( "KIA SORENTO HYBRID 4TH GEN", @@ -511,13 +510,13 @@ class CAR(Platforms): HyundaiCarInfo("Kia Sorento Hybrid 2021-23", "All", car_parts=CarParts.common([CarHarness.hyundai_a])), HyundaiCarInfo("Kia Sorento Plug-in Hybrid 2022-23", "All", car_parts=CarParts.common([CarHarness.hyundai_a])), ], - CarSpecs(mass=4395 * CV.LB_TO_KG, wheelbase=2.81, steerRatio=13.5), # average of the platforms - flags=HyundaiFlags.RADAR_SCC + CarSpecs(mass=4395 * CV.LB_TO_KG, wheelbase=2.81, steerRatio=13.5), # average of the platforms + flags=HyundaiFlags.RADAR_SCC, ) KIA_STINGER = HyundaiPlatformConfig( "KIA STINGER GT2 2018", HyundaiCarInfo("Kia Stinger 2018-20", video_link="https://www.youtube.com/watch?v=MJ94qoofYw0", - car_parts=CarParts.common([CarHarness.hyundai_c])), + car_parts=CarParts.common([CarHarness.hyundai_c])), CarSpecs(mass=1825, wheelbase=2.78, steerRatio=14.4 * 1.15) # 15% higher at the center seems reasonable ) KIA_STINGER_2022 = HyundaiPlatformConfig( @@ -529,7 +528,7 @@ class CAR(Platforms): "KIA CEED INTRO ED 2019", HyundaiCarInfo("Kia Ceed 2019", car_parts=CarParts.common([CarHarness.hyundai_e])), CarSpecs(mass=1450, wheelbase=2.65, steerRatio=13.75, tireStiffnessFactor=0.5), - flags=HyundaiFlags.LEGACY + flags=HyundaiFlags.LEGACY, ) KIA_EV6 = HyundaiCanFDPlatformConfig( "KIA EV6 2022", @@ -539,7 +538,7 @@ class CAR(Platforms): HyundaiCarInfo("Kia EV6 (with HDA II) 2022-23", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_p])) ], CarSpecs(mass=2055, wheelbase=2.9, steerRatio=16, tireStiffnessFactor=0.65), - flags=HyundaiFlags.EV + flags=HyundaiFlags.EV, ) KIA_CARNIVAL_4TH_GEN = HyundaiCanFDPlatformConfig( "KIA CARNIVAL 4TH GEN", @@ -548,7 +547,7 @@ class CAR(Platforms): HyundaiCarInfo("Kia Carnival (China only) 2023", car_parts=CarParts.common([CarHarness.hyundai_k])) ], CarSpecs(mass=2087, wheelbase=3.09, steerRatio=14.23), - flags=HyundaiFlags.RADAR_SCC + flags=HyundaiFlags.RADAR_SCC, ) # Genesis @@ -559,19 +558,19 @@ class CAR(Platforms): HyundaiCarInfo("Genesis GV60 (Performance Trim) 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_k])), ], CarSpecs(mass=2205, wheelbase=2.9, steerRatio=12.6), # steerRatio: https://www.motor1.com/reviews/586376/2023-genesis-gv60-first-drive/#:~:text=Relative%20to%20the%20related%20Ioniq,5%2FEV6%27s%2014.3%3A1. - flags=HyundaiFlags.EV + flags=HyundaiFlags.EV, ) GENESIS_G70 = HyundaiPlatformConfig( "GENESIS G70 2018", HyundaiCarInfo("Genesis G70 2018-19", "All", car_parts=CarParts.common([CarHarness.hyundai_f])), CarSpecs(mass=1640, wheelbase=2.84, steerRatio=13.56), - flags=HyundaiFlags.LEGACY + flags=HyundaiFlags.LEGACY, ) GENESIS_G70_2020 = HyundaiPlatformConfig( "GENESIS G70 2020", HyundaiCarInfo("Genesis G70 2020", "All", car_parts=CarParts.common([CarHarness.hyundai_f])), CarSpecs(mass=3673 * CV.LB_TO_KG, wheelbase=2.83, steerRatio=12.9), - flags=HyundaiFlags.MANDO_RADAR + flags=HyundaiFlags.MANDO_RADAR, ) GENESIS_GV70_1ST_GEN = HyundaiCanFDPlatformConfig( "GENESIS GV70 1ST GEN", @@ -580,13 +579,13 @@ class CAR(Platforms): HyundaiCarInfo("Genesis GV70 (3.5T Trim) 2022-23", "All", car_parts=CarParts.common([CarHarness.hyundai_m])), ], CarSpecs(mass=1950, wheelbase=2.87, steerRatio=14.6), - flags=HyundaiFlags.RADAR_SCC + flags=HyundaiFlags.RADAR_SCC, ) GENESIS_G80 = HyundaiPlatformConfig( "GENESIS G80 2017", HyundaiCarInfo("Genesis G80 2018-19", "All", car_parts=CarParts.common([CarHarness.hyundai_h])), CarSpecs(mass=2060, wheelbase=3.01, steerRatio=16.5), - flags=HyundaiFlags.LEGACY + flags=HyundaiFlags.LEGACY, ) GENESIS_G90 = HyundaiPlatformConfig( "GENESIS G90 2017", @@ -597,7 +596,7 @@ class CAR(Platforms): "GENESIS GV80 2023", HyundaiCarInfo("Genesis GV80 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_m])), CarSpecs(mass=2258, wheelbase=2.95, steerRatio=14.14), - flags=HyundaiFlags.RADAR_SCC + flags=HyundaiFlags.RADAR_SCC, ) diff --git a/selfdrive/car/volkswagen/values.py b/selfdrive/car/volkswagen/values.py index 868d6630ef..6ff913b204 100644 --- a/selfdrive/car/volkswagen/values.py +++ b/selfdrive/car/volkswagen/values.py @@ -113,7 +113,7 @@ class VolkswagenFlags(IntFlag): # Detected flags STOCK_HCA_PRESENT = 1 - # Static Flags + # Static flags PQ = 2