openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

636 lines
32 KiB

import re
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
from dataclasses import dataclass
from enum import Enum, IntFlag, StrEnum
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
5 years ago
from cereal import car
from panda.python import uds
from openpilot.common.conversions import Conversions as CV
from openpilot.selfdrive.car import dbc_dict
from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarInfo, CarParts, Column
from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, p16
Ecu = car.CarParams.Ecu
5 years ago
class CarControllerParams:
ACCEL_MIN = -3.5 # m/s
ACCEL_MAX = 2.0 # m/s
def __init__(self, CP):
self.STEER_DELTA_UP = 3
self.STEER_DELTA_DOWN = 7
self.STEER_DRIVER_ALLOWANCE = 50
self.STEER_DRIVER_MULTIPLIER = 2
self.STEER_DRIVER_FACTOR = 1
self.STEER_THRESHOLD = 150
self.STEER_STEP = 1 # 100 Hz
if CP.carFingerprint in CANFD_CAR:
self.STEER_MAX = 270
self.STEER_DRIVER_ALLOWANCE = 250
self.STEER_DRIVER_MULTIPLIER = 2
self.STEER_THRESHOLD = 250
self.STEER_DELTA_UP = 2
self.STEER_DELTA_DOWN = 3
# To determine the limit for your car, find the maximum value that the stock LKAS will request.
# If the max stock LKAS request is <384, add your car to this list.
elif CP.carFingerprint in (CAR.GENESIS_G80, CAR.GENESIS_G90, CAR.ELANTRA, CAR.ELANTRA_GT_I30, CAR.IONIQ,
CAR.IONIQ_EV_LTD, CAR.SANTA_FE_PHEV_2022, CAR.SONATA_LF, CAR.KIA_FORTE, CAR.KIA_NIRO_PHEV,
CAR.KIA_OPTIMA_H, CAR.KIA_OPTIMA_H_G4_FL, CAR.KIA_SORENTO):
self.STEER_MAX = 255
# these cars have significantly more torque than most HKG; limit to 70% of max
elif CP.flags & HyundaiFlags.ALT_LIMITS:
self.STEER_MAX = 270
self.STEER_DELTA_UP = 2
self.STEER_DELTA_DOWN = 3
# Default for most HKG
else:
self.STEER_MAX = 384
5 years ago
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
Hyundai: Car Port for Tucson Hybrid 2022 (#25276) * Hyundai: Car Port for Tucson Hybrid 2022 * Update RELEASES.md * Init gear_msg at the top * FW versions from script * Button send attempt * start with some cleanup * Send button fixed bits * Define all bytes and only send PAUSE/RESUME * Use CRUISE_INFO to cancel cruise and resume * 8-bit counter * Cleanup ish * 8 bit counter * Send at 20ms * Disengage bits * Revert bump submodules * Allow tx on 0x1a0 * Fix byte counts * Send LFA and HDA icons based on engageability * Send cruise buttons only on HDA2 cars for now * Add comments * Add FLAG_HYUNDAI_CANFD_HDA2 flag * Update interface.py * Update carstate.py * Update carstate.py * Update carstate.py * Bump submodules * Bump panda * Bump opendbc * Allow tx with CRUISE_INACTIVE * GEAR has 24 bytes only * Generate car docs * Fix CRUISE_INFO copy * Remove unused class * Add CAN-FD busses to unit test * Bump opendbc * Revert "Add CAN-FD busses to unit test" This reverts commit 2f751640408a7f73a9100947cbd95ea13fbb8a48. * Remove duplicate * New tune based on data * Panda safety cleanup * Include bus 0 in rx checks * Missed one * bus 6 check * Remove redundant check * Add comments * Bump opendbc * Sync with DBC * Hide LFA icon when disengaged * Little endian * fix comment * more conditions in carcontroller * update pedal signal * update tuning * cleanup carcontroller * bump panda * fix mismatch * alt buttons * little more cleanup * update refs for EV6 new safety param * bump panda Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
class HyundaiFlags(IntFlag):
CANFD_HDA2 = 1
CANFD_ALT_BUTTONS = 2
Hyundai CAN-FD: support ICE alt gears (#26367) * Hyundai: Car Port for Santa Cruz 2022 * bump opendbc * New struct and params for CAN-FD ICE models * fixup! New struct and params for CAN-FD ICE models * bump panda * bump panda * HKG: Car Port for Sportage 2023 * fixup! HKG: Car Port for Sportage 2023 * Kia Sportage 2023: Add FW versions * Longitudinal Control: ICE CAN-FD models * fixup! Longitudinal Control: ICE CAN-FD models * bump panda * fixup! Longitudinal Control: ICE CAN-FD models * Update car info * fixup! Longitudinal Control: ICE CAN-FD models * Gate radar disable behind HDA2 only * Gate radar disable behind camera SCC cars * Update CARS.md * Add FW versions for Santa Cruz 2021 * Test route for Kia Sportage 2023 (openpilot longitudinal enabled) * Test route for Santa Cruz 2021 (openpilot longitudinal enabled) * fixup! Kia Sportage 2023: Add FW versions * HKG: Car Port for Genesis GV70 2023 thanks to @zunichky! Co-authored-by: kyle zunich <zunichky@msu.edu> * Update car info * Add torque param for GENESIS GV70 1ST GEN * Fix CARS.md * Update test route * Remove unnecessary HDA2 checks * Add additional FW versions for Sportage 2023 * Fix Kia Sportage supported MY * Fix MISRA violation * Fix release note * Use IntFlag to gate camera SCC for CAN-FD * Parse 0x1A0 on bus 4 dynamically * bump panda * Car code cleanup * Typo * Add additional 0x1A0 signals to bus 4 * Fix weird bitwise logic * Check 0x1a0 after safety config is set * Revert "Check 0x1a0 after safety config is set" This reverts commit 141bbf79792bcde9cfadbc0680654acf61d8d16f. * Check car list instead * Add GV70 2022 test route * Add fwdRadar FW version for GV70 2022 * Fix CARS.md * Fix CARS.md * Fix CARS.md * new santa cruz route * bump panda to commaai/panda#1031 * bumppanda * some clean up * lets refactor CAMERA_SCC_CAR in another pr * minor clean up * revert car stuff * revert panda * revvy * revvy * it's all ice * revert * revert Co-authored-by: Jason Wen <haibin.wen3@gmail.com> Co-authored-by: kyle zunich <zunichky@msu.edu> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> Co-authored-by: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
3 years ago
CANFD_ALT_GEARS = 4
CANFD_CAMERA_SCC = 8
Hyundai: Car Port for Tucson Hybrid 2022 (#25276) * Hyundai: Car Port for Tucson Hybrid 2022 * Update RELEASES.md * Init gear_msg at the top * FW versions from script * Button send attempt * start with some cleanup * Send button fixed bits * Define all bytes and only send PAUSE/RESUME * Use CRUISE_INFO to cancel cruise and resume * 8-bit counter * Cleanup ish * 8 bit counter * Send at 20ms * Disengage bits * Revert bump submodules * Allow tx on 0x1a0 * Fix byte counts * Send LFA and HDA icons based on engageability * Send cruise buttons only on HDA2 cars for now * Add comments * Add FLAG_HYUNDAI_CANFD_HDA2 flag * Update interface.py * Update carstate.py * Update carstate.py * Update carstate.py * Bump submodules * Bump panda * Bump opendbc * Allow tx with CRUISE_INACTIVE * GEAR has 24 bytes only * Generate car docs * Fix CRUISE_INFO copy * Remove unused class * Add CAN-FD busses to unit test * Bump opendbc * Revert "Add CAN-FD busses to unit test" This reverts commit 2f751640408a7f73a9100947cbd95ea13fbb8a48. * Remove duplicate * New tune based on data * Panda safety cleanup * Include bus 0 in rx checks * Missed one * bus 6 check * Remove redundant check * Add comments * Bump opendbc * Sync with DBC * Hide LFA icon when disengaged * Little endian * fix comment * more conditions in carcontroller * update pedal signal * update tuning * cleanup carcontroller * bump panda * fix mismatch * alt buttons * little more cleanup * update refs for EV6 new safety param * bump panda Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
ALT_LIMITS = 16
ENABLE_BLINKERS = 32
CANFD_ALT_GEARS_2 = 64
SEND_LFA = 128
USE_FCA = 256
CANFD_HDA2_ALT_STEERING = 512
HYBRID = 1024
EV = 2048
Hyundai: Car Port for Tucson Hybrid 2022 (#25276) * Hyundai: Car Port for Tucson Hybrid 2022 * Update RELEASES.md * Init gear_msg at the top * FW versions from script * Button send attempt * start with some cleanup * Send button fixed bits * Define all bytes and only send PAUSE/RESUME * Use CRUISE_INFO to cancel cruise and resume * 8-bit counter * Cleanup ish * 8 bit counter * Send at 20ms * Disengage bits * Revert bump submodules * Allow tx on 0x1a0 * Fix byte counts * Send LFA and HDA icons based on engageability * Send cruise buttons only on HDA2 cars for now * Add comments * Add FLAG_HYUNDAI_CANFD_HDA2 flag * Update interface.py * Update carstate.py * Update carstate.py * Update carstate.py * Bump submodules * Bump panda * Bump opendbc * Allow tx with CRUISE_INACTIVE * GEAR has 24 bytes only * Generate car docs * Fix CRUISE_INFO copy * Remove unused class * Add CAN-FD busses to unit test * Bump opendbc * Revert "Add CAN-FD busses to unit test" This reverts commit 2f751640408a7f73a9100947cbd95ea13fbb8a48. * Remove duplicate * New tune based on data * Panda safety cleanup * Include bus 0 in rx checks * Missed one * bus 6 check * Remove redundant check * Add comments * Bump opendbc * Sync with DBC * Hide LFA icon when disengaged * Little endian * fix comment * more conditions in carcontroller * update pedal signal * update tuning * cleanup carcontroller * bump panda * fix mismatch * alt buttons * little more cleanup * update refs for EV6 new safety param * bump panda Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
class CAR(StrEnum):
# Hyundai
AZERA_6TH_GEN = "HYUNDAI AZERA 6TH GEN"
AZERA_HEV_6TH_GEN = "HYUNDAI AZERA HYBRID 6TH GEN"
ELANTRA = "HYUNDAI ELANTRA 2017"
ELANTRA_GT_I30 = "HYUNDAI I30 N LINE 2019 & GT 2018 DCT"
ELANTRA_2021 = "HYUNDAI ELANTRA 2021"
ELANTRA_HEV_2021 = "HYUNDAI ELANTRA HYBRID 2021"
HYUNDAI_GENESIS = "HYUNDAI GENESIS 2015-2016"
IONIQ = "HYUNDAI IONIQ HYBRID 2017-2019"
IONIQ_HEV_2022 = "HYUNDAI IONIQ HYBRID 2020-2022"
IONIQ_EV_LTD = "HYUNDAI IONIQ ELECTRIC LIMITED 2019"
IONIQ_EV_2020 = "HYUNDAI IONIQ ELECTRIC 2020"
IONIQ_PHEV_2019 = "HYUNDAI IONIQ PLUG-IN HYBRID 2019"
IONIQ_PHEV = "HYUNDAI IONIQ PHEV 2020"
KONA = "HYUNDAI KONA 2020"
KONA_EV = "HYUNDAI KONA ELECTRIC 2019"
KONA_EV_2022 = "HYUNDAI KONA ELECTRIC 2022"
KONA_EV_2ND_GEN = "HYUNDAI KONA ELECTRIC 2ND GEN"
KONA_HEV = "HYUNDAI KONA HYBRID 2020"
SANTA_FE = "HYUNDAI SANTA FE 2019"
SANTA_FE_2022 = "HYUNDAI SANTA FE 2022"
SANTA_FE_HEV_2022 = "HYUNDAI SANTA FE HYBRID 2022"
SANTA_FE_PHEV_2022 = "HYUNDAI SANTA FE PlUG-IN HYBRID 2022"
SONATA = "HYUNDAI SONATA 2020"
SONATA_LF = "HYUNDAI SONATA 2019"
STARIA_4TH_GEN = "HYUNDAI STARIA 4TH GEN"
TUCSON = "HYUNDAI TUCSON 2019"
PALISADE = "HYUNDAI PALISADE 2020"
VELOSTER = "HYUNDAI VELOSTER 2019"
SONATA_HYBRID = "HYUNDAI SONATA HYBRID 2021"
IONIQ_5 = "HYUNDAI IONIQ 5 2022"
IONIQ_6 = "HYUNDAI IONIQ 6 2023"
TUCSON_4TH_GEN = "HYUNDAI TUCSON 4TH GEN"
Hyundai CAN-FD: support 2023 Kia Sportage & 2022 Hyundai Santa Cruz (#25434) * Hyundai: Car Port for Santa Cruz 2022 * bump opendbc * New struct and params for CAN-FD ICE models * fixup! New struct and params for CAN-FD ICE models * bump panda * bump panda * HKG: Car Port for Sportage 2023 * fixup! HKG: Car Port for Sportage 2023 * Kia Sportage 2023: Add FW versions * Longitudinal Control: ICE CAN-FD models * fixup! Longitudinal Control: ICE CAN-FD models * bump panda * fixup! Longitudinal Control: ICE CAN-FD models * Update car info * fixup! Longitudinal Control: ICE CAN-FD models * Gate radar disable behind HDA2 only * Gate radar disable behind camera SCC cars * Update CARS.md * Add FW versions for Santa Cruz 2021 * Test route for Kia Sportage 2023 (openpilot longitudinal enabled) * Test route for Santa Cruz 2021 (openpilot longitudinal enabled) * fixup! Kia Sportage 2023: Add FW versions * HKG: Car Port for Genesis GV70 2023 thanks to @zunichky! Co-authored-by: kyle zunich <zunichky@msu.edu> * Update car info * Add torque param for GENESIS GV70 1ST GEN * Fix CARS.md * Update test route * Remove unnecessary HDA2 checks * Add additional FW versions for Sportage 2023 * Fix Kia Sportage supported MY * Fix MISRA violation * Fix release note * Use IntFlag to gate camera SCC for CAN-FD * Parse 0x1A0 on bus 4 dynamically * bump panda * Car code cleanup * Typo * Add additional 0x1A0 signals to bus 4 * Fix weird bitwise logic * Check 0x1a0 after safety config is set * Revert "Check 0x1a0 after safety config is set" This reverts commit 141bbf79792bcde9cfadbc0680654acf61d8d16f. * Check car list instead * Add GV70 2022 test route * Add fwdRadar FW version for GV70 2022 * Fix CARS.md * Fix CARS.md * Fix CARS.md * new santa cruz route * bump panda to commaai/panda#1031 * bumppanda * some clean up * lets refactor CAMERA_SCC_CAR in another pr * minor clean up * update docs! * GV70 is a radar-SCC car :( (another PR) * fix removed sportage hybrid versions * update docs Co-authored-by: kyle zunich <zunichky@msu.edu> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> Co-authored-by: sshane <shane@smiskol.com>
3 years ago
SANTA_CRUZ_1ST_GEN = "HYUNDAI SANTA CRUZ 1ST GEN"
CUSTIN_1ST_GEN = "HYUNDAI CUSTIN 1ST GEN"
# Kia
KIA_FORTE = "KIA FORTE E 2018 & GT 2021"
KIA_K5_2021 = "KIA K5 2021"
KIA_K5_HEV_2020 = "KIA K5 HYBRID 2020"
KIA_K8_HEV_1ST_GEN = "KIA K8 HYBRID 1ST GEN"
KIA_NIRO_EV = "KIA NIRO EV 2020"
KIA_NIRO_EV_2ND_GEN = "KIA NIRO EV 2ND GEN"
KIA_NIRO_PHEV = "KIA NIRO HYBRID 2019"
KIA_NIRO_PHEV_2022 = "KIA NIRO PLUG-IN HYBRID 2022"
KIA_NIRO_HEV_2021 = "KIA NIRO HYBRID 2021"
KIA_NIRO_HEV_2ND_GEN = "KIA NIRO HYBRID 2ND GEN"
KIA_OPTIMA_G4 = "KIA OPTIMA 4TH GEN"
KIA_OPTIMA_G4_FL = "KIA OPTIMA 4TH GEN FACELIFT"
KIA_OPTIMA_H = "KIA OPTIMA HYBRID 2017 & SPORTS 2019"
KIA_OPTIMA_H_G4_FL = "KIA OPTIMA HYBRID 4TH GEN FACELIFT"
KIA_SELTOS = "KIA SELTOS 2021"
Hyundai CAN-FD: support 2023 Kia Sportage & 2022 Hyundai Santa Cruz (#25434) * Hyundai: Car Port for Santa Cruz 2022 * bump opendbc * New struct and params for CAN-FD ICE models * fixup! New struct and params for CAN-FD ICE models * bump panda * bump panda * HKG: Car Port for Sportage 2023 * fixup! HKG: Car Port for Sportage 2023 * Kia Sportage 2023: Add FW versions * Longitudinal Control: ICE CAN-FD models * fixup! Longitudinal Control: ICE CAN-FD models * bump panda * fixup! Longitudinal Control: ICE CAN-FD models * Update car info * fixup! Longitudinal Control: ICE CAN-FD models * Gate radar disable behind HDA2 only * Gate radar disable behind camera SCC cars * Update CARS.md * Add FW versions for Santa Cruz 2021 * Test route for Kia Sportage 2023 (openpilot longitudinal enabled) * Test route for Santa Cruz 2021 (openpilot longitudinal enabled) * fixup! Kia Sportage 2023: Add FW versions * HKG: Car Port for Genesis GV70 2023 thanks to @zunichky! Co-authored-by: kyle zunich <zunichky@msu.edu> * Update car info * Add torque param for GENESIS GV70 1ST GEN * Fix CARS.md * Update test route * Remove unnecessary HDA2 checks * Add additional FW versions for Sportage 2023 * Fix Kia Sportage supported MY * Fix MISRA violation * Fix release note * Use IntFlag to gate camera SCC for CAN-FD * Parse 0x1A0 on bus 4 dynamically * bump panda * Car code cleanup * Typo * Add additional 0x1A0 signals to bus 4 * Fix weird bitwise logic * Check 0x1a0 after safety config is set * Revert "Check 0x1a0 after safety config is set" This reverts commit 141bbf79792bcde9cfadbc0680654acf61d8d16f. * Check car list instead * Add GV70 2022 test route * Add fwdRadar FW version for GV70 2022 * Fix CARS.md * Fix CARS.md * Fix CARS.md * new santa cruz route * bump panda to commaai/panda#1031 * bumppanda * some clean up * lets refactor CAMERA_SCC_CAR in another pr * minor clean up * update docs! * GV70 is a radar-SCC car :( (another PR) * fix removed sportage hybrid versions * update docs Co-authored-by: kyle zunich <zunichky@msu.edu> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> Co-authored-by: sshane <shane@smiskol.com>
3 years ago
KIA_SPORTAGE_5TH_GEN = "KIA SPORTAGE 5TH GEN"
KIA_SORENTO = "KIA SORENTO GT LINE 2018"
KIA_SORENTO_4TH_GEN = "KIA SORENTO 4TH GEN"
KIA_SORENTO_HEV_4TH_GEN = "KIA SORENTO HYBRID 4TH GEN"
KIA_STINGER = "KIA STINGER GT2 2018"
KIA_STINGER_2022 = "KIA STINGER 2022"
KIA_CEED = "KIA CEED INTRO ED 2019"
KIA_EV6 = "KIA EV6 2022"
KIA_CARNIVAL_4TH_GEN = "KIA CARNIVAL 4TH GEN"
# Genesis
GENESIS_GV60_EV_1ST_GEN = "GENESIS GV60 ELECTRIC 1ST GEN"
GENESIS_G70 = "GENESIS G70 2018"
GENESIS_G70_2020 = "GENESIS G70 2020"
GENESIS_GV70_1ST_GEN = "GENESIS GV70 1ST GEN"
GENESIS_G80 = "GENESIS G80 2017"
GENESIS_G90 = "GENESIS G90 2017"
GENESIS_GV80 = "GENESIS GV80 2023"
5 years ago
class Footnote(Enum):
CANFD = CarFootnote(
"Requires a <a href=\"https://comma.ai/shop/can-fd-panda-kit\" target=\"_blank\">CAN FD panda kit</a> if not using " +
"comma 3X for this <a href=\"https://en.wikipedia.org/wiki/CAN_FD\" target=\"_blank\">CAN FD car</a>.",
Column.MODEL, shop_footnote=False)
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
@dataclass
class HyundaiCarInfo(CarInfo):
docs: update Hyundai packages (#25851) * LKAS is part of same package as SCC for Elantra 2017-2019 https://cdn.dealereprocess.org/cdn/brochures/hyundai/2017-elantra.pdf https://cdn.dealereprocess.org/cdn/brochures/hyundai/2018-elantra.pdf https://cdn.dealereprocess.org/cdn/brochures/hyundai/2019-elantra.pdf * LKAS is standard on all trims for Elantra 2021 https://cdn.dealereprocess.org/cdn/brochures/hyundai/2021-elantra.pdf * LKAS is part of same package as SCC on Genesis 2016 TODO: confirm 2015 https://cdn.dealereprocess.org/cdn/brochures/hyundai/2016-genesis.pdf * LKAS is part of same package as SCC for Ioniq Hybrid 2017-19 Same package 2017-18 https://cdn.dealereprocess.org/cdn/brochures/hyundai/2017-ioniq.pdf https://cdn.dealereprocess.org/cdn/brochures/hyundai/2018-ioniq.pdf SEL and Limited on 2019 https://cdn.dealereprocess.org/cdn/brochures/hyundai/2019-ioniq.pdf * LFA is part of same trim as SCC on Ioniq Hybrid 2020-22 TODO: confirm for 2022 SEL and Limited includes both SCC and LFA https://cdn.dealereprocess.org/cdn/brochures/hyundai/2020-ioniq.pdf https://cdn.dealereprocess.org/cdn/brochures/hyundai/2021-ioniq.pdf * Remove Ioniq Hybrid 2020-21 until harnesses verified All three model years were added in a single PR - need to lookup routes and see if there are users with 2020-21 MY vehicles. https://github.com/commaai/openpilot/pull/22610 * LKAS is on same trim as SCC for Ioniq Electric 2019 https://cdn.dealereprocess.org/cdn/brochures/hyundai/2019-ioniq.pdf * SCC and LKA are on all trims for Ioniq Electric 2020 https://cdn.dealereprocess.org/cdn/brochures/hyundai/2020-ioniq.pdf * LKA and SCC are on same trims for Ioniq Plug-in Hybrid 2019 https://cdn.dealereprocess.org/cdn/brochures/hyundai/2019-ioniq.pdf * SCC and LFA are on all trims for Ioniq Plug-in Hybrid 2020-21 https://cdn.dealereprocess.org/cdn/brochures/hyundai/2020-ioniq.pdf https://cdn.dealereprocess.org/cdn/brochures/hyundai/2021-ioniq.pdf * LKAS is standard on Kona Electric 2018-21 SCC only on Ultimate trim, LKAS on all (2018 UK only) https://www1.hyundai.news/fileadmin/uk/press-kits/20180828_kona_electric/Hyundai_Kona_Electric_-_Technical_data_and_specifications.pdf https://cdn.dealereprocess.org/cdn/brochures/hyundai/2019-kona.pdf https://cdn.dealereprocess.org/cdn/brochures/hyundai/2020-konaelectric.pdf https://cdn.dealereprocess.org/cdn/brochures/hyundai/2021-konaelectric.pdf * LKAS is part of same package as SCC for Sonata 2018-19 Tech Package includes SCC and LKAS https://cdn.dealereprocess.org/cdn/brochures/hyundai/2018-sonata.pdf https://cdn.dealereprocess.org/cdn/brochures/hyundai/2019-sonata.pdf * define LKAS package explicitly * remove package where default * LFA part of same trim as SCC for Seltos 2021 https://cdn.dealereprocess.org/cdn/brochures/kia/2021-seltos.pdf * LKAS is on all trims with SCC for Sorento 2019 https://cdn.dealereprocess.org/cdn/brochures/kia/2019-sorento.pdf * LKAS is on all trims with SCC for Stinger 2018-20 https://cdn.dealereprocess.org/cdn/brochures/kia/2018-stinger.pdf https://cdn.dealereprocess.org/cdn/brochures/kia/2019-stinger.pdf https://cdn.dealereprocess.org/cdn/brochures/kia/2020-stinger.pdf * remove min steer speed definition from docs for Optima 2016 * LFA is included in same trim as SCC for Niro Hybrid 2022 https://cdn.dealereprocess.org/cdn/brochures/kia/2022-niro.pdf * update docs * remove Ioniq Hybrid 2020-21, add note * update docs * remove LKAS for Kona Hybrid 2020 and Niro Hybrid 2021, likely included in SCC trims * update docs * Revert "remove Ioniq Hybrid 2020-21, add note" This reverts commit 62096a8db3fb21771a04e20714ecee906a5c0b34. * Revert "Remove Ioniq Hybrid 2020-21 until harnesses verified" This reverts commit ac773285f76a108c32d8692d12eef18cabcfd023. * update docs
3 years ago
package: str = "Smart Cruise Control (SCC)"
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
def init_make(self, CP: car.CarParams):
if CP.carFingerprint in CANFD_CAR:
self.footnotes.insert(0, Footnote.CANFD)
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
CAR_INFO: dict[str, HyundaiCarInfo | list[HyundaiCarInfo] | None] = {
CAR.AZERA_6TH_GEN: HyundaiCarInfo("Hyundai Azera 2022", "All", car_parts=CarParts.common([CarHarness.hyundai_k])),
CAR.AZERA_HEV_6TH_GEN: [
HyundaiCarInfo("Hyundai Azera Hybrid 2019", "All", car_parts=CarParts.common([CarHarness.hyundai_c])),
HyundaiCarInfo("Hyundai Azera Hybrid 2020", "All", car_parts=CarParts.common([CarHarness.hyundai_k])),
],
CAR.ELANTRA: [
# TODO: 2017-18 could be Hyundai G
HyundaiCarInfo("Hyundai Elantra 2017-18", min_enable_speed=19 * CV.MPH_TO_MS, car_parts=CarParts.common([CarHarness.hyundai_b])),
HyundaiCarInfo("Hyundai Elantra 2019", min_enable_speed=19 * CV.MPH_TO_MS, car_parts=CarParts.common([CarHarness.hyundai_g])),
],
CAR.ELANTRA_GT_I30: [
HyundaiCarInfo("Hyundai Elantra GT 2017-19", car_parts=CarParts.common([CarHarness.hyundai_e])),
HyundaiCarInfo("Hyundai i30 2017-19", car_parts=CarParts.common([CarHarness.hyundai_e])),
],
CAR.ELANTRA_2021: HyundaiCarInfo("Hyundai Elantra 2021-23", video_link="https://youtu.be/_EdYQtV52-c", car_parts=CarParts.common([CarHarness.hyundai_k])),
CAR.ELANTRA_HEV_2021: HyundaiCarInfo("Hyundai Elantra Hybrid 2021-23", video_link="https://youtu.be/_EdYQtV52-c",
car_parts=CarParts.common([CarHarness.hyundai_k])),
CAR.HYUNDAI_GENESIS: [
# TODO: check 2015 packages
HyundaiCarInfo("Hyundai Genesis 2015-16", min_enable_speed=19 * CV.MPH_TO_MS, car_parts=CarParts.common([CarHarness.hyundai_j])),
HyundaiCarInfo("Genesis G80 2017", "All", min_enable_speed=19 * CV.MPH_TO_MS, car_parts=CarParts.common([CarHarness.hyundai_j])),
],
CAR.IONIQ: HyundaiCarInfo("Hyundai Ioniq Hybrid 2017-19", car_parts=CarParts.common([CarHarness.hyundai_c])),
CAR.IONIQ_HEV_2022: HyundaiCarInfo("Hyundai Ioniq Hybrid 2020-22", car_parts=CarParts.common([CarHarness.hyundai_h])), # TODO: confirm 2020-21 harness
CAR.IONIQ_EV_LTD: HyundaiCarInfo("Hyundai Ioniq Electric 2019", car_parts=CarParts.common([CarHarness.hyundai_c])),
CAR.IONIQ_EV_2020: HyundaiCarInfo("Hyundai Ioniq Electric 2020", "All", car_parts=CarParts.common([CarHarness.hyundai_h])),
CAR.IONIQ_PHEV_2019: HyundaiCarInfo("Hyundai Ioniq Plug-in Hybrid 2019", car_parts=CarParts.common([CarHarness.hyundai_c])),
CAR.IONIQ_PHEV: HyundaiCarInfo("Hyundai Ioniq Plug-in Hybrid 2020-22", "All", car_parts=CarParts.common([CarHarness.hyundai_h])),
CAR.KONA: HyundaiCarInfo("Hyundai Kona 2020", car_parts=CarParts.common([CarHarness.hyundai_b])),
CAR.KONA_EV: HyundaiCarInfo("Hyundai Kona Electric 2018-21", car_parts=CarParts.common([CarHarness.hyundai_g])),
CAR.KONA_EV_2022: HyundaiCarInfo("Hyundai Kona Electric 2022-23", car_parts=CarParts.common([CarHarness.hyundai_o])),
CAR.KONA_HEV: HyundaiCarInfo("Hyundai Kona Hybrid 2020", car_parts=CarParts.common([CarHarness.hyundai_i])), # TODO: check packages
# TODO: this is the 2024 US MY, not yet released
CAR.KONA_EV_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.SANTA_FE: HyundaiCarInfo("Hyundai Santa Fe 2019-20", "All", video_link="https://youtu.be/bjDR0YjM__s",
car_parts=CarParts.common([CarHarness.hyundai_d])),
CAR.SANTA_FE_2022: HyundaiCarInfo("Hyundai Santa Fe 2021-23", "All", video_link="https://youtu.be/VnHzSTygTS4",
car_parts=CarParts.common([CarHarness.hyundai_l])),
CAR.SANTA_FE_HEV_2022: HyundaiCarInfo("Hyundai Santa Fe Hybrid 2022-23", "All", car_parts=CarParts.common([CarHarness.hyundai_l])),
CAR.SANTA_FE_PHEV_2022: HyundaiCarInfo("Hyundai Santa Fe Plug-in Hybrid 2022-23", "All", car_parts=CarParts.common([CarHarness.hyundai_l])),
CAR.SONATA: HyundaiCarInfo("Hyundai Sonata 2020-23", "All", video_link="https://www.youtube.com/watch?v=ix63r9kE3Fw",
car_parts=CarParts.common([CarHarness.hyundai_a])),
CAR.STARIA_4TH_GEN: HyundaiCarInfo("Hyundai Staria 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_k])),
CAR.SONATA_LF: HyundaiCarInfo("Hyundai Sonata 2018-19", car_parts=CarParts.common([CarHarness.hyundai_e])),
CAR.TUCSON: [
HyundaiCarInfo("Hyundai Tucson 2021", min_enable_speed=19 * CV.MPH_TO_MS, car_parts=CarParts.common([CarHarness.hyundai_l])),
HyundaiCarInfo("Hyundai Tucson Diesel 2019", car_parts=CarParts.common([CarHarness.hyundai_l])),
],
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
CAR.PALISADE: [
HyundaiCarInfo("Hyundai Palisade 2020-22", "All", video_link="https://youtu.be/TAnDqjF4fDY?t=456", car_parts=CarParts.common([CarHarness.hyundai_h])),
HyundaiCarInfo("Kia Telluride 2020-22", "All", car_parts=CarParts.common([CarHarness.hyundai_h])),
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
],
CAR.VELOSTER: HyundaiCarInfo("Hyundai Veloster 2019-20", min_enable_speed=5. * CV.MPH_TO_MS, car_parts=CarParts.common([CarHarness.hyundai_e])),
CAR.SONATA_HYBRID: HyundaiCarInfo("Hyundai Sonata Hybrid 2020-23", "All", car_parts=CarParts.common([CarHarness.hyundai_a])),
CAR.IONIQ_5: [
HyundaiCarInfo("Hyundai Ioniq 5 (Southeast Asia only) 2022-23", "All", car_parts=CarParts.common([CarHarness.hyundai_q])),
HyundaiCarInfo("Hyundai Ioniq 5 (without HDA II) 2022-23", "Highway Driving Assist", car_parts=CarParts.common([CarHarness.hyundai_k])),
HyundaiCarInfo("Hyundai Ioniq 5 (with HDA II) 2022-23", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_q])),
],
CAR.IONIQ_6: [
HyundaiCarInfo("Hyundai Ioniq 6 (with HDA II) 2023", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_p])),
],
CAR.TUCSON_4TH_GEN: [
HyundaiCarInfo("Hyundai Tucson 2022", car_parts=CarParts.common([CarHarness.hyundai_n])),
HyundaiCarInfo("Hyundai Tucson 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_n])),
HyundaiCarInfo("Hyundai Tucson Hybrid 2022-24", "All", car_parts=CarParts.common([CarHarness.hyundai_n])),
],
CAR.SANTA_CRUZ_1ST_GEN: HyundaiCarInfo("Hyundai Santa Cruz 2022-23", car_parts=CarParts.common([CarHarness.hyundai_n])),
CAR.CUSTIN_1ST_GEN: HyundaiCarInfo("Hyundai Custin 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_k])),
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
# Kia
CAR.KIA_FORTE: [
HyundaiCarInfo("Kia Forte 2019-21", car_parts=CarParts.common([CarHarness.hyundai_g])),
HyundaiCarInfo("Kia Forte 2023", car_parts=CarParts.common([CarHarness.hyundai_e])),
],
CAR.KIA_K5_2021: HyundaiCarInfo("Kia K5 2021-24", car_parts=CarParts.common([CarHarness.hyundai_a])),
CAR.KIA_K5_HEV_2020: HyundaiCarInfo("Kia K5 Hybrid 2020-22", car_parts=CarParts.common([CarHarness.hyundai_a])),
CAR.KIA_K8_HEV_1ST_GEN: HyundaiCarInfo("Kia K8 Hybrid (with HDA II) 2023", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_q])),
CAR.KIA_NIRO_EV: [
HyundaiCarInfo("Kia Niro EV 2019", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", car_parts=CarParts.common([CarHarness.hyundai_h])),
HyundaiCarInfo("Kia Niro EV 2020", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", car_parts=CarParts.common([CarHarness.hyundai_f])),
HyundaiCarInfo("Kia Niro EV 2021", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", car_parts=CarParts.common([CarHarness.hyundai_c])),
HyundaiCarInfo("Kia Niro EV 2022", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", car_parts=CarParts.common([CarHarness.hyundai_h])),
],
CAR.KIA_NIRO_EV_2ND_GEN: HyundaiCarInfo("Kia Niro EV 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_a])),
CAR.KIA_NIRO_PHEV: [
HyundaiCarInfo("Kia Niro Plug-in Hybrid 2018-19", "All", min_enable_speed=10. * CV.MPH_TO_MS, car_parts=CarParts.common([CarHarness.hyundai_c])),
HyundaiCarInfo("Kia Niro Plug-in Hybrid 2020", "All", car_parts=CarParts.common([CarHarness.hyundai_d])),
],
CAR.KIA_NIRO_PHEV_2022: [
HyundaiCarInfo("Kia Niro Plug-in Hybrid 2021", "All", car_parts=CarParts.common([CarHarness.hyundai_d])),
HyundaiCarInfo("Kia Niro Plug-in Hybrid 2022", "All", car_parts=CarParts.common([CarHarness.hyundai_f])),
],
CAR.KIA_NIRO_HEV_2021: [
HyundaiCarInfo("Kia Niro Hybrid 2021", car_parts=CarParts.common([CarHarness.hyundai_d])),
HyundaiCarInfo("Kia Niro Hybrid 2022", car_parts=CarParts.common([CarHarness.hyundai_f])),
],
CAR.KIA_NIRO_HEV_2ND_GEN: HyundaiCarInfo("Kia Niro Hybrid 2023", car_parts=CarParts.common([CarHarness.hyundai_a])),
CAR.KIA_OPTIMA_G4: HyundaiCarInfo("Kia Optima 2017", "Advanced Smart Cruise Control",
car_parts=CarParts.common([CarHarness.hyundai_b])), # TODO: may support 2016, 2018
CAR.KIA_OPTIMA_G4_FL: HyundaiCarInfo("Kia Optima 2019-20", car_parts=CarParts.common([CarHarness.hyundai_g])),
# TODO: may support adjacent years. may have a non-zero minimum steering speed
CAR.KIA_OPTIMA_H: HyundaiCarInfo("Kia Optima Hybrid 2017", "Advanced Smart Cruise Control", car_parts=CarParts.common([CarHarness.hyundai_c])),
CAR.KIA_OPTIMA_H_G4_FL: HyundaiCarInfo("Kia Optima Hybrid 2019", car_parts=CarParts.common([CarHarness.hyundai_h])),
CAR.KIA_SELTOS: HyundaiCarInfo("Kia Seltos 2021", car_parts=CarParts.common([CarHarness.hyundai_a])),
CAR.KIA_SPORTAGE_5TH_GEN: [
HyundaiCarInfo("Kia Sportage 2023", car_parts=CarParts.common([CarHarness.hyundai_n])),
HyundaiCarInfo("Kia Sportage Hybrid 2023", car_parts=CarParts.common([CarHarness.hyundai_n])),
],
CAR.KIA_SORENTO: [
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])),
HyundaiCarInfo("Kia Sorento 2019", video_link="https://www.youtube.com/watch?v=Fkh3s6WHJz8", car_parts=CarParts.common([CarHarness.hyundai_e])),
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
],
CAR.KIA_SORENTO_4TH_GEN: HyundaiCarInfo("Kia Sorento 2021-23", car_parts=CarParts.common([CarHarness.hyundai_k])),
CAR.KIA_SORENTO_HEV_4TH_GEN: [
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])),
],
CAR.KIA_STINGER: HyundaiCarInfo("Kia Stinger 2018-20", video_link="https://www.youtube.com/watch?v=MJ94qoofYw0",
car_parts=CarParts.common([CarHarness.hyundai_c])),
CAR.KIA_STINGER_2022: HyundaiCarInfo("Kia Stinger 2022-23", "All", car_parts=CarParts.common([CarHarness.hyundai_k])),
CAR.KIA_CEED: HyundaiCarInfo("Kia Ceed 2019", car_parts=CarParts.common([CarHarness.hyundai_e])),
CAR.KIA_EV6: [
HyundaiCarInfo("Kia EV6 (Southeast Asia only) 2022-23", "All", car_parts=CarParts.common([CarHarness.hyundai_p])),
HyundaiCarInfo("Kia EV6 (without HDA II) 2022-23", "Highway Driving Assist", car_parts=CarParts.common([CarHarness.hyundai_l])),
HyundaiCarInfo("Kia EV6 (with HDA II) 2022-23", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_p]))
],
CAR.KIA_CARNIVAL_4TH_GEN: [
HyundaiCarInfo("Kia Carnival 2022-24", car_parts=CarParts.common([CarHarness.hyundai_a])),
HyundaiCarInfo("Kia Carnival (China only) 2023", car_parts=CarParts.common([CarHarness.hyundai_k]))
],
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
# Genesis
CAR.GENESIS_GV60_EV_1ST_GEN: [
HyundaiCarInfo("Genesis GV60 (Advanced Trim) 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_a])),
HyundaiCarInfo("Genesis GV60 (Performance Trim) 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_k])),
],
CAR.GENESIS_G70: HyundaiCarInfo("Genesis G70 2018-19", "All", car_parts=CarParts.common([CarHarness.hyundai_f])),
CAR.GENESIS_G70_2020: HyundaiCarInfo("Genesis G70 2020", "All", car_parts=CarParts.common([CarHarness.hyundai_f])),
CAR.GENESIS_GV70_1ST_GEN: [
HyundaiCarInfo("Genesis GV70 (2.5T Trim) 2022-23", "All", car_parts=CarParts.common([CarHarness.hyundai_l])),
HyundaiCarInfo("Genesis GV70 (3.5T Trim) 2022-23", "All", car_parts=CarParts.common([CarHarness.hyundai_m])),
],
CAR.GENESIS_G80: HyundaiCarInfo("Genesis G80 2018-19", "All", car_parts=CarParts.common([CarHarness.hyundai_h])),
CAR.GENESIS_G90: HyundaiCarInfo("Genesis G90 2017-18", "All", car_parts=CarParts.common([CarHarness.hyundai_c])),
CAR.GENESIS_GV80: HyundaiCarInfo("Genesis GV80 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_m])),
Docs: auto-generate supported cars documentation (#23762) * make CAR class enum, and values.py formatting * Revert "make CAR class enum, and values.py formatting" This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a. * stash * add supported packages and model years * don't change model years in fps * move Lexus to info dict and make int enum * remove sometimes wrong model years from name string * use enum names * convert Honda's values * nice names * use name * GM * Mazda, Ford * Hyundai: WIP * finish Hyundai * fix * Nissan * Subaru * Tesla * formatting is for another PR * Chrysler: todo: unify the Pacificas? * do volkswagen * this isn't a zoo * skip enums for now * Update selfdrive/car/volkswagen/values.py Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> * set All * temp cars * auto-generate CARS.md * update type hinting * add generated file * add longitudinal star to cars that support disabling radar * add TODO * add notes * add min_steer_speed exception for hatchback * add minimum steering speeds * Add exceptions and run generator * Missing Telluride * fix Prius v * missing Prius Prime generate * start to convert years to strings * Fixup Hyundai * convert year sets to strings * handle this * missing S3 * Fix and add all missing cars (verified with script * Supported Package fixes * add get_tiered_cars * Check radarOffCan for removing most Honda from op long * Update for Avalon stop and go update on master * Fix missing car params * add my temporary script i'm using to verify new generated DBC add my temporary script i'm using to verify new generated DBC * generate with jinja template * add header and footer * clean up * rename rename * add exceptions. jinja is nice, but why are its loop indexes starting at 1? * add list of known car videos * See how these look * Add nice table formatting for column description Add nice table formatting for column description * generate * consisten br tag * small clean up * temp * Move car videos into CarInfo * add new copy and rename to footnotes * Revert "temp" This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846. clean up * generate * replace with svg * simplify a bit * add footnotes to CarInfo * move some variables to docs.py * Add video link for Acadia * Make Footnote an enum so we don't use random ints * static analysis fixes * move to CARS.md * fix last missing footnote * add to release files * rm test file * use svg generate * fix sorting * not needed * not sure how this got here * remove Sedan/Couple and add Diesel footnote * finish todos * move make specific footnotes to selfdrive/car/*/values.py rename * change to zeros * align bottom to center * Apply some suggestions * Update selfdrive/car/mock/values.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update copy * Try headers + bullet points * somehow better somehow better * finish updating copy * move template and add links to sups * stars shouldn't be clickable that didn't work try this try this this is better * add type hints to CarInfo add more type hinting * optional needs a type and any covers all (?) * move good steering torque to */values.py * dataclasses are much nicer than attr * use tuple * Update docs/cars.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * suggestions * suggestions * suggestions remove * clean up a bit * add more type hints * center stars and remove hardcoding from template * update copy * Add test * Fix types Fix types * add supported cars documentation test * clean up * replace with docs_definitions * Add back Footnote enums * Ah so these are like fstrings! * Update selfdrive/car/CARS_template.md Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * Update year from master merge * Fix longitudinal star from merge * sort properly stars by Column enum * clean up * HKG: Sorry guys * Prius V gets FSR star, like others * Update selfdrive/car/docs.py Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * update comment * No Prius docs change for now Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
3 years ago
}
5 years ago
class Buttons:
NONE = 0
RES_ACCEL = 1
SET_DECEL = 2
GAP_DIST = 3
CANCEL = 4 # on newer models, this is a pause/resume button
5 years ago
def get_platform_codes(fw_versions: list[bytes]) -> set[tuple[bytes, bytes | None]]:
HKG: use platform codes to fuzzy fingerprint (#28531) * get gas/ev/hev from FW (not all correct, poc) * add test for essential ecus for fuzzy fingerprinting * kinda works * stash * clean up * add code * simpler * use the function * test it with our cars * no re no re no re * debugging * handle empty dict * simpl * this is promising start on making existing fingerprinting functions use the config, instead of entirely replacing them * needs to allow 1 match * lay out how this should look * changes * executable * some work * use config * fuzzy ecus * config test * comment and some clean up * test platform codes * use regex, simpler and fixes bug * in func * rm bad func * typing for new func and remove old from dc * todo done * tested! * remove fake platform codes * thought we needed this, but actually... * not needed * not applicable any more * use config for essential ecus * first draft of test to make adding/removing fuzzy FP platform intentional * compile * clean up test * even cleaner * fix default ecus type * temp fix * this is mostly in tests now * test every fuzzy ecu fw returns one platform code * experiment with dates * Revert "experiment with dates" This reverts commit 3251b9cc5c3ca41ca92c8b75ad9b2234b720aa0b. * clean that up * comment * test * work on all cars * fix fuzz_fw_fingerprint * comment * get first by search * bit more clean up * and more * use compiled pattern for nicer syntax * default * flip dat around, much cleaner * clean up hyundai test a bit * flip order same here * rename test and flip subTest * fix pylint * revert fw changes revert fw changes * line * add original functions to test * needs to be a list * cmt * draft (need to count one ecu as a match) * tiny clean up * todo: date range * only in notebook * remove comment (still can be either list or set) * same, only notebook * more consistent signature * copilot inspired * copilot no good * test for date parsing * better name * good, now we don't have to worry about the dates mismatching in another test/logic * comment up+ * some stuff * clean up fix test fix test * test * comment * use utils * clean up (utils are cleaner and less buggy) * clean up (utils are cleaner and less buggy) * fixup test * use a dash (prettier) and remove some platforms that can fingerprint now! * compile global pattern * same as what we do in values * remove comments * fuzzy_get_platform_codes is one or none here * more clean up * sort imports * woah woah woah * add comment * fix reassigning different types * add types * adapt fuzzy test recently added (nice it caught this!) * update lock * options comments * stash * comments and fixes * better comments * better * test: run on exact fuzzy matching logic, same results! * use match_fw_to_car * test all fw * ex * unused random * this is a possibility * this is more clear * fix * revert * revert to needing both ECUs to match to reduce false positives, test * fix excluded platform test :( but it's ok * add comment * we actually want to only test fuzzy ecus to make it explicit * fix mypy * comment for tomorrow * just add matches with fuzzy FP * add comment * this was the cleanest I could think of, but still working on it. not very easy to understand * think this is better, but also worse... * comment: reframing how this works * revert back to what we did before * was swapped * else set * remove old comment * fixes from merge * remove fuzzy_min_match_count from this pr * fix static analysis * also unused * different method first draft * copy existing fuzzy func * check all possible ecus exist, only platform codes, slightly refactor main loop * fix * Revert recent Revert "fix" This reverts commit 5cdb7bda835f1e48e750ab4195e891afe08e11ea. Revert "check all possible ecus exist, only platform codes, slightly refactor main loop" This reverts commit d3e918fa20fa4ce881445850f5f7428a3c11adf8. Revert "copy existing fuzzy func" This reverts commit 34c8c0545097c84f55f4b4f61907606c93760ddd. Revert "different method first draft" This reverts commit b91139055d7d1802c1eb726504798c156a183c9c. * new func * fixup test * remove changes from v1 from fw_versions.py * clean up a bit * return part as part of code * fix test * add original fuzzy function * add an ecu match if the date is within range (or date doesn't exist) * add format for what we're going to do * not working stash * the exact matching function does more of what we want with less code and less custom logic * we don't care about found versions, only codes and dates * actually we do have an exception * this works pretty nicely now * up here * this is better * some minor clean up * old function=now junk * fix platform code test * remove old platform code function * now rename _new to * use FW_QUERY_CONFIG * clean up imports * rename that too * one line * correct typing correct typing * draft tests * so that works * fixup excluded platform test now too * this is tested by excluded platform test * test parts and dates * remove old comment * old import * take platform code stuff out of FwQueryConfig * fix test * revert debug script * flip order * make this a set by default * revert this part * correct typing * clean up comments * clean that test up too/pylint * combine these three tests ina clean way * not right * more general * be consistent with quotes * comment * comment * comment in fw_versions * flip order * this is more readable * could test all this, but it's tested in test_hyundai and doesn't do a lot here * only assert brands which use this * invalidate all CAN FD ICE and hybrid * tuple * can get away without filtering * add comment reasons * fix * some review suggestions * this works (first draft) * this is better * script to print platform codes and dates * sanity check for dates are in correct ecus and platforms * mypy * better variable name and comment * rename * same * slightly better name * subset * exclude platforms and live car without dates * consistent * self explan * better name * test to make sure the functions agree * clean that up * comment * we get other responses from queries not in DB, only check any * not used or typed
2 years ago
# Returns unique, platform-specific identification codes for a set of versions
codes = set() # (code-Optional[part], date)
for fw in fw_versions:
HKG: use platform codes to fuzzy fingerprint (#28531) * get gas/ev/hev from FW (not all correct, poc) * add test for essential ecus for fuzzy fingerprinting * kinda works * stash * clean up * add code * simpler * use the function * test it with our cars * no re no re no re * debugging * handle empty dict * simpl * this is promising start on making existing fingerprinting functions use the config, instead of entirely replacing them * needs to allow 1 match * lay out how this should look * changes * executable * some work * use config * fuzzy ecus * config test * comment and some clean up * test platform codes * use regex, simpler and fixes bug * in func * rm bad func * typing for new func and remove old from dc * todo done * tested! * remove fake platform codes * thought we needed this, but actually... * not needed * not applicable any more * use config for essential ecus * first draft of test to make adding/removing fuzzy FP platform intentional * compile * clean up test * even cleaner * fix default ecus type * temp fix * this is mostly in tests now * test every fuzzy ecu fw returns one platform code * experiment with dates * Revert "experiment with dates" This reverts commit 3251b9cc5c3ca41ca92c8b75ad9b2234b720aa0b. * clean that up * comment * test * work on all cars * fix fuzz_fw_fingerprint * comment * get first by search * bit more clean up * and more * use compiled pattern for nicer syntax * default * flip dat around, much cleaner * clean up hyundai test a bit * flip order same here * rename test and flip subTest * fix pylint * revert fw changes revert fw changes * line * add original functions to test * needs to be a list * cmt * draft (need to count one ecu as a match) * tiny clean up * todo: date range * only in notebook * remove comment (still can be either list or set) * same, only notebook * more consistent signature * copilot inspired * copilot no good * test for date parsing * better name * good, now we don't have to worry about the dates mismatching in another test/logic * comment up+ * some stuff * clean up fix test fix test * test * comment * use utils * clean up (utils are cleaner and less buggy) * clean up (utils are cleaner and less buggy) * fixup test * use a dash (prettier) and remove some platforms that can fingerprint now! * compile global pattern * same as what we do in values * remove comments * fuzzy_get_platform_codes is one or none here * more clean up * sort imports * woah woah woah * add comment * fix reassigning different types * add types * adapt fuzzy test recently added (nice it caught this!) * update lock * options comments * stash * comments and fixes * better comments * better * test: run on exact fuzzy matching logic, same results! * use match_fw_to_car * test all fw * ex * unused random * this is a possibility * this is more clear * fix * revert * revert to needing both ECUs to match to reduce false positives, test * fix excluded platform test :( but it's ok * add comment * we actually want to only test fuzzy ecus to make it explicit * fix mypy * comment for tomorrow * just add matches with fuzzy FP * add comment * this was the cleanest I could think of, but still working on it. not very easy to understand * think this is better, but also worse... * comment: reframing how this works * revert back to what we did before * was swapped * else set * remove old comment * fixes from merge * remove fuzzy_min_match_count from this pr * fix static analysis * also unused * different method first draft * copy existing fuzzy func * check all possible ecus exist, only platform codes, slightly refactor main loop * fix * Revert recent Revert "fix" This reverts commit 5cdb7bda835f1e48e750ab4195e891afe08e11ea. Revert "check all possible ecus exist, only platform codes, slightly refactor main loop" This reverts commit d3e918fa20fa4ce881445850f5f7428a3c11adf8. Revert "copy existing fuzzy func" This reverts commit 34c8c0545097c84f55f4b4f61907606c93760ddd. Revert "different method first draft" This reverts commit b91139055d7d1802c1eb726504798c156a183c9c. * new func * fixup test * remove changes from v1 from fw_versions.py * clean up a bit * return part as part of code * fix test * add original fuzzy function * add an ecu match if the date is within range (or date doesn't exist) * add format for what we're going to do * not working stash * the exact matching function does more of what we want with less code and less custom logic * we don't care about found versions, only codes and dates * actually we do have an exception * this works pretty nicely now * up here * this is better * some minor clean up * old function=now junk * fix platform code test * remove old platform code function * now rename _new to * use FW_QUERY_CONFIG * clean up imports * rename that too * one line * correct typing correct typing * draft tests * so that works * fixup excluded platform test now too * this is tested by excluded platform test * test parts and dates * remove old comment * old import * take platform code stuff out of FwQueryConfig * fix test * revert debug script * flip order * make this a set by default * revert this part * correct typing * clean up comments * clean that test up too/pylint * combine these three tests ina clean way * not right * more general * be consistent with quotes * comment * comment * comment in fw_versions * flip order * this is more readable * could test all this, but it's tested in test_hyundai and doesn't do a lot here * only assert brands which use this * invalidate all CAN FD ICE and hybrid * tuple * can get away without filtering * add comment reasons * fix * some review suggestions * this works (first draft) * this is better * script to print platform codes and dates * sanity check for dates are in correct ecus and platforms * mypy * better variable name and comment * rename * same * slightly better name * subset * exclude platforms and live car without dates * consistent * self explan * better name * test to make sure the functions agree * clean that up * comment * we get other responses from queries not in DB, only check any * not used or typed
2 years ago
code_match = PLATFORM_CODE_FW_PATTERN.search(fw)
part_match = PART_NUMBER_FW_PATTERN.search(fw)
date_match = DATE_FW_PATTERN.search(fw)
if code_match is not None:
HKG: use platform codes to fuzzy fingerprint (#28531) * get gas/ev/hev from FW (not all correct, poc) * add test for essential ecus for fuzzy fingerprinting * kinda works * stash * clean up * add code * simpler * use the function * test it with our cars * no re no re no re * debugging * handle empty dict * simpl * this is promising start on making existing fingerprinting functions use the config, instead of entirely replacing them * needs to allow 1 match * lay out how this should look * changes * executable * some work * use config * fuzzy ecus * config test * comment and some clean up * test platform codes * use regex, simpler and fixes bug * in func * rm bad func * typing for new func and remove old from dc * todo done * tested! * remove fake platform codes * thought we needed this, but actually... * not needed * not applicable any more * use config for essential ecus * first draft of test to make adding/removing fuzzy FP platform intentional * compile * clean up test * even cleaner * fix default ecus type * temp fix * this is mostly in tests now * test every fuzzy ecu fw returns one platform code * experiment with dates * Revert "experiment with dates" This reverts commit 3251b9cc5c3ca41ca92c8b75ad9b2234b720aa0b. * clean that up * comment * test * work on all cars * fix fuzz_fw_fingerprint * comment * get first by search * bit more clean up * and more * use compiled pattern for nicer syntax * default * flip dat around, much cleaner * clean up hyundai test a bit * flip order same here * rename test and flip subTest * fix pylint * revert fw changes revert fw changes * line * add original functions to test * needs to be a list * cmt * draft (need to count one ecu as a match) * tiny clean up * todo: date range * only in notebook * remove comment (still can be either list or set) * same, only notebook * more consistent signature * copilot inspired * copilot no good * test for date parsing * better name * good, now we don't have to worry about the dates mismatching in another test/logic * comment up+ * some stuff * clean up fix test fix test * test * comment * use utils * clean up (utils are cleaner and less buggy) * clean up (utils are cleaner and less buggy) * fixup test * use a dash (prettier) and remove some platforms that can fingerprint now! * compile global pattern * same as what we do in values * remove comments * fuzzy_get_platform_codes is one or none here * more clean up * sort imports * woah woah woah * add comment * fix reassigning different types * add types * adapt fuzzy test recently added (nice it caught this!) * update lock * options comments * stash * comments and fixes * better comments * better * test: run on exact fuzzy matching logic, same results! * use match_fw_to_car * test all fw * ex * unused random * this is a possibility * this is more clear * fix * revert * revert to needing both ECUs to match to reduce false positives, test * fix excluded platform test :( but it's ok * add comment * we actually want to only test fuzzy ecus to make it explicit * fix mypy * comment for tomorrow * just add matches with fuzzy FP * add comment * this was the cleanest I could think of, but still working on it. not very easy to understand * think this is better, but also worse... * comment: reframing how this works * revert back to what we did before * was swapped * else set * remove old comment * fixes from merge * remove fuzzy_min_match_count from this pr * fix static analysis * also unused * different method first draft * copy existing fuzzy func * check all possible ecus exist, only platform codes, slightly refactor main loop * fix * Revert recent Revert "fix" This reverts commit 5cdb7bda835f1e48e750ab4195e891afe08e11ea. Revert "check all possible ecus exist, only platform codes, slightly refactor main loop" This reverts commit d3e918fa20fa4ce881445850f5f7428a3c11adf8. Revert "copy existing fuzzy func" This reverts commit 34c8c0545097c84f55f4b4f61907606c93760ddd. Revert "different method first draft" This reverts commit b91139055d7d1802c1eb726504798c156a183c9c. * new func * fixup test * remove changes from v1 from fw_versions.py * clean up a bit * return part as part of code * fix test * add original fuzzy function * add an ecu match if the date is within range (or date doesn't exist) * add format for what we're going to do * not working stash * the exact matching function does more of what we want with less code and less custom logic * we don't care about found versions, only codes and dates * actually we do have an exception * this works pretty nicely now * up here * this is better * some minor clean up * old function=now junk * fix platform code test * remove old platform code function * now rename _new to * use FW_QUERY_CONFIG * clean up imports * rename that too * one line * correct typing correct typing * draft tests * so that works * fixup excluded platform test now too * this is tested by excluded platform test * test parts and dates * remove old comment * old import * take platform code stuff out of FwQueryConfig * fix test * revert debug script * flip order * make this a set by default * revert this part * correct typing * clean up comments * clean that test up too/pylint * combine these three tests ina clean way * not right * more general * be consistent with quotes * comment * comment * comment in fw_versions * flip order * this is more readable * could test all this, but it's tested in test_hyundai and doesn't do a lot here * only assert brands which use this * invalidate all CAN FD ICE and hybrid * tuple * can get away without filtering * add comment reasons * fix * some review suggestions * this works (first draft) * this is better * script to print platform codes and dates * sanity check for dates are in correct ecus and platforms * mypy * better variable name and comment * rename * same * slightly better name * subset * exclude platforms and live car without dates * consistent * self explan * better name * test to make sure the functions agree * clean that up * comment * we get other responses from queries not in DB, only check any * not used or typed
2 years ago
code: bytes = code_match.group()
part = part_match.group() if part_match else None
date = date_match.group() if date_match else None
HKG: use platform codes to fuzzy fingerprint (#28531) * get gas/ev/hev from FW (not all correct, poc) * add test for essential ecus for fuzzy fingerprinting * kinda works * stash * clean up * add code * simpler * use the function * test it with our cars * no re no re no re * debugging * handle empty dict * simpl * this is promising start on making existing fingerprinting functions use the config, instead of entirely replacing them * needs to allow 1 match * lay out how this should look * changes * executable * some work * use config * fuzzy ecus * config test * comment and some clean up * test platform codes * use regex, simpler and fixes bug * in func * rm bad func * typing for new func and remove old from dc * todo done * tested! * remove fake platform codes * thought we needed this, but actually... * not needed * not applicable any more * use config for essential ecus * first draft of test to make adding/removing fuzzy FP platform intentional * compile * clean up test * even cleaner * fix default ecus type * temp fix * this is mostly in tests now * test every fuzzy ecu fw returns one platform code * experiment with dates * Revert "experiment with dates" This reverts commit 3251b9cc5c3ca41ca92c8b75ad9b2234b720aa0b. * clean that up * comment * test * work on all cars * fix fuzz_fw_fingerprint * comment * get first by search * bit more clean up * and more * use compiled pattern for nicer syntax * default * flip dat around, much cleaner * clean up hyundai test a bit * flip order same here * rename test and flip subTest * fix pylint * revert fw changes revert fw changes * line * add original functions to test * needs to be a list * cmt * draft (need to count one ecu as a match) * tiny clean up * todo: date range * only in notebook * remove comment (still can be either list or set) * same, only notebook * more consistent signature * copilot inspired * copilot no good * test for date parsing * better name * good, now we don't have to worry about the dates mismatching in another test/logic * comment up+ * some stuff * clean up fix test fix test * test * comment * use utils * clean up (utils are cleaner and less buggy) * clean up (utils are cleaner and less buggy) * fixup test * use a dash (prettier) and remove some platforms that can fingerprint now! * compile global pattern * same as what we do in values * remove comments * fuzzy_get_platform_codes is one or none here * more clean up * sort imports * woah woah woah * add comment * fix reassigning different types * add types * adapt fuzzy test recently added (nice it caught this!) * update lock * options comments * stash * comments and fixes * better comments * better * test: run on exact fuzzy matching logic, same results! * use match_fw_to_car * test all fw * ex * unused random * this is a possibility * this is more clear * fix * revert * revert to needing both ECUs to match to reduce false positives, test * fix excluded platform test :( but it's ok * add comment * we actually want to only test fuzzy ecus to make it explicit * fix mypy * comment for tomorrow * just add matches with fuzzy FP * add comment * this was the cleanest I could think of, but still working on it. not very easy to understand * think this is better, but also worse... * comment: reframing how this works * revert back to what we did before * was swapped * else set * remove old comment * fixes from merge * remove fuzzy_min_match_count from this pr * fix static analysis * also unused * different method first draft * copy existing fuzzy func * check all possible ecus exist, only platform codes, slightly refactor main loop * fix * Revert recent Revert "fix" This reverts commit 5cdb7bda835f1e48e750ab4195e891afe08e11ea. Revert "check all possible ecus exist, only platform codes, slightly refactor main loop" This reverts commit d3e918fa20fa4ce881445850f5f7428a3c11adf8. Revert "copy existing fuzzy func" This reverts commit 34c8c0545097c84f55f4b4f61907606c93760ddd. Revert "different method first draft" This reverts commit b91139055d7d1802c1eb726504798c156a183c9c. * new func * fixup test * remove changes from v1 from fw_versions.py * clean up a bit * return part as part of code * fix test * add original fuzzy function * add an ecu match if the date is within range (or date doesn't exist) * add format for what we're going to do * not working stash * the exact matching function does more of what we want with less code and less custom logic * we don't care about found versions, only codes and dates * actually we do have an exception * this works pretty nicely now * up here * this is better * some minor clean up * old function=now junk * fix platform code test * remove old platform code function * now rename _new to * use FW_QUERY_CONFIG * clean up imports * rename that too * one line * correct typing correct typing * draft tests * so that works * fixup excluded platform test now too * this is tested by excluded platform test * test parts and dates * remove old comment * old import * take platform code stuff out of FwQueryConfig * fix test * revert debug script * flip order * make this a set by default * revert this part * correct typing * clean up comments * clean that test up too/pylint * combine these three tests ina clean way * not right * more general * be consistent with quotes * comment * comment * comment in fw_versions * flip order * this is more readable * could test all this, but it's tested in test_hyundai and doesn't do a lot here * only assert brands which use this * invalidate all CAN FD ICE and hybrid * tuple * can get away without filtering * add comment reasons * fix * some review suggestions * this works (first draft) * this is better * script to print platform codes and dates * sanity check for dates are in correct ecus and platforms * mypy * better variable name and comment * rename * same * slightly better name * subset * exclude platforms and live car without dates * consistent * self explan * better name * test to make sure the functions agree * clean that up * comment * we get other responses from queries not in DB, only check any * not used or typed
2 years ago
if part is not None:
# part number starts with generic ECU part type, add what is specific to platform
code += b"-" + part[-5:]
HKG: use platform codes to fuzzy fingerprint (#28531) * get gas/ev/hev from FW (not all correct, poc) * add test for essential ecus for fuzzy fingerprinting * kinda works * stash * clean up * add code * simpler * use the function * test it with our cars * no re no re no re * debugging * handle empty dict * simpl * this is promising start on making existing fingerprinting functions use the config, instead of entirely replacing them * needs to allow 1 match * lay out how this should look * changes * executable * some work * use config * fuzzy ecus * config test * comment and some clean up * test platform codes * use regex, simpler and fixes bug * in func * rm bad func * typing for new func and remove old from dc * todo done * tested! * remove fake platform codes * thought we needed this, but actually... * not needed * not applicable any more * use config for essential ecus * first draft of test to make adding/removing fuzzy FP platform intentional * compile * clean up test * even cleaner * fix default ecus type * temp fix * this is mostly in tests now * test every fuzzy ecu fw returns one platform code * experiment with dates * Revert "experiment with dates" This reverts commit 3251b9cc5c3ca41ca92c8b75ad9b2234b720aa0b. * clean that up * comment * test * work on all cars * fix fuzz_fw_fingerprint * comment * get first by search * bit more clean up * and more * use compiled pattern for nicer syntax * default * flip dat around, much cleaner * clean up hyundai test a bit * flip order same here * rename test and flip subTest * fix pylint * revert fw changes revert fw changes * line * add original functions to test * needs to be a list * cmt * draft (need to count one ecu as a match) * tiny clean up * todo: date range * only in notebook * remove comment (still can be either list or set) * same, only notebook * more consistent signature * copilot inspired * copilot no good * test for date parsing * better name * good, now we don't have to worry about the dates mismatching in another test/logic * comment up+ * some stuff * clean up fix test fix test * test * comment * use utils * clean up (utils are cleaner and less buggy) * clean up (utils are cleaner and less buggy) * fixup test * use a dash (prettier) and remove some platforms that can fingerprint now! * compile global pattern * same as what we do in values * remove comments * fuzzy_get_platform_codes is one or none here * more clean up * sort imports * woah woah woah * add comment * fix reassigning different types * add types * adapt fuzzy test recently added (nice it caught this!) * update lock * options comments * stash * comments and fixes * better comments * better * test: run on exact fuzzy matching logic, same results! * use match_fw_to_car * test all fw * ex * unused random * this is a possibility * this is more clear * fix * revert * revert to needing both ECUs to match to reduce false positives, test * fix excluded platform test :( but it's ok * add comment * we actually want to only test fuzzy ecus to make it explicit * fix mypy * comment for tomorrow * just add matches with fuzzy FP * add comment * this was the cleanest I could think of, but still working on it. not very easy to understand * think this is better, but also worse... * comment: reframing how this works * revert back to what we did before * was swapped * else set * remove old comment * fixes from merge * remove fuzzy_min_match_count from this pr * fix static analysis * also unused * different method first draft * copy existing fuzzy func * check all possible ecus exist, only platform codes, slightly refactor main loop * fix * Revert recent Revert "fix" This reverts commit 5cdb7bda835f1e48e750ab4195e891afe08e11ea. Revert "check all possible ecus exist, only platform codes, slightly refactor main loop" This reverts commit d3e918fa20fa4ce881445850f5f7428a3c11adf8. Revert "copy existing fuzzy func" This reverts commit 34c8c0545097c84f55f4b4f61907606c93760ddd. Revert "different method first draft" This reverts commit b91139055d7d1802c1eb726504798c156a183c9c. * new func * fixup test * remove changes from v1 from fw_versions.py * clean up a bit * return part as part of code * fix test * add original fuzzy function * add an ecu match if the date is within range (or date doesn't exist) * add format for what we're going to do * not working stash * the exact matching function does more of what we want with less code and less custom logic * we don't care about found versions, only codes and dates * actually we do have an exception * this works pretty nicely now * up here * this is better * some minor clean up * old function=now junk * fix platform code test * remove old platform code function * now rename _new to * use FW_QUERY_CONFIG * clean up imports * rename that too * one line * correct typing correct typing * draft tests * so that works * fixup excluded platform test now too * this is tested by excluded platform test * test parts and dates * remove old comment * old import * take platform code stuff out of FwQueryConfig * fix test * revert debug script * flip order * make this a set by default * revert this part * correct typing * clean up comments * clean that test up too/pylint * combine these three tests ina clean way * not right * more general * be consistent with quotes * comment * comment * comment in fw_versions * flip order * this is more readable * could test all this, but it's tested in test_hyundai and doesn't do a lot here * only assert brands which use this * invalidate all CAN FD ICE and hybrid * tuple * can get away without filtering * add comment reasons * fix * some review suggestions * this works (first draft) * this is better * script to print platform codes and dates * sanity check for dates are in correct ecus and platforms * mypy * better variable name and comment * rename * same * slightly better name * subset * exclude platforms and live car without dates * consistent * self explan * better name * test to make sure the functions agree * clean that up * comment * we get other responses from queries not in DB, only check any * not used or typed
2 years ago
codes.add((code, date))
return codes
def match_fw_to_car_fuzzy(live_fw_versions, offline_fw_versions) -> set[str]:
HKG: use platform codes to fuzzy fingerprint (#28531) * get gas/ev/hev from FW (not all correct, poc) * add test for essential ecus for fuzzy fingerprinting * kinda works * stash * clean up * add code * simpler * use the function * test it with our cars * no re no re no re * debugging * handle empty dict * simpl * this is promising start on making existing fingerprinting functions use the config, instead of entirely replacing them * needs to allow 1 match * lay out how this should look * changes * executable * some work * use config * fuzzy ecus * config test * comment and some clean up * test platform codes * use regex, simpler and fixes bug * in func * rm bad func * typing for new func and remove old from dc * todo done * tested! * remove fake platform codes * thought we needed this, but actually... * not needed * not applicable any more * use config for essential ecus * first draft of test to make adding/removing fuzzy FP platform intentional * compile * clean up test * even cleaner * fix default ecus type * temp fix * this is mostly in tests now * test every fuzzy ecu fw returns one platform code * experiment with dates * Revert "experiment with dates" This reverts commit 3251b9cc5c3ca41ca92c8b75ad9b2234b720aa0b. * clean that up * comment * test * work on all cars * fix fuzz_fw_fingerprint * comment * get first by search * bit more clean up * and more * use compiled pattern for nicer syntax * default * flip dat around, much cleaner * clean up hyundai test a bit * flip order same here * rename test and flip subTest * fix pylint * revert fw changes revert fw changes * line * add original functions to test * needs to be a list * cmt * draft (need to count one ecu as a match) * tiny clean up * todo: date range * only in notebook * remove comment (still can be either list or set) * same, only notebook * more consistent signature * copilot inspired * copilot no good * test for date parsing * better name * good, now we don't have to worry about the dates mismatching in another test/logic * comment up+ * some stuff * clean up fix test fix test * test * comment * use utils * clean up (utils are cleaner and less buggy) * clean up (utils are cleaner and less buggy) * fixup test * use a dash (prettier) and remove some platforms that can fingerprint now! * compile global pattern * same as what we do in values * remove comments * fuzzy_get_platform_codes is one or none here * more clean up * sort imports * woah woah woah * add comment * fix reassigning different types * add types * adapt fuzzy test recently added (nice it caught this!) * update lock * options comments * stash * comments and fixes * better comments * better * test: run on exact fuzzy matching logic, same results! * use match_fw_to_car * test all fw * ex * unused random * this is a possibility * this is more clear * fix * revert * revert to needing both ECUs to match to reduce false positives, test * fix excluded platform test :( but it's ok * add comment * we actually want to only test fuzzy ecus to make it explicit * fix mypy * comment for tomorrow * just add matches with fuzzy FP * add comment * this was the cleanest I could think of, but still working on it. not very easy to understand * think this is better, but also worse... * comment: reframing how this works * revert back to what we did before * was swapped * else set * remove old comment * fixes from merge * remove fuzzy_min_match_count from this pr * fix static analysis * also unused * different method first draft * copy existing fuzzy func * check all possible ecus exist, only platform codes, slightly refactor main loop * fix * Revert recent Revert "fix" This reverts commit 5cdb7bda835f1e48e750ab4195e891afe08e11ea. Revert "check all possible ecus exist, only platform codes, slightly refactor main loop" This reverts commit d3e918fa20fa4ce881445850f5f7428a3c11adf8. Revert "copy existing fuzzy func" This reverts commit 34c8c0545097c84f55f4b4f61907606c93760ddd. Revert "different method first draft" This reverts commit b91139055d7d1802c1eb726504798c156a183c9c. * new func * fixup test * remove changes from v1 from fw_versions.py * clean up a bit * return part as part of code * fix test * add original fuzzy function * add an ecu match if the date is within range (or date doesn't exist) * add format for what we're going to do * not working stash * the exact matching function does more of what we want with less code and less custom logic * we don't care about found versions, only codes and dates * actually we do have an exception * this works pretty nicely now * up here * this is better * some minor clean up * old function=now junk * fix platform code test * remove old platform code function * now rename _new to * use FW_QUERY_CONFIG * clean up imports * rename that too * one line * correct typing correct typing * draft tests * so that works * fixup excluded platform test now too * this is tested by excluded platform test * test parts and dates * remove old comment * old import * take platform code stuff out of FwQueryConfig * fix test * revert debug script * flip order * make this a set by default * revert this part * correct typing * clean up comments * clean that test up too/pylint * combine these three tests ina clean way * not right * more general * be consistent with quotes * comment * comment * comment in fw_versions * flip order * this is more readable * could test all this, but it's tested in test_hyundai and doesn't do a lot here * only assert brands which use this * invalidate all CAN FD ICE and hybrid * tuple * can get away without filtering * add comment reasons * fix * some review suggestions * this works (first draft) * this is better * script to print platform codes and dates * sanity check for dates are in correct ecus and platforms * mypy * better variable name and comment * rename * same * slightly better name * subset * exclude platforms and live car without dates * consistent * self explan * better name * test to make sure the functions agree * clean that up * comment * we get other responses from queries not in DB, only check any * not used or typed
2 years ago
# Non-electric CAN FD platforms often do not have platform code specifiers needed
# to distinguish between hybrid and ICE. All EVs so far are either exclusively
# electric or specify electric in the platform code.
fuzzy_platform_blacklist = {str(c) for c in (CANFD_CAR - EV_CAR - CANFD_FUZZY_WHITELIST)}
candidates: set[str] = set()
for candidate, fws in offline_fw_versions.items():
HKG: use platform codes to fuzzy fingerprint (#28531) * get gas/ev/hev from FW (not all correct, poc) * add test for essential ecus for fuzzy fingerprinting * kinda works * stash * clean up * add code * simpler * use the function * test it with our cars * no re no re no re * debugging * handle empty dict * simpl * this is promising start on making existing fingerprinting functions use the config, instead of entirely replacing them * needs to allow 1 match * lay out how this should look * changes * executable * some work * use config * fuzzy ecus * config test * comment and some clean up * test platform codes * use regex, simpler and fixes bug * in func * rm bad func * typing for new func and remove old from dc * todo done * tested! * remove fake platform codes * thought we needed this, but actually... * not needed * not applicable any more * use config for essential ecus * first draft of test to make adding/removing fuzzy FP platform intentional * compile * clean up test * even cleaner * fix default ecus type * temp fix * this is mostly in tests now * test every fuzzy ecu fw returns one platform code * experiment with dates * Revert "experiment with dates" This reverts commit 3251b9cc5c3ca41ca92c8b75ad9b2234b720aa0b. * clean that up * comment * test * work on all cars * fix fuzz_fw_fingerprint * comment * get first by search * bit more clean up * and more * use compiled pattern for nicer syntax * default * flip dat around, much cleaner * clean up hyundai test a bit * flip order same here * rename test and flip subTest * fix pylint * revert fw changes revert fw changes * line * add original functions to test * needs to be a list * cmt * draft (need to count one ecu as a match) * tiny clean up * todo: date range * only in notebook * remove comment (still can be either list or set) * same, only notebook * more consistent signature * copilot inspired * copilot no good * test for date parsing * better name * good, now we don't have to worry about the dates mismatching in another test/logic * comment up+ * some stuff * clean up fix test fix test * test * comment * use utils * clean up (utils are cleaner and less buggy) * clean up (utils are cleaner and less buggy) * fixup test * use a dash (prettier) and remove some platforms that can fingerprint now! * compile global pattern * same as what we do in values * remove comments * fuzzy_get_platform_codes is one or none here * more clean up * sort imports * woah woah woah * add comment * fix reassigning different types * add types * adapt fuzzy test recently added (nice it caught this!) * update lock * options comments * stash * comments and fixes * better comments * better * test: run on exact fuzzy matching logic, same results! * use match_fw_to_car * test all fw * ex * unused random * this is a possibility * this is more clear * fix * revert * revert to needing both ECUs to match to reduce false positives, test * fix excluded platform test :( but it's ok * add comment * we actually want to only test fuzzy ecus to make it explicit * fix mypy * comment for tomorrow * just add matches with fuzzy FP * add comment * this was the cleanest I could think of, but still working on it. not very easy to understand * think this is better, but also worse... * comment: reframing how this works * revert back to what we did before * was swapped * else set * remove old comment * fixes from merge * remove fuzzy_min_match_count from this pr * fix static analysis * also unused * different method first draft * copy existing fuzzy func * check all possible ecus exist, only platform codes, slightly refactor main loop * fix * Revert recent Revert "fix" This reverts commit 5cdb7bda835f1e48e750ab4195e891afe08e11ea. Revert "check all possible ecus exist, only platform codes, slightly refactor main loop" This reverts commit d3e918fa20fa4ce881445850f5f7428a3c11adf8. Revert "copy existing fuzzy func" This reverts commit 34c8c0545097c84f55f4b4f61907606c93760ddd. Revert "different method first draft" This reverts commit b91139055d7d1802c1eb726504798c156a183c9c. * new func * fixup test * remove changes from v1 from fw_versions.py * clean up a bit * return part as part of code * fix test * add original fuzzy function * add an ecu match if the date is within range (or date doesn't exist) * add format for what we're going to do * not working stash * the exact matching function does more of what we want with less code and less custom logic * we don't care about found versions, only codes and dates * actually we do have an exception * this works pretty nicely now * up here * this is better * some minor clean up * old function=now junk * fix platform code test * remove old platform code function * now rename _new to * use FW_QUERY_CONFIG * clean up imports * rename that too * one line * correct typing correct typing * draft tests * so that works * fixup excluded platform test now too * this is tested by excluded platform test * test parts and dates * remove old comment * old import * take platform code stuff out of FwQueryConfig * fix test * revert debug script * flip order * make this a set by default * revert this part * correct typing * clean up comments * clean that test up too/pylint * combine these three tests ina clean way * not right * more general * be consistent with quotes * comment * comment * comment in fw_versions * flip order * this is more readable * could test all this, but it's tested in test_hyundai and doesn't do a lot here * only assert brands which use this * invalidate all CAN FD ICE and hybrid * tuple * can get away without filtering * add comment reasons * fix * some review suggestions * this works (first draft) * this is better * script to print platform codes and dates * sanity check for dates are in correct ecus and platforms * mypy * better variable name and comment * rename * same * slightly better name * subset * exclude platforms and live car without dates * consistent * self explan * better name * test to make sure the functions agree * clean that up * comment * we get other responses from queries not in DB, only check any * not used or typed
2 years ago
# Keep track of ECUs which pass all checks (platform codes, within date range)
valid_found_ecus = set()
valid_expected_ecus = {ecu[1:] for ecu in fws if ecu[0] in PLATFORM_CODE_ECUS}
for ecu, expected_versions in fws.items():
addr = ecu[1:]
# Only check ECUs expected to have platform codes
if ecu[0] not in PLATFORM_CODE_ECUS:
continue
# Expected platform codes & dates
codes = get_platform_codes(expected_versions)
expected_platform_codes = {code for code, _ in codes}
expected_dates = {date for _, date in codes if date is not None}
# Found platform codes & dates
codes = get_platform_codes(live_fw_versions.get(addr, set()))
found_platform_codes = {code for code, _ in codes}
found_dates = {date for _, date in codes if date is not None}
# Check platform code + part number matches for any found versions
if not any(found_platform_code in expected_platform_codes for found_platform_code in found_platform_codes):
break
if ecu[0] in DATE_FW_ECUS:
# If ECU can have a FW date, require it to exist
# (this excludes candidates in the database without dates)
if not len(expected_dates) or not len(found_dates):
break
# Check any date within range in the database, format is %y%m%d
if not any(min(expected_dates) <= found_date <= max(expected_dates) for found_date in found_dates):
break
valid_found_ecus.add(addr)
# If all live ECUs pass all checks for candidate, add it as a match
if valid_expected_ecus.issubset(valid_found_ecus):
candidates.add(candidate)
return candidates - fuzzy_platform_blacklist
HYUNDAI_VERSION_REQUEST_LONG = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \
p16(0xf100) # Long description
HYUNDAI_VERSION_REQUEST_ALT = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \
p16(0xf110) # Alt long description
HYUNDAI_VERSION_REQUEST_MULTI = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \
p16(uds.DATA_IDENTIFIER_TYPE.VEHICLE_MANUFACTURER_SPARE_PART_NUMBER) + \
p16(uds.DATA_IDENTIFIER_TYPE.APPLICATION_SOFTWARE_IDENTIFICATION) + \
p16(0xf100)
HYUNDAI_ECU_MANUFACTURING_DATE = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \
p16(uds.DATA_IDENTIFIER_TYPE.ECU_MANUFACTURING_DATE)
HYUNDAI_VERSION_RESPONSE = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER + 0x40])
# Regex patterns for parsing platform code, FW date, and part number from FW versions
PLATFORM_CODE_FW_PATTERN = re.compile(b'((?<=' + HYUNDAI_VERSION_REQUEST_LONG[1:] +
b')[A-Z]{2}[A-Za-z0-9]{0,2})')
DATE_FW_PATTERN = re.compile(b'(?<=[ -])([0-9]{6}$)')
PART_NUMBER_FW_PATTERN = re.compile(b'(?<=[0-9][.,][0-9]{2} )([0-9]{5}[-/]?[A-Z][A-Z0-9]{3}[0-9])')
# We've seen both ICE and hybrid for these platforms, and they have hybrid descriptors (e.g. MQ4 vs MQ4H)
CANFD_FUZZY_WHITELIST = {CAR.KIA_SORENTO_4TH_GEN, CAR.KIA_SORENTO_HEV_4TH_GEN}
# List of ECUs expected to have platform codes, camera and radar should exist on all cars
# TODO: use abs, it has the platform code and part number on many platforms
PLATFORM_CODE_ECUS = [Ecu.fwdRadar, Ecu.fwdCamera, Ecu.eps]
# So far we've only seen dates in fwdCamera
# TODO: there are date codes in the ABS firmware versions in hex
DATE_FW_ECUS = [Ecu.fwdCamera]
ALL_HYUNDAI_ECUS = [Ecu.eps, Ecu.abs, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.engine, Ecu.parkingAdas, Ecu.transmission, Ecu.adas, Ecu.hvac, Ecu.cornerRadar]
FW_QUERY_CONFIG = FwQueryConfig(
requests=[
# TODO: minimize shared whitelists for CAN and cornerRadar for CAN-FD
# CAN queries (OBD-II port)
Request(
[HYUNDAI_VERSION_REQUEST_LONG],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=[Ecu.transmission, Ecu.eps, Ecu.abs, Ecu.fwdRadar, Ecu.fwdCamera],
),
Request(
[HYUNDAI_VERSION_REQUEST_MULTI],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=[Ecu.engine, Ecu.transmission, Ecu.eps, Ecu.abs, Ecu.fwdRadar],
),
# CAN-FD queries (from camera)
# TODO: combine shared whitelists with CAN requests
Request(
[HYUNDAI_VERSION_REQUEST_LONG],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=[Ecu.fwdCamera, Ecu.fwdRadar, Ecu.cornerRadar, Ecu.hvac],
bus=0,
auxiliary=True,
),
Request(
[HYUNDAI_VERSION_REQUEST_LONG],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=[Ecu.fwdCamera, Ecu.adas, Ecu.cornerRadar, Ecu.hvac],
bus=1,
auxiliary=True,
obd_multiplexing=False,
),
# CAN & CAN FD query to understand the three digit date code
# HDA2 cars usually use 6 digit date codes, so skip bus 1
Request(
[HYUNDAI_ECU_MANUFACTURING_DATE],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=[Ecu.fwdCamera],
bus=0,
auxiliary=True,
logging=True,
),
# CAN & CAN FD logging queries (from camera)
Request(
[HYUNDAI_VERSION_REQUEST_LONG],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=ALL_HYUNDAI_ECUS,
bus=0,
auxiliary=True,
logging=True,
),
Request(
[HYUNDAI_VERSION_REQUEST_MULTI],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=ALL_HYUNDAI_ECUS,
bus=0,
auxiliary=True,
logging=True,
),
Request(
[HYUNDAI_VERSION_REQUEST_LONG],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=ALL_HYUNDAI_ECUS,
bus=1,
auxiliary=True,
obd_multiplexing=False,
logging=True,
),
# CAN-FD alt request logging queries
Request(
[HYUNDAI_VERSION_REQUEST_ALT],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=[Ecu.parkingAdas, Ecu.hvac],
bus=0,
auxiliary=True,
logging=True,
),
Request(
[HYUNDAI_VERSION_REQUEST_ALT],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=[Ecu.parkingAdas, Ecu.hvac],
bus=1,
auxiliary=True,
logging=True,
obd_multiplexing=False,
),
],
extra_ecus=[
(Ecu.adas, 0x730, None), # ADAS Driving ECU on HDA2 platforms
(Ecu.parkingAdas, 0x7b1, None), # ADAS Parking ECU (may exist on all platforms)
(Ecu.hvac, 0x7b3, None), # HVAC Control Assembly
(Ecu.cornerRadar, 0x7b7, None),
],
HKG: use platform codes to fuzzy fingerprint (#28531) * get gas/ev/hev from FW (not all correct, poc) * add test for essential ecus for fuzzy fingerprinting * kinda works * stash * clean up * add code * simpler * use the function * test it with our cars * no re no re no re * debugging * handle empty dict * simpl * this is promising start on making existing fingerprinting functions use the config, instead of entirely replacing them * needs to allow 1 match * lay out how this should look * changes * executable * some work * use config * fuzzy ecus * config test * comment and some clean up * test platform codes * use regex, simpler and fixes bug * in func * rm bad func * typing for new func and remove old from dc * todo done * tested! * remove fake platform codes * thought we needed this, but actually... * not needed * not applicable any more * use config for essential ecus * first draft of test to make adding/removing fuzzy FP platform intentional * compile * clean up test * even cleaner * fix default ecus type * temp fix * this is mostly in tests now * test every fuzzy ecu fw returns one platform code * experiment with dates * Revert "experiment with dates" This reverts commit 3251b9cc5c3ca41ca92c8b75ad9b2234b720aa0b. * clean that up * comment * test * work on all cars * fix fuzz_fw_fingerprint * comment * get first by search * bit more clean up * and more * use compiled pattern for nicer syntax * default * flip dat around, much cleaner * clean up hyundai test a bit * flip order same here * rename test and flip subTest * fix pylint * revert fw changes revert fw changes * line * add original functions to test * needs to be a list * cmt * draft (need to count one ecu as a match) * tiny clean up * todo: date range * only in notebook * remove comment (still can be either list or set) * same, only notebook * more consistent signature * copilot inspired * copilot no good * test for date parsing * better name * good, now we don't have to worry about the dates mismatching in another test/logic * comment up+ * some stuff * clean up fix test fix test * test * comment * use utils * clean up (utils are cleaner and less buggy) * clean up (utils are cleaner and less buggy) * fixup test * use a dash (prettier) and remove some platforms that can fingerprint now! * compile global pattern * same as what we do in values * remove comments * fuzzy_get_platform_codes is one or none here * more clean up * sort imports * woah woah woah * add comment * fix reassigning different types * add types * adapt fuzzy test recently added (nice it caught this!) * update lock * options comments * stash * comments and fixes * better comments * better * test: run on exact fuzzy matching logic, same results! * use match_fw_to_car * test all fw * ex * unused random * this is a possibility * this is more clear * fix * revert * revert to needing both ECUs to match to reduce false positives, test * fix excluded platform test :( but it's ok * add comment * we actually want to only test fuzzy ecus to make it explicit * fix mypy * comment for tomorrow * just add matches with fuzzy FP * add comment * this was the cleanest I could think of, but still working on it. not very easy to understand * think this is better, but also worse... * comment: reframing how this works * revert back to what we did before * was swapped * else set * remove old comment * fixes from merge * remove fuzzy_min_match_count from this pr * fix static analysis * also unused * different method first draft * copy existing fuzzy func * check all possible ecus exist, only platform codes, slightly refactor main loop * fix * Revert recent Revert "fix" This reverts commit 5cdb7bda835f1e48e750ab4195e891afe08e11ea. Revert "check all possible ecus exist, only platform codes, slightly refactor main loop" This reverts commit d3e918fa20fa4ce881445850f5f7428a3c11adf8. Revert "copy existing fuzzy func" This reverts commit 34c8c0545097c84f55f4b4f61907606c93760ddd. Revert "different method first draft" This reverts commit b91139055d7d1802c1eb726504798c156a183c9c. * new func * fixup test * remove changes from v1 from fw_versions.py * clean up a bit * return part as part of code * fix test * add original fuzzy function * add an ecu match if the date is within range (or date doesn't exist) * add format for what we're going to do * not working stash * the exact matching function does more of what we want with less code and less custom logic * we don't care about found versions, only codes and dates * actually we do have an exception * this works pretty nicely now * up here * this is better * some minor clean up * old function=now junk * fix platform code test * remove old platform code function * now rename _new to * use FW_QUERY_CONFIG * clean up imports * rename that too * one line * correct typing correct typing * draft tests * so that works * fixup excluded platform test now too * this is tested by excluded platform test * test parts and dates * remove old comment * old import * take platform code stuff out of FwQueryConfig * fix test * revert debug script * flip order * make this a set by default * revert this part * correct typing * clean up comments * clean that test up too/pylint * combine these three tests ina clean way * not right * more general * be consistent with quotes * comment * comment * comment in fw_versions * flip order * this is more readable * could test all this, but it's tested in test_hyundai and doesn't do a lot here * only assert brands which use this * invalidate all CAN FD ICE and hybrid * tuple * can get away without filtering * add comment reasons * fix * some review suggestions * this works (first draft) * this is better * script to print platform codes and dates * sanity check for dates are in correct ecus and platforms * mypy * better variable name and comment * rename * same * slightly better name * subset * exclude platforms and live car without dates * consistent * self explan * better name * test to make sure the functions agree * clean that up * comment * we get other responses from queries not in DB, only check any * not used or typed
2 years ago
# Custom fuzzy fingerprinting function using platform codes, part numbers + FW dates:
match_fw_to_car_fuzzy=match_fw_to_car_fuzzy,
)
5 years ago
CHECKSUM = {
"crc8": [CAR.SANTA_FE, CAR.SONATA, CAR.PALISADE, CAR.KIA_SELTOS, CAR.ELANTRA_2021, CAR.ELANTRA_HEV_2021,
CAR.SONATA_HYBRID, CAR.SANTA_FE_2022, CAR.KIA_K5_2021, CAR.SANTA_FE_HEV_2022, CAR.SANTA_FE_PHEV_2022,
CAR.KIA_K5_HEV_2020, CAR.CUSTIN_1ST_GEN],
"6B": [CAR.KIA_SORENTO, CAR.HYUNDAI_GENESIS],
5 years ago
}
CAN_GEARS = {
# which message has the gear. hybrid and EV use ELECT_GEAR
"use_cluster_gears": {CAR.ELANTRA, CAR.ELANTRA_GT_I30, CAR.KONA},
"use_tcu_gears": {CAR.KIA_OPTIMA_G4, CAR.KIA_OPTIMA_G4_FL, CAR.SONATA_LF, CAR.VELOSTER, CAR.TUCSON},
5 years ago
}
CANFD_CAR = {CAR.KIA_EV6, CAR.IONIQ_5, CAR.IONIQ_6, CAR.TUCSON_4TH_GEN, CAR.SANTA_CRUZ_1ST_GEN, CAR.KIA_SPORTAGE_5TH_GEN, CAR.GENESIS_GV70_1ST_GEN,
CAR.GENESIS_GV60_EV_1ST_GEN, CAR.KIA_SORENTO_4TH_GEN, CAR.KIA_NIRO_HEV_2ND_GEN, CAR.KIA_NIRO_EV_2ND_GEN,
CAR.GENESIS_GV80, CAR.KIA_CARNIVAL_4TH_GEN, CAR.KIA_SORENTO_HEV_4TH_GEN, CAR.KONA_EV_2ND_GEN, CAR.KIA_K8_HEV_1ST_GEN,
CAR.STARIA_4TH_GEN}
# The radar does SCC on these cars when HDA I, rather than the camera
CANFD_RADAR_SCC_CAR = {CAR.GENESIS_GV70_1ST_GEN, CAR.KIA_SORENTO_4TH_GEN, CAR.GENESIS_GV80, CAR.KIA_CARNIVAL_4TH_GEN, CAR.KIA_SORENTO_HEV_4TH_GEN}
# These CAN FD cars do not accept communication control to disable the ADAS ECU,
# responds with 0x7F2822 - 'conditions not correct'
CANFD_UNSUPPORTED_LONGITUDINAL_CAR = {CAR.IONIQ_6, CAR.KONA_EV_2ND_GEN}
# The camera does SCC on these cars, rather than the radar
CAMERA_SCC_CAR = {CAR.KONA_EV_2022, }
# these cars use a different gas signal
HYBRID_CAR = {CAR.IONIQ_PHEV, CAR.ELANTRA_HEV_2021, CAR.KIA_NIRO_PHEV, CAR.KIA_NIRO_HEV_2021, CAR.SONATA_HYBRID, CAR.KONA_HEV, CAR.IONIQ,
CAR.IONIQ_HEV_2022, CAR.SANTA_FE_HEV_2022, CAR.SANTA_FE_PHEV_2022, CAR.IONIQ_PHEV_2019, CAR.KIA_K5_HEV_2020,
CAR.KIA_OPTIMA_H, CAR.KIA_OPTIMA_H_G4_FL, CAR.AZERA_HEV_6TH_GEN, CAR.KIA_NIRO_PHEV_2022}
EV_CAR = {CAR.IONIQ_EV_2020, CAR.IONIQ_EV_LTD, CAR.KONA_EV, CAR.KIA_NIRO_EV, CAR.KIA_NIRO_EV_2ND_GEN, CAR.KONA_EV_2022,
CAR.KIA_EV6, CAR.IONIQ_5, CAR.IONIQ_6, CAR.GENESIS_GV60_EV_1ST_GEN, CAR.KONA_EV_2ND_GEN}
# these cars require a special panda safety mode due to missing counters and checksums in the messages
LEGACY_SAFETY_MODE_CAR = {CAR.HYUNDAI_GENESIS, CAR.IONIQ_EV_LTD, CAR.KIA_OPTIMA_G4,
CAR.VELOSTER, CAR.GENESIS_G70, CAR.GENESIS_G80, CAR.KIA_CEED, CAR.ELANTRA, CAR.IONIQ_HEV_2022,
CAR.KIA_OPTIMA_H, CAR.ELANTRA_GT_I30}
# these cars have not been verified to work with longitudinal yet - radar disable, sending correct messages, etc.
UNSUPPORTED_LONGITUDINAL_CAR = LEGACY_SAFETY_MODE_CAR | {CAR.KIA_NIRO_PHEV, CAR.KIA_SORENTO, CAR.SONATA_LF, CAR.KIA_OPTIMA_G4_FL,
CAR.KIA_OPTIMA_H_G4_FL}
# 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
5 years ago
DBC = {
CAR.AZERA_6TH_GEN: dbc_dict('hyundai_kia_generic', None),
CAR.AZERA_HEV_6TH_GEN: dbc_dict('hyundai_kia_generic', None),
5 years ago
CAR.ELANTRA: dbc_dict('hyundai_kia_generic', None),
CAR.ELANTRA_GT_I30: dbc_dict('hyundai_kia_generic', None),
CAR.ELANTRA_2021: dbc_dict('hyundai_kia_generic', None),
CAR.ELANTRA_HEV_2021: dbc_dict('hyundai_kia_generic', None),
CAR.GENESIS_G70: dbc_dict('hyundai_kia_generic', None),
CAR.GENESIS_G70_2020: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar_generated'),
CAR.GENESIS_G80: dbc_dict('hyundai_kia_generic', None),
CAR.GENESIS_G90: dbc_dict('hyundai_kia_generic', None),
CAR.HYUNDAI_GENESIS: dbc_dict('hyundai_kia_generic', None),
CAR.IONIQ_PHEV_2019: dbc_dict('hyundai_kia_generic', None),
CAR.IONIQ_PHEV: dbc_dict('hyundai_kia_generic', None),
CAR.IONIQ_EV_2020: dbc_dict('hyundai_kia_generic', None),
CAR.IONIQ_EV_LTD: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar_generated'),
CAR.IONIQ: dbc_dict('hyundai_kia_generic', None),
CAR.IONIQ_HEV_2022: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_FORTE: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_K5_2021: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_K5_HEV_2020: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar_generated'),
CAR.KIA_NIRO_EV: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar_generated'),
CAR.KIA_NIRO_PHEV: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar_generated'),
CAR.KIA_NIRO_HEV_2021: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_OPTIMA_G4: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_OPTIMA_G4_FL: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_OPTIMA_H: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_OPTIMA_H_G4_FL: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_SELTOS: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_SORENTO: dbc_dict('hyundai_kia_generic', None), # Has 0x5XX messages, but different format
5 years ago
CAR.KIA_STINGER: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_STINGER_2022: dbc_dict('hyundai_kia_generic', None),
CAR.KONA: dbc_dict('hyundai_kia_generic', None),
CAR.KONA_EV: dbc_dict('hyundai_kia_generic', None),
CAR.KONA_EV_2022: dbc_dict('hyundai_kia_generic', None),
CAR.KONA_HEV: dbc_dict('hyundai_kia_generic', None),
CAR.SANTA_FE: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar_generated'),
CAR.SANTA_FE_2022: dbc_dict('hyundai_kia_generic', None),
CAR.SANTA_FE_HEV_2022: dbc_dict('hyundai_kia_generic', None),
CAR.SANTA_FE_PHEV_2022: dbc_dict('hyundai_kia_generic', None),
CAR.SONATA: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar_generated'),
CAR.SONATA_LF: dbc_dict('hyundai_kia_generic', None), # Has 0x5XX messages, but different format
CAR.TUCSON: dbc_dict('hyundai_kia_generic', None),
CAR.PALISADE: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar_generated'),
CAR.VELOSTER: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_CEED: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_EV6: dbc_dict('hyundai_canfd', None),
CAR.SONATA_HYBRID: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar_generated'),
CAR.TUCSON_4TH_GEN: dbc_dict('hyundai_canfd', None),
CAR.IONIQ_5: dbc_dict('hyundai_canfd', None),
CAR.IONIQ_6: dbc_dict('hyundai_canfd', None),
Hyundai CAN-FD: support 2023 Kia Sportage & 2022 Hyundai Santa Cruz (#25434) * Hyundai: Car Port for Santa Cruz 2022 * bump opendbc * New struct and params for CAN-FD ICE models * fixup! New struct and params for CAN-FD ICE models * bump panda * bump panda * HKG: Car Port for Sportage 2023 * fixup! HKG: Car Port for Sportage 2023 * Kia Sportage 2023: Add FW versions * Longitudinal Control: ICE CAN-FD models * fixup! Longitudinal Control: ICE CAN-FD models * bump panda * fixup! Longitudinal Control: ICE CAN-FD models * Update car info * fixup! Longitudinal Control: ICE CAN-FD models * Gate radar disable behind HDA2 only * Gate radar disable behind camera SCC cars * Update CARS.md * Add FW versions for Santa Cruz 2021 * Test route for Kia Sportage 2023 (openpilot longitudinal enabled) * Test route for Santa Cruz 2021 (openpilot longitudinal enabled) * fixup! Kia Sportage 2023: Add FW versions * HKG: Car Port for Genesis GV70 2023 thanks to @zunichky! Co-authored-by: kyle zunich <zunichky@msu.edu> * Update car info * Add torque param for GENESIS GV70 1ST GEN * Fix CARS.md * Update test route * Remove unnecessary HDA2 checks * Add additional FW versions for Sportage 2023 * Fix Kia Sportage supported MY * Fix MISRA violation * Fix release note * Use IntFlag to gate camera SCC for CAN-FD * Parse 0x1A0 on bus 4 dynamically * bump panda * Car code cleanup * Typo * Add additional 0x1A0 signals to bus 4 * Fix weird bitwise logic * Check 0x1a0 after safety config is set * Revert "Check 0x1a0 after safety config is set" This reverts commit 141bbf79792bcde9cfadbc0680654acf61d8d16f. * Check car list instead * Add GV70 2022 test route * Add fwdRadar FW version for GV70 2022 * Fix CARS.md * Fix CARS.md * Fix CARS.md * new santa cruz route * bump panda to commaai/panda#1031 * bumppanda * some clean up * lets refactor CAMERA_SCC_CAR in another pr * minor clean up * update docs! * GV70 is a radar-SCC car :( (another PR) * fix removed sportage hybrid versions * update docs Co-authored-by: kyle zunich <zunichky@msu.edu> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> Co-authored-by: sshane <shane@smiskol.com>
3 years ago
CAR.SANTA_CRUZ_1ST_GEN: dbc_dict('hyundai_canfd', None),
CAR.KIA_SPORTAGE_5TH_GEN: dbc_dict('hyundai_canfd', None),
CAR.GENESIS_GV70_1ST_GEN: dbc_dict('hyundai_canfd', None),
CAR.GENESIS_GV60_EV_1ST_GEN: dbc_dict('hyundai_canfd', None),
CAR.KIA_SORENTO_4TH_GEN: dbc_dict('hyundai_canfd', None),
CAR.KIA_NIRO_HEV_2ND_GEN: dbc_dict('hyundai_canfd', None),
CAR.KIA_NIRO_EV_2ND_GEN: dbc_dict('hyundai_canfd', None),
CAR.GENESIS_GV80: dbc_dict('hyundai_canfd', None),
CAR.KIA_CARNIVAL_4TH_GEN: dbc_dict('hyundai_canfd', None),
CAR.KIA_SORENTO_HEV_4TH_GEN: dbc_dict('hyundai_canfd', None),
CAR.KONA_EV_2ND_GEN: dbc_dict('hyundai_canfd', None),
CAR.KIA_K8_HEV_1ST_GEN: dbc_dict('hyundai_canfd', None),
CAR.CUSTIN_1ST_GEN: dbc_dict('hyundai_kia_generic', None),
CAR.KIA_NIRO_PHEV_2022: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar_generated'),
CAR.STARIA_4TH_GEN: dbc_dict('hyundai_canfd', None),
5 years ago
}