mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 16:26:14 +08:00
Toyota: remove redundant car set union (#29546)
remove confusing union
old-commit-hash: 16a8c9fbf1
This commit is contained in:
@@ -130,7 +130,7 @@ class CarState(CarStateBase):
|
||||
|
||||
cp_acc = cp_cam if self.CP.carFingerprint in (TSS2_CAR - RADAR_ACC_CAR) else cp
|
||||
|
||||
if self.CP.carFingerprint in (TSS2_CAR | RADAR_ACC_CAR):
|
||||
if self.CP.carFingerprint in TSS2_CAR:
|
||||
if not (self.CP.flags & ToyotaFlags.SMART_DSU.value):
|
||||
self.acc_type = cp_acc.vl["ACC_CONTROL"]["ACC_TYPE"]
|
||||
ret.stockFcw = bool(cp_acc.vl["PCS_HUD"]["FCW"])
|
||||
|
||||
@@ -2,14 +2,15 @@
|
||||
from cereal import car
|
||||
import unittest
|
||||
|
||||
from openpilot.selfdrive.car.toyota.values import CAR, DBC, TSS2_CAR, ANGLE_CONTROL_CAR, FW_VERSIONS
|
||||
from openpilot.selfdrive.car.toyota.values import CAR, DBC, TSS2_CAR, ANGLE_CONTROL_CAR, RADAR_ACC_CAR, FW_VERSIONS
|
||||
|
||||
Ecu = car.CarParams.Ecu
|
||||
|
||||
|
||||
class TestToyotaInterfaces(unittest.TestCase):
|
||||
def test_angle_car_set(self):
|
||||
def test_car_sets(self):
|
||||
self.assertTrue(len(ANGLE_CONTROL_CAR - TSS2_CAR) == 0)
|
||||
self.assertTrue(len(RADAR_ACC_CAR - TSS2_CAR) == 0)
|
||||
|
||||
def test_tss2_dbc(self):
|
||||
# We make some assumptions about TSS2 platforms,
|
||||
|
||||
Reference in New Issue
Block a user