diff --git a/selfdrive/car/car_helpers.py b/selfdrive/car/car_helpers.py index 3a5e5b8e16..46052a2366 100644 --- a/selfdrive/car/car_helpers.py +++ b/selfdrive/car/car_helpers.py @@ -81,7 +81,8 @@ def can_fingerprint(can_recv: CanRecvCallable) -> tuple[str | None, dict[int, di # **** for use live only **** -def fingerprint(can_recv: CanRecvCallable, can_send: CanSendCallable, set_obd_multiplexing: ObdCallback, num_pandas: int, cached_params: CarParams | None): +def fingerprint(can_recv: CanRecvCallable, can_send: CanSendCallable, set_obd_multiplexing: ObdCallback, num_pandas: int, + cached_params: CarParams | None) -> tuple[str | None, dict, str, list, int, bool]: fixed_fingerprint = os.environ.get('FINGERPRINT', "") skip_fw_query = os.environ.get('SKIP_FW_QUERY', False) disable_fw_cache = os.environ.get('DISABLE_FW_CACHE', False) diff --git a/selfdrive/car/card.py b/selfdrive/car/card.py index dbe16dd849..effc884948 100755 --- a/selfdrive/car/card.py +++ b/selfdrive/car/card.py @@ -115,7 +115,6 @@ class Car: cached_params_raw = self.params.get("CarParamsCache") if cached_params_raw is not None: with car.CarParams.from_bytes(cached_params_raw) as _cached_params: - # TODO: even more generic? cached_params = CarParams(carName=_cached_params.carName, carFw=_cached_params.carFw, carVin=_cached_params.carVin) self.CI = get_car(*self.can_callbacks, obd_callback(self.params), experimental_long_allowed, num_pandas, cached_params) diff --git a/selfdrive/test/process_replay/process_replay.py b/selfdrive/test/process_replay/process_replay.py index 2b12777e14..72ac775cdd 100755 --- a/selfdrive/test/process_replay/process_replay.py +++ b/selfdrive/test/process_replay/process_replay.py @@ -359,19 +359,18 @@ def get_car_params_callback(rc, pm, msgs, fingerprint): for m in canmsgs[:300]: can.send(m.as_builder().to_bytes()) can_callbacks = can_comm_callbacks(can, sendcan) - # TODO: clean this up a bit + cached_params = None if has_cached_cp: with car.CarParams.from_bytes(cached_params_raw) as _cached_params: - # TODO: even more generic? cached_params = structs.CarParams(carName=_cached_params.carName, carFw=_cached_params.carFw, carVin=_cached_params.carVin) + CP = get_car(*can_callbacks, lambda obd: None, Params().get_bool("ExperimentalLongitudinalEnabled"), cached_params=cached_params).CP if not params.get_bool("DisengageOnAccelerator"): CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.DISABLE_DISENGAGE_ON_GAS params.put("CarParams", convert_to_capnp(CP).to_bytes()) - # return CP # TODO: this isn't used? def controlsd_rcv_callback(msg, cfg, frame): diff --git a/tools/op.sh b/tools/op.sh index 7d972b0c86..a133cc4348 100755 --- a/tools/op.sh +++ b/tools/op.sh @@ -118,7 +118,7 @@ function op_check_os() { fi elif [[ "$OSTYPE" == "darwin"* ]]; then - echo -e " ↳ [${GREEN}✔${NC}] macos detected.\n" + echo -e " ↳ [${GREEN}✔${NC}] macOS detected.\n" else echo -e " ↳ [${RED}✗${NC}] OS type $OSTYPE not supported!" loge "ERROR_UNKNOWN_OS" "$OSTYPE" @@ -308,14 +308,14 @@ function op_default() { echo -e "${BOLD}${UNDERLINE}Usage:${NC} op [OPTIONS] " echo "" echo -e "${BOLD}${UNDERLINE}Commands:${NC}" - echo -e " ${BOLD}venv${NC} Activate the Python virtual environment" + echo -e " ${BOLD}venv${NC} Activate the python virtual environment" echo -e " ${BOLD}check${NC} Check the development environment (git, os, python) to start using openpilot" echo -e " ${BOLD}setup${NC} Install openpilot dependencies" echo -e " ${BOLD}build${NC} Run the openpilot build system in the current working directory" echo -e " ${BOLD}sim${NC} Run openpilot in a simulator" - echo -e " ${BOLD}juggle${NC} Run Plotjuggler" - echo -e " ${BOLD}replay${NC} Run replay" - echo -e " ${BOLD}cabana${NC} Run cabana" + echo -e " ${BOLD}juggle${NC} Run PlotJuggler" + echo -e " ${BOLD}replay${NC} Run Replay" + echo -e " ${BOLD}cabana${NC} Run Cabana" echo -e " ${BOLD}lint${NC} Run the linter" echo -e " ${BOLD}test${NC} Run all unit tests from pytest" echo -e " ${BOLD}help${NC} Show this message"