mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-17 19:22:06 +08:00
Fix upstream merge conflicts
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ def config_realtime_process(cores: int | list[int], priority: int) -> None:
|
||||
set_core_affinity(c)
|
||||
|
||||
|
||||
def set_thread_affinity(thread: threading.Thread, cores: List[int]) -> None:
|
||||
def set_thread_affinity(thread: threading.Thread, cores: list[int]) -> None:
|
||||
try:
|
||||
process = psutil.Process(thread.ident)
|
||||
process.cpu_affinity(cores)
|
||||
|
||||
@@ -155,7 +155,7 @@ class FluxModel:
|
||||
self.friction_override = (y < 0.1)
|
||||
|
||||
|
||||
def get_nn_model_path(_car, eps_firmware) -> Tuple[Optional[str], float]:
|
||||
def get_nn_model_path(_car, eps_firmware) -> tuple[str | None, float]:
|
||||
def check_nn_path(_check_model):
|
||||
_model_path = None
|
||||
_max_similarity = -1.0
|
||||
@@ -182,7 +182,7 @@ def get_nn_model_path(_car, eps_firmware) -> Tuple[Optional[str], float]:
|
||||
return model_path, max_similarity
|
||||
|
||||
|
||||
def get_nn_model(_car, eps_firmware) -> Tuple[Optional[FluxModel], float]:
|
||||
def get_nn_model(_car, eps_firmware) -> tuple[FluxModel | None, float]:
|
||||
model, similarity_score = get_nn_model_path(_car, eps_firmware)
|
||||
if model is not None:
|
||||
model = FluxModel(model)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from cereal import car
|
||||
from typing import Tuple
|
||||
from openpilot.common.numpy_fast import clip, interp
|
||||
from openpilot.common.params import Params
|
||||
from opendbc.can.packer import CANPacker
|
||||
@@ -179,7 +178,7 @@ class CarController:
|
||||
return new_actuators, can_sends
|
||||
|
||||
# Stop and Go auto-resume thanks to martinl from subaru-community
|
||||
def stop_and_go(self, CC: car.CarControl, CS: car.CarState, throttle_cmd: bool = False, speed_cmd: bool = False) -> Tuple[bool, bool]:
|
||||
def stop_and_go(self, CC: car.CarControl, CS: car.CarState, throttle_cmd: bool = False, speed_cmd: bool = False) -> tuple[bool, bool]:
|
||||
if not self.subaru_sng:
|
||||
return throttle_cmd, speed_cmd
|
||||
if self.CP.carFingerprint in PREGLOBAL_CARS:
|
||||
|
||||
+1
-2
@@ -2,7 +2,6 @@
|
||||
import sentry_sdk
|
||||
import subprocess
|
||||
from enum import Enum
|
||||
from typing import Tuple
|
||||
from sentry_sdk.integrations.threading import ThreadingIntegration
|
||||
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
@@ -93,7 +92,7 @@ def set_tag(key: str, value: str) -> None:
|
||||
sentry_sdk.set_tag(key, value)
|
||||
|
||||
|
||||
def get_properties() -> Tuple[str, str]:
|
||||
def get_properties() -> tuple[str, str]:
|
||||
params = Params()
|
||||
dongle_id = params.get("DongleId", encoding='utf-8')
|
||||
if dongle_id in (None, UNREGISTERED_DONGLE_ID):
|
||||
|
||||
Reference in New Issue
Block a user