mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-07-26 03:42:05 +08:00
big opendbc bump (#35799)
* bump * bump * bump * bump * bump * update refs * that doesn't work anymore * bump * update refs * bump
This commit is contained in:
+1
-1
Submodule opendbc_repo updated: 7ff7798a29...723b8e432a
@@ -190,18 +190,14 @@ class TestCarModelBase(unittest.TestCase):
|
||||
def test_car_interface(self):
|
||||
# TODO: also check for checksum violations from can parser
|
||||
can_invalid_cnt = 0
|
||||
can_valid = False
|
||||
CC = structs.CarControl().as_reader()
|
||||
|
||||
for i, msg in enumerate(self.can_msgs):
|
||||
CS = self.CI.update(msg)
|
||||
self.CI.apply(CC, msg[0])
|
||||
|
||||
if CS.canValid:
|
||||
can_valid = True
|
||||
|
||||
# wait max of 2s for low frequency msgs to be seen
|
||||
if i > 200 or can_valid:
|
||||
if i > 250:
|
||||
can_invalid_cnt += not CS.canValid
|
||||
|
||||
self.assertEqual(can_invalid_cnt, 0)
|
||||
@@ -320,7 +316,7 @@ class TestCarModelBase(unittest.TestCase):
|
||||
|
||||
vehicle_speed_seen = self.CP.steerControlType == SteerControlType.angle and not self.CP.notCar
|
||||
|
||||
for dat in msgs:
|
||||
for n, dat in enumerate(msgs):
|
||||
# due to panda updating state selectively, only edges are expected to match
|
||||
# TODO: warm up CarState with real CAN messages to check edge of both sources
|
||||
# (eg. toyota's gasPressed is the inverse of a signal being set)
|
||||
@@ -339,6 +335,8 @@ class TestCarModelBase(unittest.TestCase):
|
||||
|
||||
can = [(int(time.monotonic() * 1e9), [CanData(address=address, dat=dat, src=bus)])]
|
||||
CS = self.CI.update(can)
|
||||
if n < 5: # CANParser warmup time
|
||||
continue
|
||||
|
||||
if self.safety.get_gas_pressed_prev() != prev_panda_gas:
|
||||
self.assertEqual(CS.gasPressed, self.safety.get_gas_pressed_prev())
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'opendbc_python', 'np_version')
|
||||
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'np_version')
|
||||
|
||||
gen = "c_generated_code"
|
||||
|
||||
@@ -62,7 +62,7 @@ lenv.Clean(generated_files, Dir(gen))
|
||||
generated_lat = lenv.Command(generated_files,
|
||||
source_list,
|
||||
f"cd {Dir('.').abspath} && python3 lat_mpc.py")
|
||||
lenv.Depends(generated_lat, [msgq_python, common_python, opendbc_python])
|
||||
lenv.Depends(generated_lat, [msgq_python, common_python])
|
||||
|
||||
lenv["CFLAGS"].append("-DACADOS_WITH_QPOASES")
|
||||
lenv["CXXFLAGS"].append("-DACADOS_WITH_QPOASES")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'opendbc_python', 'pandad_python', 'np_version')
|
||||
Import('env', 'envCython', 'arch', 'msgq_python', 'common_python', 'pandad_python', 'np_version')
|
||||
|
||||
gen = "c_generated_code"
|
||||
|
||||
@@ -67,7 +67,7 @@ lenv.Clean(generated_files, Dir(gen))
|
||||
generated_long = lenv.Command(generated_files,
|
||||
source_list,
|
||||
f"cd {Dir('.').abspath} && python3 long_mpc.py")
|
||||
lenv.Depends(generated_long, [msgq_python, common_python, opendbc_python, pandad_python])
|
||||
lenv.Depends(generated_long, [msgq_python, common_python, pandad_python])
|
||||
|
||||
lenv["CFLAGS"].append("-DACADOS_WITH_QPOASES")
|
||||
lenv["CXXFLAGS"].append("-DACADOS_WITH_QPOASES")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "opendbc/can/common.h"
|
||||
#include "selfdrive/pandad/can_types.h"
|
||||
|
||||
void can_list_to_can_capnp_cpp(const std::vector<CanFrame> &can_list, std::string &out, bool sendcan, bool valid) {
|
||||
MessageBuilder msg;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
|
||||
struct CanFrame {
|
||||
long src;
|
||||
uint32_t address;
|
||||
std::vector<uint8_t> dat;
|
||||
};
|
||||
|
||||
struct CanData {
|
||||
uint64_t nanos;
|
||||
std::vector<CanFrame> frames;
|
||||
};
|
||||
@@ -6,7 +6,7 @@ from libcpp.string cimport string
|
||||
from libcpp cimport bool
|
||||
from libc.stdint cimport uint8_t, uint32_t, uint64_t
|
||||
|
||||
cdef extern from "opendbc/can/common.h":
|
||||
cdef extern from "selfdrive/pandad/can_types.h":
|
||||
cdef struct CanFrame:
|
||||
long src
|
||||
uint32_t address
|
||||
|
||||
@@ -1 +1 @@
|
||||
644db6ff218fe07af362490ac0670ffe4534e083
|
||||
bb4d3d316bc20ca57e2753ac77f055517c31bfc7
|
||||
Reference in New Issue
Block a user