Skip to content

Commit

Permalink
add Bronco Sport
Browse files Browse the repository at this point in the history
  • Loading branch information
incognitojam committed Oct 25, 2022
1 parent 9582744 commit 3c766ab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions selfdrive/car/ford/interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python3
from cereal import car
from common.conversions import Conversions as CV
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint, get_safety_config
from selfdrive.car.ford.values import CAR, Ecu, TransmissionType, GearShifter
from selfdrive.car.interfaces import CarInterfaceBase
Expand All @@ -26,6 +25,11 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, expe
ret.steerLimitTimer = 1.0
tire_stiffness_factor = 1.0

if candidate == CAR.BRONCO_SPORT_MK1:
ret.wheelbase = 2.67
ret.steerRatio = 15.0 # guess
ret.mass = 1625 + STD_CARGO_KG

if candidate == CAR.ESCAPE_MK4:
ret.wheelbase = 2.71
ret.steerRatio = 14.3 # Copied from Focus
Expand All @@ -50,7 +54,8 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, expe
ret.transmissionType = TransmissionType.automatic
else:
ret.transmissionType = TransmissionType.manual
ret.minEnableSpeed = 20.0 * CV.MPH_TO_MS
# TODO: add footnote
# ret.minEnableSpeed = 20.0 * CV.MPH_TO_MS

# BSM: Side_Detect_L_Stat, Side_Detect_R_Stat
# TODO: detect bsm in car_fw?
Expand Down
2 changes: 2 additions & 0 deletions selfdrive/car/ford/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class CANBUS:


class CAR:
BRONCO_SPORT_MK1 = "FORD BRONCO SPORT 1ST GEN"
ESCAPE_MK4 = "FORD ESCAPE 4TH GEN"
EXPLORER_MK6 = "FORD EXPLORER 6TH GEN"
FOCUS_MK4 = "FORD FOCUS 4TH GEN"
Expand All @@ -60,6 +61,7 @@ class FordCarInfo(CarInfo):


CAR_INFO: Dict[str, Union[CarInfo, List[CarInfo]]] = {
CAR.BRONCO_SPORT_MK1: FordCarInfo("Ford Bronco Sport 2021"),
CAR.ESCAPE_MK4: [
FordCarInfo("Ford Escape 2020"),
FordCarInfo("Ford Kuga EU", "Driver Assistance Pack"),
Expand Down
1 change: 1 addition & 0 deletions selfdrive/car/torque_data/override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ TESLA AP1 MODEL S: [.nan, 2.5, .nan]
TESLA AP2 MODEL S: [.nan, 2.5, .nan]

# Guess
FORD BRONCO SPORT 1ST GEN: [.nan, 1.5, .nan]
FORD ESCAPE 4TH GEN: [.nan, 1.5, .nan]
FORD EXPLORER 6TH GEN: [.nan, 1.5, .nan]
FORD FOCUS 4TH GEN: [.nan, 1.5, .nan]
Expand Down

0 comments on commit 3c766ab

Please sign in to comment.