IQ.Pilot Prebuilt Release @ dab4674
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
from iqdbc.car.interfaces import CarControllerBase
|
||||
|
||||
|
||||
class CarController(CarControllerBase):
|
||||
def update(self, CC, CC_IQ, CS, now_nanos):
|
||||
return CC.actuators.as_builder(), []
|
||||
7
artifacts/package_runtime/iqdbc/car/mock/carstate.py
Normal file
7
artifacts/package_runtime/iqdbc/car/mock/carstate.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from iqdbc.car import structs
|
||||
from iqdbc.car.interfaces import CarStateBase
|
||||
|
||||
|
||||
class CarState(CarStateBase):
|
||||
def update(self, *_) -> tuple[structs.CarState, structs.IQCarState]:
|
||||
return structs.CarState(), structs.IQCarState()
|
||||
21
artifacts/package_runtime/iqdbc/car/mock/interface.py
Normal file
21
artifacts/package_runtime/iqdbc/car/mock/interface.py
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
from iqdbc.car import structs
|
||||
from iqdbc.car.interfaces import CarInterfaceBase
|
||||
from iqdbc.car.mock.carcontroller import CarController
|
||||
from iqdbc.car.mock.carstate import CarState
|
||||
|
||||
|
||||
# mocked car interface for dashcam mode
|
||||
class CarInterface(CarInterfaceBase):
|
||||
CarState = CarState
|
||||
CarController = CarController
|
||||
|
||||
@staticmethod
|
||||
def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_long, is_release, docs) -> structs.CarParams:
|
||||
ret.brand = "mock"
|
||||
ret.mass = 1700.
|
||||
ret.wheelbase = 2.70
|
||||
ret.centerToFront = ret.wheelbase * 0.5
|
||||
ret.steerRatio = 13.
|
||||
ret.dashcamOnly = True
|
||||
return ret
|
||||
9
artifacts/package_runtime/iqdbc/car/mock/values.py
Normal file
9
artifacts/package_runtime/iqdbc/car/mock/values.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from iqdbc.car import CarSpecs, PlatformConfig, Platforms
|
||||
|
||||
|
||||
class CAR(Platforms):
|
||||
MOCK = PlatformConfig(
|
||||
[],
|
||||
CarSpecs(mass=1700, wheelbase=2.7, steerRatio=13),
|
||||
{}
|
||||
)
|
||||
Reference in New Issue
Block a user