Skip to content

Commit 347cee4

Browse files
big opendbc bump (#35799)
* bump * bump * bump * bump * bump * update refs * that doesn't work anymore * bump * update refs * bump
1 parent abd657e commit 347cee4

File tree

8 files changed

+27
-14
lines changed

8 files changed

+27
-14
lines changed

opendbc_repo

Submodule opendbc_repo updated 83 files

selfdrive/car/tests/test_models.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,18 +190,14 @@ def test_car_params(self):
190190
def test_car_interface(self):
191191
# TODO: also check for checksum violations from can parser
192192
can_invalid_cnt = 0
193-
can_valid = False
194193
CC = structs.CarControl().as_reader()
195194

196195
for i, msg in enumerate(self.can_msgs):
197196
CS = self.CI.update(msg)
198197
self.CI.apply(CC, msg[0])
199198

200-
if CS.canValid:
201-
can_valid = True
202-
203199
# wait max of 2s for low frequency msgs to be seen
204-
if i > 200 or can_valid:
200+
if i > 250:
205201
can_invalid_cnt += not CS.canValid
206202

207203
self.assertEqual(can_invalid_cnt, 0)
@@ -320,7 +316,7 @@ def test_panda_safety_carstate_fuzzy(self, data):
320316

321317
vehicle_speed_seen = self.CP.steerControlType == SteerControlType.angle and not self.CP.notCar
322318

323-
for dat in msgs:
319+
for n, dat in enumerate(msgs):
324320
# due to panda updating state selectively, only edges are expected to match
325321
# TODO: warm up CarState with real CAN messages to check edge of both sources
326322
# (eg. toyota's gasPressed is the inverse of a signal being set)
@@ -339,6 +335,8 @@ def test_panda_safety_carstate_fuzzy(self, data):
339335

340336
can = [(int(time.monotonic() * 1e9), [CanData(address=address, dat=dat, src=bus)])]
341337
CS = self.CI.update(can)
338+
if n < 5: # CANParser warmup time
339+
continue
342340

343341
if self.safety.get_gas_pressed_prev() != prev_panda_gas:
344342
self.assertEqual(CS.gasPressed, self.safety.get_gas_pressed_prev())

selfdrive/controls/lib/lateral_mpc_lib/SConscript

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'opendbc_python', 'np_version')
1+
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'np_version')
22

33
gen = "c_generated_code"
44

@@ -62,7 +62,7 @@ lenv.Clean(generated_files, Dir(gen))
6262
generated_lat = lenv.Command(generated_files,
6363
source_list,
6464
f"cd {Dir('.').abspath} && python3 lat_mpc.py")
65-
lenv.Depends(generated_lat, [msgq_python, common_python, opendbc_python])
65+
lenv.Depends(generated_lat, [msgq_python, common_python])
6666

6767
lenv["CFLAGS"].append("-DACADOS_WITH_QPOASES")
6868
lenv["CXXFLAGS"].append("-DACADOS_WITH_QPOASES")

selfdrive/controls/lib/longitudinal_mpc_lib/SConscript

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'opendbc_python', 'pandad_python', 'np_version')
1+
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'pandad_python', 'np_version')
22

33
gen = "c_generated_code"
44

@@ -67,7 +67,7 @@ lenv.Clean(generated_files, Dir(gen))
6767
generated_long = lenv.Command(generated_files,
6868
source_list,
6969
f"cd {Dir('.').abspath} && python3 long_mpc.py")
70-
lenv.Depends(generated_long, [msgq_python, common_python, opendbc_python, pandad_python])
70+
lenv.Depends(generated_long, [msgq_python, common_python, pandad_python])
7171

7272
lenv["CFLAGS"].append("-DACADOS_WITH_QPOASES")
7373
lenv["CXXFLAGS"].append("-DACADOS_WITH_QPOASES")

selfdrive/pandad/can_list_to_can_capnp.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "cereal/messaging/messaging.h"
2-
#include "opendbc/can/common.h"
2+
#include "selfdrive/pandad/can_types.h"
33

44
void can_list_to_can_capnp_cpp(const std::vector<CanFrame> &can_list, std::string &out, bool sendcan, bool valid) {
55
MessageBuilder msg;

selfdrive/pandad/can_types.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#pragma once
2+
3+
#include <vector>
4+
#include <cstdint>
5+
6+
struct CanFrame {
7+
long src;
8+
uint32_t address;
9+
std::vector<uint8_t> dat;
10+
};
11+
12+
struct CanData {
13+
uint64_t nanos;
14+
std::vector<CanFrame> frames;
15+
};

selfdrive/pandad/pandad_api_impl.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ from libcpp.string cimport string
66
from libcpp cimport bool
77
from libc.stdint cimport uint8_t, uint32_t, uint64_t
88

9-
cdef extern from "opendbc/can/common.h":
9+
cdef extern from "selfdrive/pandad/can_types.h":
1010
cdef struct CanFrame:
1111
long src
1212
uint32_t address
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
644db6ff218fe07af362490ac0670ffe4534e083
1+
bb4d3d316bc20ca57e2753ac77f055517c31bfc7

0 commit comments

Comments
 (0)