|
|
@ -3,6 +3,7 @@ import time |
|
|
|
import numpy as np |
|
|
|
import numpy as np |
|
|
|
import tomllib |
|
|
|
import tomllib |
|
|
|
from abc import abstractmethod, ABC |
|
|
|
from abc import abstractmethod, ABC |
|
|
|
|
|
|
|
from enum import StrEnum |
|
|
|
from typing import Any, Dict, Optional, Tuple, List, Callable |
|
|
|
from typing import Any, Dict, Optional, Tuple, List, Callable |
|
|
|
|
|
|
|
|
|
|
|
from cereal import car |
|
|
|
from cereal import car |
|
|
@ -440,7 +441,7 @@ INTERFACE_ATTR_FILE = { |
|
|
|
|
|
|
|
|
|
|
|
# interface-specific helpers |
|
|
|
# interface-specific helpers |
|
|
|
|
|
|
|
|
|
|
|
def get_interface_attr(attr: str, combine_brands: bool = False, ignore_none: bool = False) -> Dict[str, Any]: |
|
|
|
def get_interface_attr(attr: str, combine_brands: bool = False, ignore_none: bool = False) -> Dict[str | StrEnum, Any]: |
|
|
|
# read all the folders in selfdrive/car and return a dict where: |
|
|
|
# read all the folders in selfdrive/car and return a dict where: |
|
|
|
# - keys are all the car models or brand names |
|
|
|
# - keys are all the car models or brand names |
|
|
|
# - values are attr values from all car folders |
|
|
|
# - values are attr values from all car folders |
|
|
|