mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-28 01:12:05 +08:00
car docs: remove steering torque hard-coding (#25019)
remove good torque hardcoding
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user