dragonpilot - 基於 openpilot 的開源駕駛輔助系統
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.

145 lines
5.6 KiB

from collections import defaultdict
from dataclasses import dataclass
from enum import Enum, 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
from cereal import car
from openpilot.selfdrive.car import AngleRateLimit, dbc_dict
from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarInfo, CarParts, Column, \
Device
from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries
Ecu = car.CarParams.Ecu
class CarControllerParams:
STEER_STEP = 5 # LateralMotionControl, 20Hz
LKA_STEP = 3 # Lane_Assist_Data1, 33Hz
ACC_CONTROL_STEP = 2 # ACCDATA, 50Hz
LKAS_UI_STEP = 100 # IPMA_Data, 1Hz
ACC_UI_STEP = 20 # ACCDATA_3, 5Hz
BUTTONS_STEP = 5 # Steering_Data_FD1, 10Hz, but send twice as fast
CURVATURE_MAX = 0.02 # Max curvature for steering command, m^-1
STEER_DRIVER_ALLOWANCE = 1.0 # Driver intervention threshold, Nm
Ford Explorer 2020-21 (#25614) * add model years * update Focus steer ratio * Ford: add EU label to Focus Mk4 * add packages * add Ford Explorer 2020 Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum https://cdn.dealereprocess.org/cdn/brochures/ford/2020-explorer.pdf * Ford: steering control with path angle * Ford: add TJA toggle to buttons * add Ford Explorer 2021 `62241b0c7fea4589|2022-08-30--11-58-24--0` Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum (same as 2020) https://cdn.dealereprocess.org/cdn/brochures/ford/2021-explorer.pdf * Ford: add shiftByWire ECU fw * angle/steer refactor * try always stop and go for US models * no dashcam * car info * send resume button * skip explorer * escape and focus back in dashcam * passthru buttons * fordcan set bus for button message * toggle off stock traffic jam assist so camera does not enforce driver presence checks * not used * update ramp rate/precision notes * cleanup * bump steering pressed torque to 0.8 Nm * add standstill * bump steer ratio * try increasing delay? * fix docs * add kuga car info * maybe fix tja toggle? * compensate for ford roll compensation?? * oops * better ui * block non-adaptive * add note on ui warning for hands on wheel * try only checking/toggling TJA every 2 seconds * add car test route * dashcam only again * send buttons to camera * add process replay segment * cleanup * bump panda * add extra FW Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
3 years ago
# Curvature rate limits
# The curvature signal is limited to 0.003 to 0.009 m^-1/sec by the EPS depending on speed and direction
# Limit to ~2 m/s^3 up, ~3 m/s^3 down at 75 mph
# Worst case, the low speed limits will allow 4.3 m/s^3 up, 4.9 m/s^3 down at 75 mph
ANGLE_RATE_LIMIT_UP = AngleRateLimit(speed_bp=[5, 25], angle_v=[0.0002, 0.0001])
ANGLE_RATE_LIMIT_DOWN = AngleRateLimit(speed_bp=[5, 25], angle_v=[0.000225, 0.00015])
CURVATURE_ERROR = 0.002 # ~6 degrees at 10 m/s, ~10 degrees at 35 m/s
5 years ago
ACCEL_MAX = 2.0 # m/s^2 max acceleration
ACCEL_MIN = -3.5 # m/s^2 max deceleration
MIN_GAS = -0.5
INACTIVE_GAS = -5.0
def __init__(self, CP):
pass
class CAR(StrEnum):
BRONCO_SPORT_MK1 = "FORD BRONCO SPORT 1ST GEN"
ESCAPE_MK4 = "FORD ESCAPE 4TH GEN"
Ford Explorer 2020-21 (#25614) * add model years * update Focus steer ratio * Ford: add EU label to Focus Mk4 * add packages * add Ford Explorer 2020 Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum https://cdn.dealereprocess.org/cdn/brochures/ford/2020-explorer.pdf * Ford: steering control with path angle * Ford: add TJA toggle to buttons * add Ford Explorer 2021 `62241b0c7fea4589|2022-08-30--11-58-24--0` Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum (same as 2020) https://cdn.dealereprocess.org/cdn/brochures/ford/2021-explorer.pdf * Ford: add shiftByWire ECU fw * angle/steer refactor * try always stop and go for US models * no dashcam * car info * send resume button * skip explorer * escape and focus back in dashcam * passthru buttons * fordcan set bus for button message * toggle off stock traffic jam assist so camera does not enforce driver presence checks * not used * update ramp rate/precision notes * cleanup * bump steering pressed torque to 0.8 Nm * add standstill * bump steer ratio * try increasing delay? * fix docs * add kuga car info * maybe fix tja toggle? * compensate for ford roll compensation?? * oops * better ui * block non-adaptive * add note on ui warning for hands on wheel * try only checking/toggling TJA every 2 seconds * add car test route * dashcam only again * send buttons to camera * add process replay segment * cleanup * bump panda * add extra FW Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
3 years ago
EXPLORER_MK6 = "FORD EXPLORER 6TH GEN"
F_150_MK14 = "FORD F-150 14TH GEN"
FOCUS_MK4 = "FORD FOCUS 4TH GEN"
MAVERICK_MK1 = "FORD MAVERICK 1ST GEN"
F_150_LIGHTNING_MK1 = "FORD F-150 LIGHTNING 1ST GEN"
MUSTANG_MACH_E_MK1 = "FORD MUSTANG MACH-E 1ST GEN"
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
CANFD_CAR = {CAR.F_150_MK14, CAR.F_150_LIGHTNING_MK1, CAR.MUSTANG_MACH_E_MK1}
class RADAR:
DELPHI_ESR = 'ford_fusion_2018_adas'
DELPHI_MRR = 'FORD_CADS'
DBC: dict[str, dict[str, str]] = defaultdict(lambda: dbc_dict("ford_lincoln_base_pt", RADAR.DELPHI_MRR))
# F-150 radar is not yet supported
DBC[CAR.F_150_MK14] = dbc_dict("ford_lincoln_base_pt", None)
DBC[CAR.F_150_LIGHTNING_MK1] = dbc_dict("ford_lincoln_base_pt", None)
DBC[CAR.MUSTANG_MACH_E_MK1] = dbc_dict("ford_lincoln_base_pt", None)
class Footnote(Enum):
FOCUS = CarFootnote(
"Refers only to the Focus Mk4 (C519) available in Europe/China/Taiwan/Australasia, not the Focus Mk3 (C346) in " +
"North and South America/Southeast Asia.",
Column.MODEL,
)
Ford Explorer 2020-21 (#25614) * add model years * update Focus steer ratio * Ford: add EU label to Focus Mk4 * add packages * add Ford Explorer 2020 Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum https://cdn.dealereprocess.org/cdn/brochures/ford/2020-explorer.pdf * Ford: steering control with path angle * Ford: add TJA toggle to buttons * add Ford Explorer 2021 `62241b0c7fea4589|2022-08-30--11-58-24--0` Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum (same as 2020) https://cdn.dealereprocess.org/cdn/brochures/ford/2021-explorer.pdf * Ford: add shiftByWire ECU fw * angle/steer refactor * try always stop and go for US models * no dashcam * car info * send resume button * skip explorer * escape and focus back in dashcam * passthru buttons * fordcan set bus for button message * toggle off stock traffic jam assist so camera does not enforce driver presence checks * not used * update ramp rate/precision notes * cleanup * bump steering pressed torque to 0.8 Nm * add standstill * bump steer ratio * try increasing delay? * fix docs * add kuga car info * maybe fix tja toggle? * compensate for ford roll compensation?? * oops * better ui * block non-adaptive * add note on ui warning for hands on wheel * try only checking/toggling TJA every 2 seconds * add car test route * dashcam only again * send buttons to camera * add process replay segment * cleanup * bump panda * add extra FW Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
3 years ago
@dataclass
class FordCarInfo(CarInfo):
package: str = "Co-Pilot360 Assist+"
def init_make(self, CP: car.CarParams):
harness = CarHarness.ford_q4 if CP.carFingerprint in CANFD_CAR else CarHarness.ford_q3
if CP.carFingerprint in (CAR.BRONCO_SPORT_MK1, CAR.MAVERICK_MK1, CAR.F_150_MK14):
self.car_parts = CarParts([Device.threex_angled_mount, harness])
else:
self.car_parts = CarParts([Device.threex, harness])
Ford Explorer 2020-21 (#25614) * add model years * update Focus steer ratio * Ford: add EU label to Focus Mk4 * add packages * add Ford Explorer 2020 Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum https://cdn.dealereprocess.org/cdn/brochures/ford/2020-explorer.pdf * Ford: steering control with path angle * Ford: add TJA toggle to buttons * add Ford Explorer 2021 `62241b0c7fea4589|2022-08-30--11-58-24--0` Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum (same as 2020) https://cdn.dealereprocess.org/cdn/brochures/ford/2021-explorer.pdf * Ford: add shiftByWire ECU fw * angle/steer refactor * try always stop and go for US models * no dashcam * car info * send resume button * skip explorer * escape and focus back in dashcam * passthru buttons * fordcan set bus for button message * toggle off stock traffic jam assist so camera does not enforce driver presence checks * not used * update ramp rate/precision notes * cleanup * bump steering pressed torque to 0.8 Nm * add standstill * bump steer ratio * try increasing delay? * fix docs * add kuga car info * maybe fix tja toggle? * compensate for ford roll compensation?? * oops * better ui * block non-adaptive * add note on ui warning for hands on wheel * try only checking/toggling TJA every 2 seconds * add car test route * dashcam only again * send buttons to camera * add process replay segment * cleanup * bump panda * add extra FW Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
3 years ago
CAR_INFO: dict[str, CarInfo | list[CarInfo]] = {
CAR.BRONCO_SPORT_MK1: FordCarInfo("Ford Bronco Sport 2021-22"),
Ford Explorer 2020-21 (#25614) * add model years * update Focus steer ratio * Ford: add EU label to Focus Mk4 * add packages * add Ford Explorer 2020 Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum https://cdn.dealereprocess.org/cdn/brochures/ford/2020-explorer.pdf * Ford: steering control with path angle * Ford: add TJA toggle to buttons * add Ford Explorer 2021 `62241b0c7fea4589|2022-08-30--11-58-24--0` Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum (same as 2020) https://cdn.dealereprocess.org/cdn/brochures/ford/2021-explorer.pdf * Ford: add shiftByWire ECU fw * angle/steer refactor * try always stop and go for US models * no dashcam * car info * send resume button * skip explorer * escape and focus back in dashcam * passthru buttons * fordcan set bus for button message * toggle off stock traffic jam assist so camera does not enforce driver presence checks * not used * update ramp rate/precision notes * cleanup * bump steering pressed torque to 0.8 Nm * add standstill * bump steer ratio * try increasing delay? * fix docs * add kuga car info * maybe fix tja toggle? * compensate for ford roll compensation?? * oops * better ui * block non-adaptive * add note on ui warning for hands on wheel * try only checking/toggling TJA every 2 seconds * add car test route * dashcam only again * send buttons to camera * add process replay segment * cleanup * bump panda * add extra FW Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
3 years ago
CAR.ESCAPE_MK4: [
FordCarInfo("Ford Escape 2020-22"),
Ford: add hybrid variants to docs (#31575) * Ford: add hybrid variants to docs Following up on https://github.com/commaai/openpilot/pull/31568 | CarInfoPlatform | ElectrificationLevel | ModelYear | Series | Trim | |:-----------------------------|:-----------------------|:-----------------------|:--------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------| | FORD BRONCO SPORT 1ST GEN | ICE | 2021, 2022 | BADLANDS, BASE, BIG BEND, FIRST EDITION, OUTER BANKS | | | FORD ESCAPE 4TH GEN | FHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | ICE | 2020, 2021, 2022 | S, SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | PHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD EXPLORER 6TH GEN | HEV | 2020, 2021, 2022, 2023 | Limited, Platinum | | | FORD EXPLORER 6TH GEN | ICE | 2020, 2021, 2022, 2023 | Base, Black Label, King Ranch, Limited, Platinum, Reserve, ST, ST-Line, Standard, Timberline, XLT | | | FORD EXPLORER 6TH GEN | PHEV | 2020, 2021 | Black Label Grand Touring, Blk Label Grand Touring, Grand Touring | | | FORD F-150 14TH GEN | HEV | 2021, 2022, 2023 | , F-Series | SuperCrew | | FORD F-150 14TH GEN | ICE | 2021, 2022, 2023 | , F-Series | , Regular Cab, SuperCab, SuperCrew, SuperCrew-Raptor, SuperCrew-SSV | | FORD F-150 LIGHTNING 1ST GEN | BEV | 2022, 2023 | | SuperCrew | | FORD MAVERICK 1ST GEN | HEV | 2022, 2023 | SUPERCREW, XL XLT Lariat | , SUPERCREW | | FORD MAVERICK 1ST GEN | ICE | 2022, 2023 | SUPERCREW, XL XLT Lariat, XLT Lariat | , SUPERCREW | | FORD MUSTANG MACH-E 1ST GEN | BEV | 2021, 2022, 2023 | California Route 1, GT, Premium, Select | | Data from NHTSA database and https://www.ford.co.uk/cars. * revert F-150 model year change
1 year ago
FordCarInfo("Ford Escape Hybrid 2020-22"),
FordCarInfo("Ford Escape Plug-in Hybrid 2020-22"),
FordCarInfo("Ford Kuga 2020-22", "Adaptive Cruise Control with Lane Centering"),
Ford: add hybrid variants to docs (#31575) * Ford: add hybrid variants to docs Following up on https://github.com/commaai/openpilot/pull/31568 | CarInfoPlatform | ElectrificationLevel | ModelYear | Series | Trim | |:-----------------------------|:-----------------------|:-----------------------|:--------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------| | FORD BRONCO SPORT 1ST GEN | ICE | 2021, 2022 | BADLANDS, BASE, BIG BEND, FIRST EDITION, OUTER BANKS | | | FORD ESCAPE 4TH GEN | FHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | ICE | 2020, 2021, 2022 | S, SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | PHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD EXPLORER 6TH GEN | HEV | 2020, 2021, 2022, 2023 | Limited, Platinum | | | FORD EXPLORER 6TH GEN | ICE | 2020, 2021, 2022, 2023 | Base, Black Label, King Ranch, Limited, Platinum, Reserve, ST, ST-Line, Standard, Timberline, XLT | | | FORD EXPLORER 6TH GEN | PHEV | 2020, 2021 | Black Label Grand Touring, Blk Label Grand Touring, Grand Touring | | | FORD F-150 14TH GEN | HEV | 2021, 2022, 2023 | , F-Series | SuperCrew | | FORD F-150 14TH GEN | ICE | 2021, 2022, 2023 | , F-Series | , Regular Cab, SuperCab, SuperCrew, SuperCrew-Raptor, SuperCrew-SSV | | FORD F-150 LIGHTNING 1ST GEN | BEV | 2022, 2023 | | SuperCrew | | FORD MAVERICK 1ST GEN | HEV | 2022, 2023 | SUPERCREW, XL XLT Lariat | , SUPERCREW | | FORD MAVERICK 1ST GEN | ICE | 2022, 2023 | SUPERCREW, XL XLT Lariat, XLT Lariat | , SUPERCREW | | FORD MUSTANG MACH-E 1ST GEN | BEV | 2021, 2022, 2023 | California Route 1, GT, Premium, Select | | Data from NHTSA database and https://www.ford.co.uk/cars. * revert F-150 model year change
1 year ago
FordCarInfo("Ford Kuga Hybrid 2020-22", "Adaptive Cruise Control with Lane Centering"),
FordCarInfo("Ford Kuga Plug-in Hybrid 2020-22", "Adaptive Cruise Control with Lane Centering"),
Ford Explorer 2020-21 (#25614) * add model years * update Focus steer ratio * Ford: add EU label to Focus Mk4 * add packages * add Ford Explorer 2020 Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum https://cdn.dealereprocess.org/cdn/brochures/ford/2020-explorer.pdf * Ford: steering control with path angle * Ford: add TJA toggle to buttons * add Ford Explorer 2021 `62241b0c7fea4589|2022-08-30--11-58-24--0` Package: Co-Pilot 360 Assist+ Optional on XLT Standard on Limited, Limited Hybrid, ST and Platinum (same as 2020) https://cdn.dealereprocess.org/cdn/brochures/ford/2021-explorer.pdf * Ford: add shiftByWire ECU fw * angle/steer refactor * try always stop and go for US models * no dashcam * car info * send resume button * skip explorer * escape and focus back in dashcam * passthru buttons * fordcan set bus for button message * toggle off stock traffic jam assist so camera does not enforce driver presence checks * not used * update ramp rate/precision notes * cleanup * bump steering pressed torque to 0.8 Nm * add standstill * bump steer ratio * try increasing delay? * fix docs * add kuga car info * maybe fix tja toggle? * compensate for ford roll compensation?? * oops * better ui * block non-adaptive * add note on ui warning for hands on wheel * try only checking/toggling TJA every 2 seconds * add car test route * dashcam only again * send buttons to camera * add process replay segment * cleanup * bump panda * add extra FW Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
3 years ago
],
CAR.EXPLORER_MK6: [
FordCarInfo("Ford Explorer 2020-23"),
Ford: add hybrid variants to docs (#31575) * Ford: add hybrid variants to docs Following up on https://github.com/commaai/openpilot/pull/31568 | CarInfoPlatform | ElectrificationLevel | ModelYear | Series | Trim | |:-----------------------------|:-----------------------|:-----------------------|:--------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------| | FORD BRONCO SPORT 1ST GEN | ICE | 2021, 2022 | BADLANDS, BASE, BIG BEND, FIRST EDITION, OUTER BANKS | | | FORD ESCAPE 4TH GEN | FHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | ICE | 2020, 2021, 2022 | S, SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | PHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD EXPLORER 6TH GEN | HEV | 2020, 2021, 2022, 2023 | Limited, Platinum | | | FORD EXPLORER 6TH GEN | ICE | 2020, 2021, 2022, 2023 | Base, Black Label, King Ranch, Limited, Platinum, Reserve, ST, ST-Line, Standard, Timberline, XLT | | | FORD EXPLORER 6TH GEN | PHEV | 2020, 2021 | Black Label Grand Touring, Blk Label Grand Touring, Grand Touring | | | FORD F-150 14TH GEN | HEV | 2021, 2022, 2023 | , F-Series | SuperCrew | | FORD F-150 14TH GEN | ICE | 2021, 2022, 2023 | , F-Series | , Regular Cab, SuperCab, SuperCrew, SuperCrew-Raptor, SuperCrew-SSV | | FORD F-150 LIGHTNING 1ST GEN | BEV | 2022, 2023 | | SuperCrew | | FORD MAVERICK 1ST GEN | HEV | 2022, 2023 | SUPERCREW, XL XLT Lariat | , SUPERCREW | | FORD MAVERICK 1ST GEN | ICE | 2022, 2023 | SUPERCREW, XL XLT Lariat, XLT Lariat | , SUPERCREW | | FORD MUSTANG MACH-E 1ST GEN | BEV | 2021, 2022, 2023 | California Route 1, GT, Premium, Select | | Data from NHTSA database and https://www.ford.co.uk/cars. * revert F-150 model year change
1 year ago
FordCarInfo("Ford Explorer Hybrid 2020-23"), # Limited and Platinum only
FordCarInfo("Lincoln Aviator 2020-23", "Co-Pilot360 Plus"),
FordCarInfo("Lincoln Aviator Plug-in Hybrid 2020-23", "Co-Pilot360 Plus"), # Grand Touring only
],
CAR.F_150_MK14: [
FordCarInfo("Ford F-150 2023", "Co-Pilot360 Active 2.0"),
FordCarInfo("Ford F-150 Hybrid 2023", "Co-Pilot360 Active 2.0"),
],
CAR.F_150_LIGHTNING_MK1: FordCarInfo("Ford F-150 Lightning 2021-23", "Co-Pilot360 Active 2.0"),
CAR.MUSTANG_MACH_E_MK1: FordCarInfo("Ford Mustang Mach-E 2021-23", "Co-Pilot360 Active 2.0"),
Ford: add hybrid variants to docs (#31575) * Ford: add hybrid variants to docs Following up on https://github.com/commaai/openpilot/pull/31568 | CarInfoPlatform | ElectrificationLevel | ModelYear | Series | Trim | |:-----------------------------|:-----------------------|:-----------------------|:--------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------| | FORD BRONCO SPORT 1ST GEN | ICE | 2021, 2022 | BADLANDS, BASE, BIG BEND, FIRST EDITION, OUTER BANKS | | | FORD ESCAPE 4TH GEN | FHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | ICE | 2020, 2021, 2022 | S, SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | PHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD EXPLORER 6TH GEN | HEV | 2020, 2021, 2022, 2023 | Limited, Platinum | | | FORD EXPLORER 6TH GEN | ICE | 2020, 2021, 2022, 2023 | Base, Black Label, King Ranch, Limited, Platinum, Reserve, ST, ST-Line, Standard, Timberline, XLT | | | FORD EXPLORER 6TH GEN | PHEV | 2020, 2021 | Black Label Grand Touring, Blk Label Grand Touring, Grand Touring | | | FORD F-150 14TH GEN | HEV | 2021, 2022, 2023 | , F-Series | SuperCrew | | FORD F-150 14TH GEN | ICE | 2021, 2022, 2023 | , F-Series | , Regular Cab, SuperCab, SuperCrew, SuperCrew-Raptor, SuperCrew-SSV | | FORD F-150 LIGHTNING 1ST GEN | BEV | 2022, 2023 | | SuperCrew | | FORD MAVERICK 1ST GEN | HEV | 2022, 2023 | SUPERCREW, XL XLT Lariat | , SUPERCREW | | FORD MAVERICK 1ST GEN | ICE | 2022, 2023 | SUPERCREW, XL XLT Lariat, XLT Lariat | , SUPERCREW | | FORD MUSTANG MACH-E 1ST GEN | BEV | 2021, 2022, 2023 | California Route 1, GT, Premium, Select | | Data from NHTSA database and https://www.ford.co.uk/cars. * revert F-150 model year change
1 year ago
CAR.FOCUS_MK4: [
FordCarInfo("Ford Focus 2018", "Adaptive Cruise Control with Lane Centering", footnotes=[Footnote.FOCUS]),
FordCarInfo("Ford Focus Hybrid 2018", "Adaptive Cruise Control with Lane Centering", footnotes=[Footnote.FOCUS]), # mHEV only
],
CAR.MAVERICK_MK1: [
FordCarInfo("Ford Maverick 2022", "LARIAT Luxury"),
Ford: add hybrid variants to docs (#31575) * Ford: add hybrid variants to docs Following up on https://github.com/commaai/openpilot/pull/31568 | CarInfoPlatform | ElectrificationLevel | ModelYear | Series | Trim | |:-----------------------------|:-----------------------|:-----------------------|:--------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------| | FORD BRONCO SPORT 1ST GEN | ICE | 2021, 2022 | BADLANDS, BASE, BIG BEND, FIRST EDITION, OUTER BANKS | | | FORD ESCAPE 4TH GEN | FHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | ICE | 2020, 2021, 2022 | S, SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | PHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD EXPLORER 6TH GEN | HEV | 2020, 2021, 2022, 2023 | Limited, Platinum | | | FORD EXPLORER 6TH GEN | ICE | 2020, 2021, 2022, 2023 | Base, Black Label, King Ranch, Limited, Platinum, Reserve, ST, ST-Line, Standard, Timberline, XLT | | | FORD EXPLORER 6TH GEN | PHEV | 2020, 2021 | Black Label Grand Touring, Blk Label Grand Touring, Grand Touring | | | FORD F-150 14TH GEN | HEV | 2021, 2022, 2023 | , F-Series | SuperCrew | | FORD F-150 14TH GEN | ICE | 2021, 2022, 2023 | , F-Series | , Regular Cab, SuperCab, SuperCrew, SuperCrew-Raptor, SuperCrew-SSV | | FORD F-150 LIGHTNING 1ST GEN | BEV | 2022, 2023 | | SuperCrew | | FORD MAVERICK 1ST GEN | HEV | 2022, 2023 | SUPERCREW, XL XLT Lariat | , SUPERCREW | | FORD MAVERICK 1ST GEN | ICE | 2022, 2023 | SUPERCREW, XL XLT Lariat, XLT Lariat | , SUPERCREW | | FORD MUSTANG MACH-E 1ST GEN | BEV | 2021, 2022, 2023 | California Route 1, GT, Premium, Select | | Data from NHTSA database and https://www.ford.co.uk/cars. * revert F-150 model year change
1 year ago
FordCarInfo("Ford Maverick Hybrid 2022", "LARIAT Luxury"),
FordCarInfo("Ford Maverick 2023", "Co-Pilot360 Assist"),
Ford: add hybrid variants to docs (#31575) * Ford: add hybrid variants to docs Following up on https://github.com/commaai/openpilot/pull/31568 | CarInfoPlatform | ElectrificationLevel | ModelYear | Series | Trim | |:-----------------------------|:-----------------------|:-----------------------|:--------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------| | FORD BRONCO SPORT 1ST GEN | ICE | 2021, 2022 | BADLANDS, BASE, BIG BEND, FIRST EDITION, OUTER BANKS | | | FORD ESCAPE 4TH GEN | FHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | ICE | 2020, 2021, 2022 | S, SE, SEL, Titanium | | | FORD ESCAPE 4TH GEN | PHEV | 2020, 2021, 2022 | SE, SEL, Titanium | | | FORD EXPLORER 6TH GEN | HEV | 2020, 2021, 2022, 2023 | Limited, Platinum | | | FORD EXPLORER 6TH GEN | ICE | 2020, 2021, 2022, 2023 | Base, Black Label, King Ranch, Limited, Platinum, Reserve, ST, ST-Line, Standard, Timberline, XLT | | | FORD EXPLORER 6TH GEN | PHEV | 2020, 2021 | Black Label Grand Touring, Blk Label Grand Touring, Grand Touring | | | FORD F-150 14TH GEN | HEV | 2021, 2022, 2023 | , F-Series | SuperCrew | | FORD F-150 14TH GEN | ICE | 2021, 2022, 2023 | , F-Series | , Regular Cab, SuperCab, SuperCrew, SuperCrew-Raptor, SuperCrew-SSV | | FORD F-150 LIGHTNING 1ST GEN | BEV | 2022, 2023 | | SuperCrew | | FORD MAVERICK 1ST GEN | HEV | 2022, 2023 | SUPERCREW, XL XLT Lariat | , SUPERCREW | | FORD MAVERICK 1ST GEN | ICE | 2022, 2023 | SUPERCREW, XL XLT Lariat, XLT Lariat | , SUPERCREW | | FORD MUSTANG MACH-E 1ST GEN | BEV | 2021, 2022, 2023 | California Route 1, GT, Premium, Select | | Data from NHTSA database and https://www.ford.co.uk/cars. * revert F-150 model year change
1 year ago
FordCarInfo("Ford Maverick Hybrid 2023", "Co-Pilot360 Assist"),
],
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
}
FW_QUERY_CONFIG = FwQueryConfig(
requests=[
# CAN and CAN FD queries are combined.
# FIXME: For CAN FD, ECUs respond with frames larger than 8 bytes on the powertrain bus
Request(
[StdQueries.TESTER_PRESENT_REQUEST, StdQueries.MANUFACTURER_SOFTWARE_VERSION_REQUEST],
[StdQueries.TESTER_PRESENT_RESPONSE, StdQueries.MANUFACTURER_SOFTWARE_VERSION_RESPONSE],
logging=True,
),
Request(
[StdQueries.TESTER_PRESENT_REQUEST, StdQueries.MANUFACTURER_SOFTWARE_VERSION_REQUEST],
[StdQueries.TESTER_PRESENT_RESPONSE, StdQueries.MANUFACTURER_SOFTWARE_VERSION_RESPONSE],
bus=0,
auxiliary=True,
),
],
extra_ecus=[
# We are unlikely to get a response from the PCM from behind the gateway
(Ecu.engine, 0x7e0, None),
(Ecu.shiftByWire, 0x732, None),
],
)