FW versions: import common variable (#27905)

* just import from fw_versions

* fix

* more fix
pull/27753/head
Shane Smiskol 2 years ago committed by GitHub
parent b319b340b6
commit 1520716d42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      selfdrive/car/tests/test_fw_fingerprint.py
  2. 4
      selfdrive/debug/test_fw_query_on_routes.py

@ -5,15 +5,14 @@ from collections import defaultdict
from parameterized import parameterized
from cereal import car
from selfdrive.car.car_helpers import get_interface_attr, interfaces
from selfdrive.car.car_helpers import interfaces
from selfdrive.car.fingerprints import FW_VERSIONS
from selfdrive.car.fw_versions import FW_QUERY_CONFIGS, match_fw_to_car
from selfdrive.car.fw_versions import FW_QUERY_CONFIGS, VERSIONS, match_fw_to_car
CarFw = car.CarParams.CarFw
Ecu = car.CarParams.Ecu
ECU_NAME = {v: k for k, v in Ecu.schema.enumerants.items()}
VERSIONS = get_interface_attr("FW_VERSIONS", ignore_none=True)
class TestFwFingerprint(unittest.TestCase):

@ -8,13 +8,11 @@ import traceback
from tqdm import tqdm
from tools.lib.logreader import LogReader
from tools.lib.route import Route
from selfdrive.car.interfaces import get_interface_attr
from selfdrive.car.car_helpers import interface_names
from selfdrive.car.fw_versions import match_fw_to_car
from selfdrive.car.fw_versions import VERSIONS, match_fw_to_car
NO_API = "NO_API" in os.environ
VERSIONS = get_interface_attr('FW_VERSIONS', ignore_none=True)
SUPPORTED_BRANDS = VERSIONS.keys()
SUPPORTED_CARS = [brand for brand in SUPPORTED_BRANDS for brand in interface_names[brand]]
UNKNOWN_BRAND = "unknown"

Loading…
Cancel
Save