car docs: remove steering torque hard-coding (#25019)

remove good torque hardcoding
old-commit-hash: e11bb76a64
taco
Shane Smiskol 3 years ago committed by GitHub
parent 2f3e4b1b67
commit b5ca722f34
  1. 4
      selfdrive/car/docs_definitions.py
  2. 1
      selfdrive/car/hyundai/values.py
  3. 4
      selfdrive/car/mazda/values.py
  4. 2
      selfdrive/car/subaru/values.py
  5. 1
      selfdrive/car/toyota/values.py
  6. 1
      selfdrive/car/volkswagen/values.py

@ -55,7 +55,6 @@ class CarInfo:
footnotes: Optional[List[Enum]] = None
min_steer_speed: Optional[float] = None
min_enable_speed: Optional[float] = None
good_torque: bool = False
harness: Optional[Enum] = None
def init(self, CP: car.CarParams, non_tested_cars: List[str], all_footnotes: Dict[Enum, int]):
@ -82,10 +81,11 @@ class CarInfo:
Column.LONGITUDINAL: Star.FULL if CP.openpilotLongitudinalControl and not CP.radarOffCan else Star.EMPTY,
Column.FSR_LONGITUDINAL: Star.FULL if min_enable_speed <= 0. else Star.EMPTY,
Column.FSR_STEERING: Star.FULL if min_steer_speed <= 0. else Star.EMPTY,
Column.STEERING_TORQUE: Star.FULL if self.good_torque else Star.EMPTY, # TODO: remove hardcoding and use maxLateralAccel
# Column.STEERING_TORQUE set below
Column.MAINTAINED: Star.FULL if CP.carFingerprint not in non_tested_cars and self.harness is not Harness.none else Star.EMPTY,
}
# Set steering torque star from max lateral acceleration
if not math.isnan(CP.maxLateralAccel):
if CP.maxLateralAccel >= GREAT_TORQUE_THRESHOLD:
self.row[Column.STEERING_TORQUE] = Star.FULL

@ -89,7 +89,6 @@ class HyundaiCarInfo(CarInfo):
# TODO: we can probably remove LKAS. LKAS is standard on many
# HKG and for others, it's likely packaged together with SCC
package: str = "SCC + LKAS"
good_torque: bool = True
CAR_INFO: Dict[str, Optional[Union[HyundaiCarInfo, List[HyundaiCarInfo]]]] = {

@ -40,8 +40,8 @@ CAR_INFO: Dict[str, Union[MazdaCarInfo, List[MazdaCarInfo]]] = {
CAR.CX9: MazdaCarInfo("Mazda CX-9 2016-17"),
CAR.MAZDA3: MazdaCarInfo("Mazda 3 2017"),
CAR.MAZDA6: MazdaCarInfo("Mazda 6 2017"),
CAR.CX9_2021: MazdaCarInfo("Mazda CX-9 2021", good_torque=True),
CAR.CX5_2022: MazdaCarInfo("Mazda CX-5 2022", good_torque=True),
CAR.CX9_2021: MazdaCarInfo("Mazda CX-9 2021"),
CAR.CX5_2022: MazdaCarInfo("Mazda CX-5 2022"),
}

@ -41,7 +41,7 @@ class SubaruCarInfo(CarInfo):
CAR_INFO: Dict[str, Union[SubaruCarInfo, List[SubaruCarInfo]]] = {
CAR.ASCENT: SubaruCarInfo("Subaru Ascent 2019-20", "All", good_torque=True),
CAR.ASCENT: SubaruCarInfo("Subaru Ascent 2019-20", "All"),
CAR.IMPREZA: [
SubaruCarInfo("Subaru Impreza 2017-19"),
SubaruCarInfo("Subaru Crosstrek 2018-19", video_link="https://youtu.be/Agww7oE1k-s?t=26"),

@ -99,7 +99,6 @@ class Footnote(Enum):
class ToyotaCarInfo(CarInfo):
package: str = "All"
harness: Enum = Harness.toyota
good_torque: bool = True
CAR_INFO: Dict[str, Union[ToyotaCarInfo, List[ToyotaCarInfo]]] = {

@ -114,7 +114,6 @@ class Footnote(Enum):
@dataclass
class VWCarInfo(CarInfo):
package: str = "Driver Assistance"
good_torque: bool = True
harness: Enum = Harness.vw

Loading…
Cancel
Save