diff --git a/body/board/obj/body.bin b/body/board/obj/body.bin index c6d0a958b..dc81d676b 100755 Binary files a/body/board/obj/body.bin and b/body/board/obj/body.bin differ diff --git a/body/board/obj/body.bin.signed b/body/board/obj/body.bin.signed index 66bae094c..cc6e83daf 100644 Binary files a/body/board/obj/body.bin.signed and b/body/board/obj/body.bin.signed differ diff --git a/body/board/obj/body.elf b/body/board/obj/body.elf index c192109ed..96e678ff3 100755 Binary files a/body/board/obj/body.elf and b/body/board/obj/body.elf differ diff --git a/body/board/obj/bootstub.body.bin b/body/board/obj/bootstub.body.bin index cace2c16c..e2f31bf2b 100755 Binary files a/body/board/obj/bootstub.body.bin and b/body/board/obj/bootstub.body.bin differ diff --git a/body/board/obj/bootstub.body.elf b/body/board/obj/bootstub.body.elf index c64d5f593..0b154d2b6 100755 Binary files a/body/board/obj/bootstub.body.elf and b/body/board/obj/bootstub.body.elf differ diff --git a/body/board/obj/gitversion.h b/body/board/obj/gitversion.h index fef046edc..58553a8f1 100644 --- a/body/board/obj/gitversion.h +++ b/body/board/obj/gitversion.h @@ -1 +1 @@ -const uint8_t gitversion[8] = "56e43cbd"; +const uint8_t gitversion[8] = "d9f36a6a"; diff --git a/cereal/messaging/__init__.py b/cereal/messaging/__init__.py index 5a863f130..efddea1b1 100644 --- a/cereal/messaging/__init__.py +++ b/cereal/messaging/__init__.py @@ -1,6 +1,7 @@ # must be built with scons -from .messaging_pyx import Context, Poller, SubSocket, PubSocket, SocketEventHandle, toggle_fake_events, set_fake_prefix, get_fake_prefix, delete_fake_prefix, wait_for_one_event # pylint: disable=no-name-in-module, import-error -from .messaging_pyx import MultiplePublishersError, MessagingError # pylint: disable=no-name-in-module, import-error +from .messaging_pyx import Context, Poller, SubSocket, PubSocket, SocketEventHandle, toggle_fake_events, \ + set_fake_prefix, get_fake_prefix, delete_fake_prefix, wait_for_one_event +from .messaging_pyx import MultiplePublishersError, MessagingError import os import capnp diff --git a/cereal/messaging/messaging.h b/cereal/messaging/messaging.h index 483b2465c..d768ccb9b 100644 --- a/cereal/messaging/messaging.h +++ b/cereal/messaging/messaging.h @@ -116,6 +116,18 @@ public: return heapArray_.asBytes(); } + size_t getSerializedSize() { + return capnp::computeSerializedSizeInWords(*this) * sizeof(capnp::word); + } + + int serializeToBuffer(unsigned char *buffer, size_t buffer_size) { + size_t serialized_size = getSerializedSize(); + if (serialized_size > buffer_size) { return -1; } + kj::ArrayOutputStream out(kj::ArrayPtr(buffer, buffer_size)); + capnp::writeMessage(out, *this); + return serialized_size; + } + private: kj::Array heapArray_; }; diff --git a/cereal/visionipc/__init__.py b/cereal/visionipc/__init__.py index 3e11bbbb7..7adfc58d1 100644 --- a/cereal/visionipc/__init__.py +++ b/cereal/visionipc/__init__.py @@ -1,4 +1,4 @@ -from cereal.visionipc.visionipc_pyx import VisionBuf, VisionIpcClient, VisionIpcServer, VisionStreamType, get_endpoint_name # pylint: disable=no-name-in-module, import-error +from cereal.visionipc.visionipc_pyx import VisionBuf, VisionIpcClient, VisionIpcServer, VisionStreamType, get_endpoint_name assert VisionBuf assert VisionIpcClient assert VisionIpcServer diff --git a/laika/astro_dog.py b/laika/astro_dog.py index a2d01946a..14dd21ac5 100644 --- a/laika/astro_dog.py +++ b/laika/astro_dog.py @@ -40,7 +40,7 @@ class AstroDog: for const in valid_const: if not isinstance(const, ConstellationId): raise TypeError(f"valid_const must be a list of ConstellationId, got {const}") - + self.auto_update = auto_update self.cache_dir = cache_dir self.clear_old_ephemeris = clear_old_ephemeris diff --git a/laika/downloader.py b/laika/downloader.py index c0bbb584f..f1fd69d75 100644 --- a/laika/downloader.py +++ b/laika/downloader.py @@ -185,7 +185,7 @@ def https_download_file(url): crl.setopt(crl.SSL_CIPHER_LIST, 'DEFAULT@SECLEVEL=1') crl.setopt(crl.COOKIEJAR, '/tmp/cddis_cookies') crl.setopt(pycurl.CONNECTTIMEOUT, 10) - + buf = BytesIO() crl.setopt(crl.WRITEDATA, buf) crl.perform() diff --git a/laika/ephemeris.py b/laika/ephemeris.py index fa8dbdf8d..116db01b5 100644 --- a/laika/ephemeris.py +++ b/laika/ephemeris.py @@ -455,7 +455,7 @@ def parse_rinex_nav_msg_glonass(file_name): e['n4'], e['nt'], toe_seconds = epoch.as_glonass() tb = toe_seconds / (15 * SECS_IN_MIN) - + e['tb'] = tb e['tauN'] = -float(line[23:42]) @@ -465,12 +465,12 @@ def parse_rinex_nav_msg_glonass(file_name): e['x'], e['xVel'], e['xAccel'], e['svHealth'] = read4(f, rinex_ver) e['y'], e['yVel'], e['yAccel'], e['freqNum'] = read4(f, rinex_ver) e['z'], e['zVel'], e['zAccel'], e['age'] = read4(f, rinex_ver) - + # TODO unclear why glonass sometimes has nav messages 3s after correct one if abs(tb - int(tb)) > 1e-3: continue - + data_struct = ephemeris_structs.GlonassEphemeris.new_message(**e) ephem = GLONASSEphemeris(data_struct, file_name=file_name) diff --git a/laika/raw_gnss.py b/laika/raw_gnss.py index 405a96ef2..92ae0d858 100644 --- a/laika/raw_gnss.py +++ b/laika/raw_gnss.py @@ -53,8 +53,8 @@ class GNSSMeasurement: SAT_POS = slice(8, 11) SAT_VEL = slice(11, 14) - def __init__(self, constellation_id: ConstellationId, sv_id: int, recv_time_week: int, recv_time_sec: float, observables: Dict[str, float], observables_std: Dict[str, float], - glonass_freq: Union[int, float, None] = None): + def __init__(self, constellation_id: ConstellationId, sv_id: int, recv_time_week: int, recv_time_sec: float, observables: Dict[str, float], + observables_std: Dict[str, float], glonass_freq: Union[int, float, None] = None): # Metadata # prn: unique satellite id self.prn = "%s%02d" % (constellation_id.to_rinex_char(), sv_id) # satellite ID in rinex convention @@ -201,7 +201,8 @@ def read_raw_qcom(report): # logging.debug(recv_time, report.source, time_bias_ms, dr) measurements = [] for i in report.sv: - nmea_id = i.svId # todo change svId to nmea_id in cereal message. Or better: change the publisher to publish correct svId's, since constellation id is also given + # todo change svId to nmea_id in cereal message. Or better: change the publisher to publish correct svId's, since constellation id is also given + nmea_id = i.svId if nmea_id == 255: # TODO nmea_id is not valid. Fix publisher continue diff --git a/opendbc/can/parser_pyx.cpp b/opendbc/can/parser_pyx.cpp index e24fe9838..e76b3b4a3 100644 --- a/opendbc/can/parser_pyx.cpp +++ b/opendbc/can/parser_pyx.cpp @@ -1439,7 +1439,7 @@ struct __pyx_obj_7opendbc_3can_10parser_pyx_CANParser { }; -/* "opendbc/can/parser_pyx.pyx":143 +/* "opendbc/can/parser_pyx.pyx":147 * * * cdef class CANDefine(): # <<<<<<<<<<<<<< @@ -1467,7 +1467,7 @@ struct __pyx_obj_7opendbc_3can_10parser_pyx___pyx_scope_struct____init__ { }; -/* "opendbc/can/parser_pyx.pyx":88 +/* "opendbc/can/parser_pyx.pyx":92 * unchecked = signal_addrs - checked_addrs * if len(unchecked): * err_msg = ", ".join(f"{self.address_to_msg_name[addr].decode()} ({hex(addr)})" for addr in unchecked) # <<<<<<<<<<<<<< @@ -1482,7 +1482,7 @@ struct __pyx_obj_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr { }; -/* "opendbc/can/parser_pyx.pyx":98 +/* "opendbc/can/parser_pyx.pyx":102 * signal_options_v.push_back(spo) * * message_options = dict((address, 0) for _, address in signals) # <<<<<<<<<<<<<< @@ -4010,7 +4010,7 @@ static int __pyx_pw_7opendbc_3can_10parser_pyx_9CANParser_1__init__(PyObject *__ } static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "opendbc/can/parser_pyx.pyx":88 +/* "opendbc/can/parser_pyx.pyx":92 * unchecked = signal_addrs - checked_addrs * if len(unchecked): * err_msg = ", ".join(f"{self.address_to_msg_name[addr].decode()} ({hex(addr)})" for addr in unchecked) # <<<<<<<<<<<<<< @@ -4030,7 +4030,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_8__init___genexp if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 88, __pyx_L1_error) + __PYX_ERR(0, 92, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -4041,7 +4041,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_8__init___genexp __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_opendbc_can_parser_pyx); if (unlikely(!gen)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_opendbc_can_parser_pyx); if (unlikely(!gen)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4082,34 +4082,34 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___2gener return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 88, __pyx_L1_error) - __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 88, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 88, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 92, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 92, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 92, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -4119,7 +4119,7 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___2gener PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 88, __pyx_L1_error) + else __PYX_ERR(0, 92, __pyx_L1_error) } break; } @@ -4129,13 +4129,13 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___2gener __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_addr, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = 127; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 88, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_cur_scope->__pyx_v_addr); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L1_error) - __pyx_t_8 = __Pyx_decode_cpp_string((__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->address_to_msg_name[__pyx_t_7]), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 88, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 92, __pyx_L1_error) } + __pyx_t_7 = __Pyx_PyInt_As_uint32_t(__pyx_cur_scope->__pyx_v_addr); if (unlikely((__pyx_t_7 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_t_8 = __Pyx_decode_cpp_string((__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->address_to_msg_name[__pyx_t_7]), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_6; __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8); @@ -4146,9 +4146,9 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___2gener __pyx_t_5 += 2; __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u_); - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_cur_scope->__pyx_v_addr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_cur_scope->__pyx_v_addr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_6; @@ -4160,10 +4160,10 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___2gener __pyx_t_5 += 1; __Pyx_GIVEREF(__pyx_kp_u__2); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_kp_u__2); - __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 88, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -4191,7 +4191,7 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___2gener } static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "opendbc/can/parser_pyx.pyx":98 +/* "opendbc/can/parser_pyx.pyx":102 * signal_options_v.push_back(spo) * * message_options = dict((address, 0) for _, address in signals) # <<<<<<<<<<<<<< @@ -4211,7 +4211,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_8__init___3genex if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 98, __pyx_L1_error) + __PYX_ERR(0, 102, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -4219,7 +4219,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_8__init___3genex __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___5generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_opendbc_can_parser_pyx); if (unlikely(!gen)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___5generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_opendbc_can_parser_pyx); if (unlikely(!gen)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4259,34 +4259,34 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___5gener return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 98, __pyx_L1_error) - __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 98, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 98, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 102, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 102, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 102, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -4296,7 +4296,7 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___5gener PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 98, __pyx_L1_error) + else __PYX_ERR(0, 102, __pyx_L1_error) } break; } @@ -4308,7 +4308,7 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___5gener if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 98, __pyx_L1_error) + __PYX_ERR(0, 102, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -4321,15 +4321,15 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___5gener __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); @@ -4337,7 +4337,7 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___5gener __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 98, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 102, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L7_unpacking_done; @@ -4345,7 +4345,7 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___5gener __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 98, __pyx_L1_error) + __PYX_ERR(0, 102, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__); @@ -4356,7 +4356,7 @@ static PyObject *__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___5gener __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_address, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_address, (PyObject*)__pyx_int_0))) __PYX_ERR(0, 98, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_address, (PyObject*)__pyx_int_0))) __PYX_ERR(0, 102, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -4459,6 +4459,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_INCREF(__pyx_v_checks); + __Pyx_INCREF(__pyx_v_enforce_checks); /* "opendbc/can/parser_pyx.pyx":32 * @@ -4526,7 +4527,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ * if not self.dbc: * raise RuntimeError(f"Can't find DBC: {dbc_name}") # <<<<<<<<<<<<<< * - * self.vl = {} + * # rick - disable checks */ __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_dbc_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -4549,14 +4550,36 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ */ } - /* "opendbc/can/parser_pyx.pyx":40 - * raise RuntimeError(f"Can't find DBC: {dbc_name}") + /* "opendbc/can/parser_pyx.pyx":41 + * + * # rick - disable checks + * checks = [] # <<<<<<<<<<<<<< + * enforce_checks = False + * + */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_checks, __pyx_t_2); + __pyx_t_2 = 0; + + /* "opendbc/can/parser_pyx.pyx":42 + * # rick - disable checks + * checks = [] + * enforce_checks = False # <<<<<<<<<<<<<< + * + * self.vl = {} + */ + __Pyx_INCREF(Py_False); + __Pyx_DECREF_SET(__pyx_v_enforce_checks, Py_False); + + /* "opendbc/can/parser_pyx.pyx":44 + * enforce_checks = False * * self.vl = {} # <<<<<<<<<<<<<< * self.vl_all = {} * self.ts_nanos = {} */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->vl); @@ -4564,14 +4587,14 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_cur_scope->__pyx_v_self->vl = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":41 + /* "opendbc/can/parser_pyx.pyx":45 * * self.vl = {} * self.vl_all = {} # <<<<<<<<<<<<<< * self.ts_nanos = {} * msg_name_to_address = {} */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->vl_all); @@ -4579,14 +4602,14 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_cur_scope->__pyx_v_self->vl_all = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":42 + /* "opendbc/can/parser_pyx.pyx":46 * self.vl = {} * self.vl_all = {} * self.ts_nanos = {} # <<<<<<<<<<<<<< * msg_name_to_address = {} * msg_address_to_signals = {} */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->ts_nanos); @@ -4594,31 +4617,31 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_cur_scope->__pyx_v_self->ts_nanos = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":43 + /* "opendbc/can/parser_pyx.pyx":47 * self.vl_all = {} * self.ts_nanos = {} * msg_name_to_address = {} # <<<<<<<<<<<<<< * msg_address_to_signals = {} * */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_msg_name_to_address = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":44 + /* "opendbc/can/parser_pyx.pyx":48 * self.ts_nanos = {} * msg_name_to_address = {} * msg_address_to_signals = {} # <<<<<<<<<<<<<< * * for i in range(self.dbc[0].msgs.size()): */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_msg_address_to_signals = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":46 + /* "opendbc/can/parser_pyx.pyx":50 * msg_address_to_signals = {} * * for i in range(self.dbc[0].msgs.size()): # <<<<<<<<<<<<<< @@ -4630,7 +4653,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; - /* "opendbc/can/parser_pyx.pyx":47 + /* "opendbc/can/parser_pyx.pyx":51 * * for i in range(self.dbc[0].msgs.size()): * msg = self.dbc[0].msgs[i] # <<<<<<<<<<<<<< @@ -4639,46 +4662,46 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ */ __pyx_v_msg = ((__pyx_cur_scope->__pyx_v_self->dbc[0]).msgs[__pyx_v_i]); - /* "opendbc/can/parser_pyx.pyx":48 + /* "opendbc/can/parser_pyx.pyx":52 * for i in range(self.dbc[0].msgs.size()): * msg = self.dbc[0].msgs[i] * name = msg.name.decode("utf8") # <<<<<<<<<<<<<< * * msg_name_to_address[name] = msg.address */ - __pyx_t_2 = __Pyx_decode_cpp_string(__pyx_v_msg.name, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_cpp_string(__pyx_v_msg.name, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":50 + /* "opendbc/can/parser_pyx.pyx":54 * name = msg.name.decode("utf8") * * msg_name_to_address[name] = msg.address # <<<<<<<<<<<<<< * msg_address_to_signals[msg.address] = set() * for sig in msg.sigs: */ - __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely((PyDict_SetItem(__pyx_v_msg_name_to_address, __pyx_v_name, __pyx_t_2) < 0))) __PYX_ERR(0, 50, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_msg_name_to_address, __pyx_v_name, __pyx_t_2) < 0))) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":51 + /* "opendbc/can/parser_pyx.pyx":55 * * msg_name_to_address[name] = msg.address * msg_address_to_signals[msg.address] = set() # <<<<<<<<<<<<<< * for sig in msg.sigs: * msg_address_to_signals[msg.address].add(sig.name.decode("utf8")) */ - __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((PyDict_SetItem(__pyx_v_msg_address_to_signals, __pyx_t_4, __pyx_t_2) < 0))) __PYX_ERR(0, 51, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_msg_address_to_signals, __pyx_t_4, __pyx_t_2) < 0))) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":52 + /* "opendbc/can/parser_pyx.pyx":56 * msg_name_to_address[name] = msg.address * msg_address_to_signals[msg.address] = set() * for sig in msg.sigs: # <<<<<<<<<<<<<< @@ -4692,22 +4715,22 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ ++__pyx_t_8; __pyx_v_sig = __pyx_t_9; - /* "opendbc/can/parser_pyx.pyx":53 + /* "opendbc/can/parser_pyx.pyx":57 * msg_address_to_signals[msg.address] = set() * for sig in msg.sigs: * msg_address_to_signals[msg.address].add(sig.name.decode("utf8")) # <<<<<<<<<<<<<< * * self.address_to_msg_name[msg.address] = name */ - __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_msg_address_to_signals, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_msg_address_to_signals, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_decode_cpp_string(__pyx_v_sig.name, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_10 = __Pyx_decode_cpp_string(__pyx_v_sig.name, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; __pyx_t_12 = 0; @@ -4726,13 +4749,13 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":52 + /* "opendbc/can/parser_pyx.pyx":56 * msg_name_to_address[name] = msg.address * msg_address_to_signals[msg.address] = set() * for sig in msg.sigs: # <<<<<<<<<<<<<< @@ -4741,36 +4764,36 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ */ } - /* "opendbc/can/parser_pyx.pyx":55 + /* "opendbc/can/parser_pyx.pyx":59 * msg_address_to_signals[msg.address].add(sig.name.decode("utf8")) * * self.address_to_msg_name[msg.address] = name # <<<<<<<<<<<<<< * self.vl[msg.address] = {} * self.vl[name] = self.vl[msg.address] */ - __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 59, __pyx_L1_error) (__pyx_cur_scope->__pyx_v_self->address_to_msg_name[__pyx_v_msg.address]) = __pyx_t_3; - /* "opendbc/can/parser_pyx.pyx":56 + /* "opendbc/can/parser_pyx.pyx":60 * * self.address_to_msg_name[msg.address] = name * self.vl[msg.address] = {} # <<<<<<<<<<<<<< * self.vl[name] = self.vl[msg.address] * self.vl_all[msg.address] = {} */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_cur_scope->__pyx_v_self->vl == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 56, __pyx_L1_error) + __PYX_ERR(0, 60, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->vl, __pyx_t_4, __pyx_t_2) < 0))) __PYX_ERR(0, 56, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->vl, __pyx_t_4, __pyx_t_2) < 0))) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":57 + /* "opendbc/can/parser_pyx.pyx":61 * self.address_to_msg_name[msg.address] = name * self.vl[msg.address] = {} * self.vl[name] = self.vl[msg.address] # <<<<<<<<<<<<<< @@ -4779,40 +4802,40 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ */ if (unlikely(__pyx_cur_scope->__pyx_v_self->vl == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 57, __pyx_L1_error) + __PYX_ERR(0, 61, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_self->vl, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_self->vl, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_cur_scope->__pyx_v_self->vl == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 57, __pyx_L1_error) + __PYX_ERR(0, 61, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->vl, __pyx_v_name, __pyx_t_4) < 0))) __PYX_ERR(0, 57, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->vl, __pyx_v_name, __pyx_t_4) < 0))) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "opendbc/can/parser_pyx.pyx":58 + /* "opendbc/can/parser_pyx.pyx":62 * self.vl[msg.address] = {} * self.vl[name] = self.vl[msg.address] * self.vl_all[msg.address] = {} # <<<<<<<<<<<<<< * self.vl_all[name] = self.vl_all[msg.address] * self.ts_nanos[msg.address] = {} */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_cur_scope->__pyx_v_self->vl_all == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 58, __pyx_L1_error) + __PYX_ERR(0, 62, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->vl_all, __pyx_t_2, __pyx_t_4) < 0))) __PYX_ERR(0, 58, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->vl_all, __pyx_t_2, __pyx_t_4) < 0))) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "opendbc/can/parser_pyx.pyx":59 + /* "opendbc/can/parser_pyx.pyx":63 * self.vl[name] = self.vl[msg.address] * self.vl_all[msg.address] = {} * self.vl_all[name] = self.vl_all[msg.address] # <<<<<<<<<<<<<< @@ -4821,40 +4844,40 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ */ if (unlikely(__pyx_cur_scope->__pyx_v_self->vl_all == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 59, __pyx_L1_error) + __PYX_ERR(0, 63, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_self->vl_all, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_self->vl_all, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_cur_scope->__pyx_v_self->vl_all == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 59, __pyx_L1_error) + __PYX_ERR(0, 63, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->vl_all, __pyx_v_name, __pyx_t_2) < 0))) __PYX_ERR(0, 59, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->vl_all, __pyx_v_name, __pyx_t_2) < 0))) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":60 + /* "opendbc/can/parser_pyx.pyx":64 * self.vl_all[msg.address] = {} * self.vl_all[name] = self.vl_all[msg.address] * self.ts_nanos[msg.address] = {} # <<<<<<<<<<<<<< * self.ts_nanos[name] = self.ts_nanos[msg.address] * */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_cur_scope->__pyx_v_self->ts_nanos == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 60, __pyx_L1_error) + __PYX_ERR(0, 64, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->ts_nanos, __pyx_t_4, __pyx_t_2) < 0))) __PYX_ERR(0, 60, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->ts_nanos, __pyx_t_4, __pyx_t_2) < 0))) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":61 + /* "opendbc/can/parser_pyx.pyx":65 * self.vl_all[name] = self.vl_all[msg.address] * self.ts_nanos[msg.address] = {} * self.ts_nanos[name] = self.ts_nanos[msg.address] # <<<<<<<<<<<<<< @@ -4863,71 +4886,71 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ */ if (unlikely(__pyx_cur_scope->__pyx_v_self->ts_nanos == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 61, __pyx_L1_error) + __PYX_ERR(0, 65, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_uint32_t(__pyx_v_msg.address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_self->ts_nanos, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_self->ts_nanos, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_cur_scope->__pyx_v_self->ts_nanos == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 61, __pyx_L1_error) + __PYX_ERR(0, 65, __pyx_L1_error) } - if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->ts_nanos, __pyx_v_name, __pyx_t_4) < 0))) __PYX_ERR(0, 61, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->ts_nanos, __pyx_v_name, __pyx_t_4) < 0))) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "opendbc/can/parser_pyx.pyx":64 + /* "opendbc/can/parser_pyx.pyx":68 * * # Convert message names into addresses * for i in range(len(signals)): # <<<<<<<<<<<<<< * s = signals[i] * address = s[1] if isinstance(s[1], numbers.Number) else msg_name_to_address.get(s[1]) */ - __pyx_t_13 = PyObject_Length(__pyx_v_signals); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 64, __pyx_L1_error) + __pyx_t_13 = PyObject_Length(__pyx_v_signals); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 68, __pyx_L1_error) __pyx_t_14 = __pyx_t_13; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_14; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "opendbc/can/parser_pyx.pyx":65 + /* "opendbc/can/parser_pyx.pyx":69 * # Convert message names into addresses * for i in range(len(signals)): * s = signals[i] # <<<<<<<<<<<<<< * address = s[1] if isinstance(s[1], numbers.Number) else msg_name_to_address.get(s[1]) * if address not in msg_address_to_signals: */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_signals, __pyx_v_i, std::vector ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_signals, __pyx_v_i, std::vector ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4); __pyx_t_4 = 0; - /* "opendbc/can/parser_pyx.pyx":66 + /* "opendbc/can/parser_pyx.pyx":70 * for i in range(len(signals)): * s = signals[i] * address = s[1] if isinstance(s[1], numbers.Number) else msg_name_to_address.get(s[1]) # <<<<<<<<<<<<<< * if address not in msg_address_to_signals: * raise RuntimeError(f"could not find message {repr(s[1])} in DBC {self.dbc_name}") */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_numbers); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_numbers); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_Number); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_Number); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_t_2, __pyx_t_11); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_t_2, __pyx_t_11); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_1) { - __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __pyx_t_11; __pyx_t_11 = 0; } else { - __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_msg_name_to_address, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_msg_name_to_address, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_4 = __pyx_t_2; @@ -4936,24 +4959,24 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_XDECREF_SET(__pyx_v_address, __pyx_t_4); __pyx_t_4 = 0; - /* "opendbc/can/parser_pyx.pyx":67 + /* "opendbc/can/parser_pyx.pyx":71 * s = signals[i] * address = s[1] if isinstance(s[1], numbers.Number) else msg_name_to_address.get(s[1]) * if address not in msg_address_to_signals: # <<<<<<<<<<<<<< * raise RuntimeError(f"could not find message {repr(s[1])} in DBC {self.dbc_name}") * if s[0] not in msg_address_to_signals[address]: */ - __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_address, __pyx_v_msg_address_to_signals, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_address, __pyx_v_msg_address_to_signals, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 71, __pyx_L1_error) if (unlikely(__pyx_t_1)) { - /* "opendbc/can/parser_pyx.pyx":68 + /* "opendbc/can/parser_pyx.pyx":72 * address = s[1] if isinstance(s[1], numbers.Number) else msg_name_to_address.get(s[1]) * if address not in msg_address_to_signals: * raise RuntimeError(f"could not find message {repr(s[1])} in DBC {self.dbc_name}") # <<<<<<<<<<<<<< * if s[0] not in msg_address_to_signals[address]: * raise RuntimeError(f"could not find signal {repr(s[0])} in {repr(s[1])}, DBC {self.dbc_name}") */ - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = 0; __pyx_t_16 = 127; @@ -4961,12 +4984,12 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_t_15 += 23; __Pyx_GIVEREF(__pyx_kp_u_could_not_find_message); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_could_not_find_message); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_11 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_16; @@ -4978,9 +5001,9 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_t_15 += 8; __Pyx_GIVEREF(__pyx_kp_u_in_DBC); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_in_DBC); - __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_cur_scope->__pyx_v_self->dbc_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_cur_scope->__pyx_v_self->dbc_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_16; @@ -4988,17 +5011,17 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 68, __pyx_L1_error) + __PYX_ERR(0, 72, __pyx_L1_error) - /* "opendbc/can/parser_pyx.pyx":67 + /* "opendbc/can/parser_pyx.pyx":71 * s = signals[i] * address = s[1] if isinstance(s[1], numbers.Number) else msg_name_to_address.get(s[1]) * if address not in msg_address_to_signals: # <<<<<<<<<<<<<< @@ -5007,30 +5030,30 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ */ } - /* "opendbc/can/parser_pyx.pyx":69 + /* "opendbc/can/parser_pyx.pyx":73 * if address not in msg_address_to_signals: * raise RuntimeError(f"could not find message {repr(s[1])} in DBC {self.dbc_name}") * if s[0] not in msg_address_to_signals[address]: # <<<<<<<<<<<<<< * raise RuntimeError(f"could not find signal {repr(s[0])} in {repr(s[1])}, DBC {self.dbc_name}") * */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_s, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_s, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_msg_address_to_signals, __pyx_v_address); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_msg_address_to_signals, __pyx_v_address); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_t_11, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_t_11, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(__pyx_t_1)) { - /* "opendbc/can/parser_pyx.pyx":70 + /* "opendbc/can/parser_pyx.pyx":74 * raise RuntimeError(f"could not find message {repr(s[1])} in DBC {self.dbc_name}") * if s[0] not in msg_address_to_signals[address]: * raise RuntimeError(f"could not find signal {repr(s[0])} in {repr(s[1])}, DBC {self.dbc_name}") # <<<<<<<<<<<<<< * * signals[i] = (s[0], address) */ - __pyx_t_11 = PyTuple_New(6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_15 = 0; __pyx_t_16 = 127; @@ -5038,12 +5061,12 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_t_15 += 22; __Pyx_GIVEREF(__pyx_kp_u_could_not_find_signal); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_u_could_not_find_signal); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_s, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_s, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyObject_Repr(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_2 = PyObject_Repr(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_16; @@ -5055,12 +5078,12 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_t_15 += 4; __Pyx_GIVEREF(__pyx_kp_u_in); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_kp_u_in); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyObject_Repr(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_2 = PyObject_Repr(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_16; @@ -5072,9 +5095,9 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_t_15 += 6; __Pyx_GIVEREF(__pyx_kp_u_DBC); PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_kp_u_DBC); - __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_cur_scope->__pyx_v_self->dbc_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_cur_scope->__pyx_v_self->dbc_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_16; @@ -5082,17 +5105,17 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_11, 6, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_11, 6, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __PYX_ERR(0, 70, __pyx_L1_error) + __PYX_ERR(0, 74, __pyx_L1_error) - /* "opendbc/can/parser_pyx.pyx":69 + /* "opendbc/can/parser_pyx.pyx":73 * if address not in msg_address_to_signals: * raise RuntimeError(f"could not find message {repr(s[1])} in DBC {self.dbc_name}") * if s[0] not in msg_address_to_signals[address]: # <<<<<<<<<<<<<< @@ -5101,16 +5124,16 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ */ } - /* "opendbc/can/parser_pyx.pyx":72 + /* "opendbc/can/parser_pyx.pyx":76 * raise RuntimeError(f"could not find signal {repr(s[0])} in {repr(s[1])}, DBC {self.dbc_name}") * * signals[i] = (s[0], address) # <<<<<<<<<<<<<< * * for i in range(len(checks)): */ - __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_s, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_s, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11); @@ -5118,86 +5141,86 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_GIVEREF(__pyx_v_address); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_address); __pyx_t_11 = 0; - if (unlikely((__Pyx_SetItemInt(__pyx_v_signals, __pyx_v_i, __pyx_t_2, std::vector ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0))) __PYX_ERR(0, 72, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_signals, __pyx_v_i, __pyx_t_2, std::vector ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0))) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "opendbc/can/parser_pyx.pyx":74 + /* "opendbc/can/parser_pyx.pyx":78 * signals[i] = (s[0], address) * * for i in range(len(checks)): # <<<<<<<<<<<<<< * c = checks[i] * if not isinstance(c[0], numbers.Number): */ - __pyx_t_13 = PyObject_Length(__pyx_v_checks); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_13 = PyObject_Length(__pyx_v_checks); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 78, __pyx_L1_error) __pyx_t_14 = __pyx_t_13; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_14; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "opendbc/can/parser_pyx.pyx":75 + /* "opendbc/can/parser_pyx.pyx":79 * * for i in range(len(checks)): * c = checks[i] # <<<<<<<<<<<<<< * if not isinstance(c[0], numbers.Number): * if c[0] not in msg_name_to_address: */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_checks, __pyx_v_i, std::vector ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_checks, __pyx_v_i, std::vector ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":76 + /* "opendbc/can/parser_pyx.pyx":80 * for i in range(len(checks)): * c = checks[i] * if not isinstance(c[0], numbers.Number): # <<<<<<<<<<<<<< * if c[0] not in msg_name_to_address: * print(msg_name_to_address) */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_c, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_c, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_numbers); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_numbers); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_Number); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_Number); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_t_2, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_t_2, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_17 = (!__pyx_t_1); if (__pyx_t_17) { - /* "opendbc/can/parser_pyx.pyx":77 + /* "opendbc/can/parser_pyx.pyx":81 * c = checks[i] * if not isinstance(c[0], numbers.Number): * if c[0] not in msg_name_to_address: # <<<<<<<<<<<<<< * print(msg_name_to_address) * raise RuntimeError(f"could not find message {repr(c[0])} in DBC {self.dbc_name}") */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_c, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_c, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_17 = (__Pyx_PyDict_ContainsTF(__pyx_t_4, __pyx_v_msg_name_to_address, Py_NE)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_17 = (__Pyx_PyDict_ContainsTF(__pyx_t_4, __pyx_v_msg_name_to_address, Py_NE)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_t_17)) { - /* "opendbc/can/parser_pyx.pyx":78 + /* "opendbc/can/parser_pyx.pyx":82 * if not isinstance(c[0], numbers.Number): * if c[0] not in msg_name_to_address: * print(msg_name_to_address) # <<<<<<<<<<<<<< * raise RuntimeError(f"could not find message {repr(c[0])} in DBC {self.dbc_name}") * c = (msg_name_to_address[c[0]], c[1]) */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_msg_name_to_address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_msg_name_to_address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "opendbc/can/parser_pyx.pyx":79 + /* "opendbc/can/parser_pyx.pyx":83 * if c[0] not in msg_name_to_address: * print(msg_name_to_address) * raise RuntimeError(f"could not find message {repr(c[0])} in DBC {self.dbc_name}") # <<<<<<<<<<<<<< * c = (msg_name_to_address[c[0]], c[1]) * checks[i] = c */ - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = 0; __pyx_t_16 = 127; @@ -5205,12 +5228,12 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_t_15 += 23; __Pyx_GIVEREF(__pyx_kp_u_could_not_find_message); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_could_not_find_message); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_c, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_c, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_11 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_16; @@ -5222,9 +5245,9 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_t_15 += 8; __Pyx_GIVEREF(__pyx_kp_u_in_DBC); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_in_DBC); - __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_cur_scope->__pyx_v_self->dbc_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_cur_scope->__pyx_v_self->dbc_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_16; @@ -5232,17 +5255,17 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 79, __pyx_L1_error) + __PYX_ERR(0, 83, __pyx_L1_error) - /* "opendbc/can/parser_pyx.pyx":77 + /* "opendbc/can/parser_pyx.pyx":81 * c = checks[i] * if not isinstance(c[0], numbers.Number): * if c[0] not in msg_name_to_address: # <<<<<<<<<<<<<< @@ -5251,21 +5274,21 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ */ } - /* "opendbc/can/parser_pyx.pyx":80 + /* "opendbc/can/parser_pyx.pyx":84 * print(msg_name_to_address) * raise RuntimeError(f"could not find message {repr(c[0])} in DBC {self.dbc_name}") * c = (msg_name_to_address[c[0]], c[1]) # <<<<<<<<<<<<<< * checks[i] = c * */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_c, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_c, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_msg_name_to_address, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_msg_name_to_address, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_c, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_c, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11); @@ -5276,16 +5299,16 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_DECREF_SET(__pyx_v_c, __pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":81 + /* "opendbc/can/parser_pyx.pyx":85 * raise RuntimeError(f"could not find message {repr(c[0])} in DBC {self.dbc_name}") * c = (msg_name_to_address[c[0]], c[1]) * checks[i] = c # <<<<<<<<<<<<<< * * if enforce_checks: */ - if (unlikely((__Pyx_SetItemInt(__pyx_v_checks, __pyx_v_i, __pyx_v_c, std::vector ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0))) __PYX_ERR(0, 81, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_checks, __pyx_v_i, __pyx_v_c, std::vector ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0))) __PYX_ERR(0, 85, __pyx_L1_error) - /* "opendbc/can/parser_pyx.pyx":76 + /* "opendbc/can/parser_pyx.pyx":80 * for i in range(len(checks)): * c = checks[i] * if not isinstance(c[0], numbers.Number): # <<<<<<<<<<<<<< @@ -5295,17 +5318,17 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ } } - /* "opendbc/can/parser_pyx.pyx":83 + /* "opendbc/can/parser_pyx.pyx":87 * checks[i] = c * * if enforce_checks: # <<<<<<<<<<<<<< * checked_addrs = {c[0] for c in checks} * signal_addrs = {s[1] for s in signals} */ - __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_enforce_checks); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_enforce_checks); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 87, __pyx_L1_error) if (__pyx_t_17) { - /* "opendbc/can/parser_pyx.pyx":84 + /* "opendbc/can/parser_pyx.pyx":88 * * if enforce_checks: * checked_addrs = {c[0] for c in checks} # <<<<<<<<<<<<<< @@ -5313,32 +5336,32 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ * unchecked = signal_addrs - checked_addrs */ { /* enter inner scope */ - __pyx_t_2 = PySet_New(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L21_error) + __pyx_t_2 = PySet_New(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_checks)) || PyTuple_CheckExact(__pyx_v_checks)) { __pyx_t_4 = __pyx_v_checks; __Pyx_INCREF(__pyx_t_4); __pyx_t_13 = 0; __pyx_t_18 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_checks); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L21_error) + __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_checks); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 84, __pyx_L21_error) + __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 88, __pyx_L21_error) } for (;;) { if (likely(!__pyx_t_18)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 84, __pyx_L21_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 88, __pyx_L21_error) #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 84, __pyx_L21_error) + __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 88, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_11); #endif } else { if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 84, __pyx_L21_error) + __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 88, __pyx_L21_error) #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 84, __pyx_L21_error) + __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 88, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_11); #endif } @@ -5348,7 +5371,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 84, __pyx_L21_error) + else __PYX_ERR(0, 88, __pyx_L21_error) } break; } @@ -5356,9 +5379,9 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_c, __pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_GetItemInt(__pyx_7genexpr__pyx_v_c, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 84, __pyx_L21_error) + __pyx_t_11 = __Pyx_GetItemInt(__pyx_7genexpr__pyx_v_c, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 88, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PySet_Add(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 84, __pyx_L21_error) + if (unlikely(PySet_Add(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 88, __pyx_L21_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -5372,7 +5395,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_v_checked_addrs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":85 + /* "opendbc/can/parser_pyx.pyx":89 * if enforce_checks: * checked_addrs = {c[0] for c in checks} * signal_addrs = {s[1] for s in signals} # <<<<<<<<<<<<<< @@ -5380,32 +5403,32 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ * if len(unchecked): */ { /* enter inner scope */ - __pyx_t_2 = PySet_New(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L28_error) + __pyx_t_2 = PySet_New(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_signals)) || PyTuple_CheckExact(__pyx_v_signals)) { __pyx_t_4 = __pyx_v_signals; __Pyx_INCREF(__pyx_t_4); __pyx_t_13 = 0; __pyx_t_18 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_signals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L28_error) + __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_signals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 85, __pyx_L28_error) + __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 89, __pyx_L28_error) } for (;;) { if (likely(!__pyx_t_18)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 85, __pyx_L28_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 89, __pyx_L28_error) #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 85, __pyx_L28_error) + __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 89, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_11); #endif } else { if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 85, __pyx_L28_error) + __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 89, __pyx_L28_error) #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 85, __pyx_L28_error) + __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 89, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_11); #endif } @@ -5415,7 +5438,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 85, __pyx_L28_error) + else __PYX_ERR(0, 89, __pyx_L28_error) } break; } @@ -5423,9 +5446,9 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ } __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_s, __pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_GetItemInt(__pyx_8genexpr1__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 85, __pyx_L28_error) + __pyx_t_11 = __Pyx_GetItemInt(__pyx_8genexpr1__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 89, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PySet_Add(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 85, __pyx_L28_error) + if (unlikely(PySet_Add(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 89, __pyx_L28_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -5439,67 +5462,67 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_v_signal_addrs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":86 + /* "opendbc/can/parser_pyx.pyx":90 * checked_addrs = {c[0] for c in checks} * signal_addrs = {s[1] for s in signals} * unchecked = signal_addrs - checked_addrs # <<<<<<<<<<<<<< * if len(unchecked): * err_msg = ", ".join(f"{self.address_to_msg_name[addr].decode()} ({hex(addr)})" for addr in unchecked) */ - __pyx_t_2 = PyNumber_Subtract(__pyx_v_signal_addrs, __pyx_v_checked_addrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = PyNumber_Subtract(__pyx_v_signal_addrs, __pyx_v_checked_addrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_unchecked = __pyx_t_2; __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":87 + /* "opendbc/can/parser_pyx.pyx":91 * signal_addrs = {s[1] for s in signals} * unchecked = signal_addrs - checked_addrs * if len(unchecked): # <<<<<<<<<<<<<< * err_msg = ", ".join(f"{self.address_to_msg_name[addr].decode()} ({hex(addr)})" for addr in unchecked) * raise RuntimeError(f"Unchecked addrs: {err_msg}") */ - __pyx_t_13 = PyObject_Length(__pyx_v_unchecked); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_13 = PyObject_Length(__pyx_v_unchecked); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 91, __pyx_L1_error) __pyx_t_17 = (__pyx_t_13 != 0); if (unlikely(__pyx_t_17)) { - /* "opendbc/can/parser_pyx.pyx":88 + /* "opendbc/can/parser_pyx.pyx":92 * unchecked = signal_addrs - checked_addrs * if len(unchecked): * err_msg = ", ".join(f"{self.address_to_msg_name[addr].decode()} ({hex(addr)})" for addr in unchecked) # <<<<<<<<<<<<<< * raise RuntimeError(f"Unchecked addrs: {err_msg}") * */ - __pyx_t_2 = __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_8__init___genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_unchecked); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_2 = __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_8__init___genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_unchecked); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_err_msg = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":89 + /* "opendbc/can/parser_pyx.pyx":93 * if len(unchecked): * err_msg = ", ".join(f"{self.address_to_msg_name[addr].decode()} ({hex(addr)})" for addr in unchecked) * raise RuntimeError(f"Unchecked addrs: {err_msg}") # <<<<<<<<<<<<<< * * cdef vector[SignalParseOptions] signal_options_v */ - __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_v_err_msg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_v_err_msg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unchecked_addrs, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unchecked_addrs, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 89, __pyx_L1_error) + __PYX_ERR(0, 93, __pyx_L1_error) - /* "opendbc/can/parser_pyx.pyx":87 + /* "opendbc/can/parser_pyx.pyx":91 * signal_addrs = {s[1] for s in signals} * unchecked = signal_addrs - checked_addrs * if len(unchecked): # <<<<<<<<<<<<<< @@ -5508,7 +5531,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ */ } - /* "opendbc/can/parser_pyx.pyx":83 + /* "opendbc/can/parser_pyx.pyx":87 * checks[i] = c * * if enforce_checks: # <<<<<<<<<<<<<< @@ -5517,7 +5540,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ */ } - /* "opendbc/can/parser_pyx.pyx":93 + /* "opendbc/can/parser_pyx.pyx":97 * cdef vector[SignalParseOptions] signal_options_v * cdef SignalParseOptions spo * for sig_name, sig_address in signals: # <<<<<<<<<<<<<< @@ -5528,26 +5551,26 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_t_2 = __pyx_v_signals; __Pyx_INCREF(__pyx_t_2); __pyx_t_13 = 0; __pyx_t_18 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_signals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_13 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_signals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 97, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_18)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 97, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -5557,7 +5580,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 93, __pyx_L1_error) + else __PYX_ERR(0, 97, __pyx_L1_error) } break; } @@ -5569,7 +5592,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 93, __pyx_L1_error) + __PYX_ERR(0, 97, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -5582,15 +5605,15 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_19 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_19 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_20 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_19); @@ -5598,7 +5621,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_GOTREF(__pyx_t_11); index = 1; __pyx_t_10 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_10)) goto __pyx_L36_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 2) < 0) __PYX_ERR(0, 93, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 2) < 0) __PYX_ERR(0, 97, __pyx_L1_error) __pyx_t_20 = NULL; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; goto __pyx_L37_unpacking_done; @@ -5606,7 +5629,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_20 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 93, __pyx_L1_error) + __PYX_ERR(0, 97, __pyx_L1_error) __pyx_L37_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_sig_name, __pyx_t_11); @@ -5614,27 +5637,27 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_XDECREF_SET(__pyx_v_sig_address, __pyx_t_10); __pyx_t_10 = 0; - /* "opendbc/can/parser_pyx.pyx":94 + /* "opendbc/can/parser_pyx.pyx":98 * cdef SignalParseOptions spo * for sig_name, sig_address in signals: * spo.address = sig_address # <<<<<<<<<<<<<< * spo.name = sig_name * signal_options_v.push_back(spo) */ - __pyx_t_21 = __Pyx_PyInt_As_uint32_t(__pyx_v_sig_address); if (unlikely((__pyx_t_21 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_21 = __Pyx_PyInt_As_uint32_t(__pyx_v_sig_address); if (unlikely((__pyx_t_21 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error) __pyx_v_spo.address = __pyx_t_21; - /* "opendbc/can/parser_pyx.pyx":95 + /* "opendbc/can/parser_pyx.pyx":99 * for sig_name, sig_address in signals: * spo.address = sig_address * spo.name = sig_name # <<<<<<<<<<<<<< * signal_options_v.push_back(spo) * */ - __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_sig_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_sig_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 99, __pyx_L1_error) __pyx_v_spo.name = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3); - /* "opendbc/can/parser_pyx.pyx":96 + /* "opendbc/can/parser_pyx.pyx":100 * spo.address = sig_address * spo.name = sig_name * signal_options_v.push_back(spo) # <<<<<<<<<<<<<< @@ -5645,10 +5668,10 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_v_signal_options_v.push_back(__pyx_v_spo); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 96, __pyx_L1_error) + __PYX_ERR(0, 100, __pyx_L1_error) } - /* "opendbc/can/parser_pyx.pyx":93 + /* "opendbc/can/parser_pyx.pyx":97 * cdef vector[SignalParseOptions] signal_options_v * cdef SignalParseOptions spo * for sig_name, sig_address in signals: # <<<<<<<<<<<<<< @@ -5658,36 +5681,36 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":98 + /* "opendbc/can/parser_pyx.pyx":102 * signal_options_v.push_back(spo) * * message_options = dict((address, 0) for _, address in signals) # <<<<<<<<<<<<<< * message_options.update(dict(checks)) * */ - __pyx_t_2 = __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_8__init___3genexpr(NULL, __pyx_v_signals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_2 = __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_8__init___3genexpr(NULL, __pyx_v_signals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_message_options = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "opendbc/can/parser_pyx.pyx":99 + /* "opendbc/can/parser_pyx.pyx":103 * * message_options = dict((address, 0) for _, address in signals) * message_options.update(dict(checks)) # <<<<<<<<<<<<<< * * cdef vector[MessageParseOptions] message_options_v */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_checks); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_checks); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_message_options, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_2 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_message_options, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":103 + /* "opendbc/can/parser_pyx.pyx":107 * cdef vector[MessageParseOptions] message_options_v * cdef MessageParseOptions mpo * for msg_address, freq in message_options.items(): # <<<<<<<<<<<<<< @@ -5697,9 +5720,9 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_t_13 = 0; if (unlikely(__pyx_v_message_options == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 103, __pyx_L1_error) + __PYX_ERR(0, 107, __pyx_L1_error) } - __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_message_options, 1, __pyx_n_s_items, (&__pyx_t_14), (&__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_message_options, 1, __pyx_n_s_items, (&__pyx_t_14), (&__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_4; @@ -5707,7 +5730,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ while (1) { __pyx_t_22 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_14, &__pyx_t_13, &__pyx_t_4, &__pyx_t_10, NULL, __pyx_t_12); if (unlikely(__pyx_t_22 == 0)) break; - if (unlikely(__pyx_t_22 == -1)) __PYX_ERR(0, 103, __pyx_L1_error) + if (unlikely(__pyx_t_22 == -1)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_msg_address, __pyx_t_4); @@ -5715,27 +5738,27 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_XDECREF_SET(__pyx_v_freq, __pyx_t_10); __pyx_t_10 = 0; - /* "opendbc/can/parser_pyx.pyx":104 + /* "opendbc/can/parser_pyx.pyx":108 * cdef MessageParseOptions mpo * for msg_address, freq in message_options.items(): * mpo.address = msg_address # <<<<<<<<<<<<<< * mpo.check_frequency = freq * message_options_v.push_back(mpo) */ - __pyx_t_21 = __Pyx_PyInt_As_uint32_t(__pyx_v_msg_address); if (unlikely((__pyx_t_21 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_t_21 = __Pyx_PyInt_As_uint32_t(__pyx_v_msg_address); if (unlikely((__pyx_t_21 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L1_error) __pyx_v_mpo.address = __pyx_t_21; - /* "opendbc/can/parser_pyx.pyx":105 + /* "opendbc/can/parser_pyx.pyx":109 * for msg_address, freq in message_options.items(): * mpo.address = msg_address * mpo.check_frequency = freq # <<<<<<<<<<<<<< * message_options_v.push_back(mpo) * */ - __pyx_t_22 = __Pyx_PyInt_As_int(__pyx_v_freq); if (unlikely((__pyx_t_22 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_22 = __Pyx_PyInt_As_int(__pyx_v_freq); if (unlikely((__pyx_t_22 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L1_error) __pyx_v_mpo.check_frequency = __pyx_t_22; - /* "opendbc/can/parser_pyx.pyx":106 + /* "opendbc/can/parser_pyx.pyx":110 * mpo.address = msg_address * mpo.check_frequency = freq * message_options_v.push_back(mpo) # <<<<<<<<<<<<<< @@ -5746,32 +5769,32 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_v_message_options_v.push_back(__pyx_v_mpo); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 106, __pyx_L1_error) + __PYX_ERR(0, 110, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "opendbc/can/parser_pyx.pyx":108 + /* "opendbc/can/parser_pyx.pyx":112 * message_options_v.push_back(mpo) * * self.can = new cpp_CANParser(bus, dbc_name, message_options_v, signal_options_v) # <<<<<<<<<<<<<< * self.update_strings([]) * */ - __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_bus); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L1_error) - __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_dbc_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_bus); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_dbc_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error) __pyx_cur_scope->__pyx_v_self->can = new CANParser(__pyx_t_12, __pyx_t_3, __pyx_v_message_options_v, __pyx_v_signal_options_v); - /* "opendbc/can/parser_pyx.pyx":109 + /* "opendbc/can/parser_pyx.pyx":113 * * self.can = new cpp_CANParser(bus, dbc_name, message_options_v, signal_options_v) * self.update_strings([]) # <<<<<<<<<<<<<< * * def update_strings(self, strings, sendcan=False): */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_update_strings); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_update_strings); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = NULL; __pyx_t_12 = 0; @@ -5790,7 +5813,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -5836,12 +5859,13 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANParser___init__(struct __pyx_ __Pyx_XDECREF(__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___2generator); __Pyx_XDECREF(__pyx_gb_7opendbc_3can_10parser_pyx_9CANParser_8__init___5generator1); __Pyx_XDECREF(__pyx_v_checks); + __Pyx_XDECREF(__pyx_v_enforce_checks); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "opendbc/can/parser_pyx.pyx":111 +/* "opendbc/can/parser_pyx.pyx":115 * self.update_strings([]) * * def update_strings(self, strings, sendcan=False): # <<<<<<<<<<<<<< @@ -5895,19 +5919,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_strings)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sendcan); if (value) { values[1] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "update_strings") < 0)) __PYX_ERR(0, 111, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "update_strings") < 0)) __PYX_ERR(0, 115, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -5923,7 +5947,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("update_strings", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 111, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("update_strings", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 115, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("opendbc.can.parser_pyx.CANParser.update_strings", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5966,7 +5990,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update_strings", 0); - /* "opendbc/can/parser_pyx.pyx":112 + /* "opendbc/can/parser_pyx.pyx":116 * * def update_strings(self, strings, sendcan=False): * for v in self.vl_all.values(): # <<<<<<<<<<<<<< @@ -5976,9 +6000,9 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( __pyx_t_2 = 0; if (unlikely(__pyx_v_self->vl_all == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 112, __pyx_L1_error) + __PYX_ERR(0, 116, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->vl_all, 1, __pyx_n_s_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->vl_all, 1, __pyx_n_s_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; @@ -5986,12 +6010,12 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( while (1) { __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_5, NULL, __pyx_t_4); if (unlikely(__pyx_t_6 == 0)) break; - if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 112, __pyx_L1_error) + if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); __pyx_t_5 = 0; - /* "opendbc/can/parser_pyx.pyx":113 + /* "opendbc/can/parser_pyx.pyx":117 * def update_strings(self, strings, sendcan=False): * for v in self.vl_all.values(): * for l in v.values(): # no-cython-lint # <<<<<<<<<<<<<< @@ -6001,9 +6025,9 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( __pyx_t_7 = 0; if (unlikely(__pyx_v_v == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 113, __pyx_L1_error) + __PYX_ERR(0, 117, __pyx_L1_error) } - __pyx_t_9 = __Pyx_dict_iterator(__pyx_v_v, 0, __pyx_n_s_values, (&__pyx_t_8), (&__pyx_t_6)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_t_9 = __Pyx_dict_iterator(__pyx_v_v, 0, __pyx_n_s_values, (&__pyx_t_8), (&__pyx_t_6)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_9; @@ -6011,19 +6035,19 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_8, &__pyx_t_7, NULL, &__pyx_t_9, NULL, __pyx_t_6); if (unlikely(__pyx_t_10 == 0)) break; - if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 113, __pyx_L1_error) + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_9); __pyx_t_9 = 0; - /* "opendbc/can/parser_pyx.pyx":114 + /* "opendbc/can/parser_pyx.pyx":118 * for v in self.vl_all.values(): * for l in v.values(): # no-cython-lint * l.clear() # <<<<<<<<<<<<<< * * cdef vector[SignalValue] new_vals */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_l, __pyx_n_s_clear); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_l, __pyx_n_s_clear); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; __pyx_t_10 = 0; @@ -6041,7 +6065,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( PyObject *__pyx_callargs[1] = {__pyx_t_12, }; __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 114, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -6051,18 +6075,18 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "opendbc/can/parser_pyx.pyx":119 + /* "opendbc/can/parser_pyx.pyx":123 * cdef unordered_set[uint32_t] updated_addrs * * self.can.update_strings(strings, new_vals, sendcan) # <<<<<<<<<<<<<< * cdef vector[SignalValue].iterator it = new_vals.begin() * cdef SignalValue* cv */ - __pyx_t_13 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_strings); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error) - __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_sendcan); if (unlikely((__pyx_t_14 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_13 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_strings); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_sendcan); if (unlikely((__pyx_t_14 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L1_error) __pyx_v_self->can->update_strings(__pyx_t_13, __pyx_v_new_vals, __pyx_t_14); - /* "opendbc/can/parser_pyx.pyx":120 + /* "opendbc/can/parser_pyx.pyx":124 * * self.can.update_strings(strings, new_vals, sendcan) * cdef vector[SignalValue].iterator it = new_vals.begin() # <<<<<<<<<<<<<< @@ -6071,7 +6095,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( */ __pyx_v_it = __pyx_v_new_vals.begin(); - /* "opendbc/can/parser_pyx.pyx":122 + /* "opendbc/can/parser_pyx.pyx":126 * cdef vector[SignalValue].iterator it = new_vals.begin() * cdef SignalValue* cv * while it != new_vals.end(): # <<<<<<<<<<<<<< @@ -6082,7 +6106,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( __pyx_t_15 = (__pyx_v_it != __pyx_v_new_vals.end()); if (!__pyx_t_15) break; - /* "opendbc/can/parser_pyx.pyx":123 + /* "opendbc/can/parser_pyx.pyx":127 * cdef SignalValue* cv * while it != new_vals.end(): * cv = &deref(it) # <<<<<<<<<<<<<< @@ -6091,14 +6115,14 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( */ __pyx_v_cv = (&(*__pyx_v_it)); - /* "opendbc/can/parser_pyx.pyx":125 + /* "opendbc/can/parser_pyx.pyx":129 * cv = &deref(it) * # Cast char * directly to unicode * cv_name = cv.name # <<<<<<<<<<<<<< * self.vl[cv.address][cv_name] = cv.value * self.vl_all[cv.address][cv_name] = cv.all_values */ - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_cv->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_cv->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); @@ -6106,73 +6130,73 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( __Pyx_XDECREF_SET(__pyx_v_cv_name, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "opendbc/can/parser_pyx.pyx":126 + /* "opendbc/can/parser_pyx.pyx":130 * # Cast char * directly to unicode * cv_name = cv.name * self.vl[cv.address][cv_name] = cv.value # <<<<<<<<<<<<<< * self.vl_all[cv.address][cv_name] = cv.all_values * self.ts_nanos[cv.address][cv_name] = cv.ts_nanos */ - __pyx_t_5 = PyFloat_FromDouble(__pyx_v_cv->value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_cv->value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_self->vl == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 126, __pyx_L1_error) + __PYX_ERR(0, 130, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_cv->address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_cv->address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_self->vl, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_self->vl, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_v_cv_name, __pyx_t_5) < 0))) __PYX_ERR(0, 126, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_v_cv_name, __pyx_t_5) < 0))) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "opendbc/can/parser_pyx.pyx":127 + /* "opendbc/can/parser_pyx.pyx":131 * cv_name = cv.name * self.vl[cv.address][cv_name] = cv.value * self.vl_all[cv.address][cv_name] = cv.all_values # <<<<<<<<<<<<<< * self.ts_nanos[cv.address][cv_name] = cv.ts_nanos * updated_addrs.insert(cv.address) */ - __pyx_t_5 = __pyx_convert_vector_to_py_double(__pyx_v_cv->all_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_vector_to_py_double(__pyx_v_cv->all_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_self->vl_all == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 127, __pyx_L1_error) + __PYX_ERR(0, 131, __pyx_L1_error) } - __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_v_cv->address); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_uint32_t(__pyx_v_cv->address); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->vl_all, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->vl_all, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_cv_name, __pyx_t_5) < 0))) __PYX_ERR(0, 127, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_cv_name, __pyx_t_5) < 0))) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "opendbc/can/parser_pyx.pyx":128 + /* "opendbc/can/parser_pyx.pyx":132 * self.vl[cv.address][cv_name] = cv.value * self.vl_all[cv.address][cv_name] = cv.all_values * self.ts_nanos[cv.address][cv_name] = cv.ts_nanos # <<<<<<<<<<<<<< * updated_addrs.insert(cv.address) * preinc(it) */ - __pyx_t_5 = __Pyx_PyInt_From_uint64_t(__pyx_v_cv->ts_nanos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_uint64_t(__pyx_v_cv->ts_nanos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_self->ts_nanos == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 128, __pyx_L1_error) + __PYX_ERR(0, 132, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_cv->address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_cv->address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_self->ts_nanos, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_self->ts_nanos, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_v_cv_name, __pyx_t_5) < 0))) __PYX_ERR(0, 128, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_v_cv_name, __pyx_t_5) < 0))) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "opendbc/can/parser_pyx.pyx":129 + /* "opendbc/can/parser_pyx.pyx":133 * self.vl_all[cv.address][cv_name] = cv.all_values * self.ts_nanos[cv.address][cv_name] = cv.ts_nanos * updated_addrs.insert(cv.address) # <<<<<<<<<<<<<< @@ -6183,10 +6207,10 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( __pyx_v_updated_addrs.insert(__pyx_v_cv->address); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 129, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - /* "opendbc/can/parser_pyx.pyx":130 + /* "opendbc/can/parser_pyx.pyx":134 * self.ts_nanos[cv.address][cv_name] = cv.ts_nanos * updated_addrs.insert(cv.address) * preinc(it) # <<<<<<<<<<<<<< @@ -6196,7 +6220,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( (void)((++__pyx_v_it)); } - /* "opendbc/can/parser_pyx.pyx":132 + /* "opendbc/can/parser_pyx.pyx":136 * preinc(it) * * return updated_addrs # <<<<<<<<<<<<<< @@ -6204,13 +6228,13 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __pyx_convert_unordered_set_to_py_uint32_t(__pyx_v_updated_addrs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_unordered_set_to_py_uint32_t(__pyx_v_updated_addrs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "opendbc/can/parser_pyx.pyx":111 + /* "opendbc/can/parser_pyx.pyx":115 * self.update_strings([]) * * def update_strings(self, strings, sendcan=False): # <<<<<<<<<<<<<< @@ -6236,7 +6260,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_2update_strings( return __pyx_r; } -/* "opendbc/can/parser_pyx.pyx":134 +/* "opendbc/can/parser_pyx.pyx":138 * return updated_addrs * * @property # <<<<<<<<<<<<<< @@ -6267,7 +6291,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_9can_valid___get int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "opendbc/can/parser_pyx.pyx":136 + /* "opendbc/can/parser_pyx.pyx":140 * @property * def can_valid(self): * return self.can.can_valid # <<<<<<<<<<<<<< @@ -6275,13 +6299,13 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_9can_valid___get * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->can->can_valid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->can->can_valid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "opendbc/can/parser_pyx.pyx":134 + /* "opendbc/can/parser_pyx.pyx":138 * return updated_addrs * * @property # <<<<<<<<<<<<<< @@ -6300,7 +6324,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_9can_valid___get return __pyx_r; } -/* "opendbc/can/parser_pyx.pyx":138 +/* "opendbc/can/parser_pyx.pyx":142 * return self.can.can_valid * * @property # <<<<<<<<<<<<<< @@ -6331,7 +6355,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_11bus_timeout___ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "opendbc/can/parser_pyx.pyx":140 + /* "opendbc/can/parser_pyx.pyx":144 * @property * def bus_timeout(self): * return self.can.bus_timeout # <<<<<<<<<<<<<< @@ -6339,13 +6363,13 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_11bus_timeout___ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->can->bus_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->can->bus_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "opendbc/can/parser_pyx.pyx":138 + /* "opendbc/can/parser_pyx.pyx":142 * return self.can.can_valid * * @property # <<<<<<<<<<<<<< @@ -6707,7 +6731,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANParser_6__setstate_cyth return __pyx_r; } -/* "opendbc/can/parser_pyx.pyx":151 +/* "opendbc/can/parser_pyx.pyx":155 * string dbc_name * * def __init__(self, dbc_name): # <<<<<<<<<<<<<< @@ -6742,12 +6766,12 @@ static int __pyx_pw_7opendbc_3can_10parser_pyx_9CANDefine_1__init__(PyObject *__ switch (__pyx_nargs) { case 0: if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dbc_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 155, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 151, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 155, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -6758,7 +6782,7 @@ static int __pyx_pw_7opendbc_3can_10parser_pyx_9CANDefine_1__init__(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 151, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 155, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("opendbc.can.parser_pyx.CANDefine.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6773,7 +6797,7 @@ static int __pyx_pw_7opendbc_3can_10parser_pyx_9CANDefine_1__init__(PyObject *__ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_obj_7opendbc_3can_10parser_pyx_CANDefine *__pyx_v_self, PyObject *__pyx_v_dbc_name) { PyObject *__pyx_v_address_to_msg_name = NULL; - std::vector ::size_type __pyx_v_i; + std::vector ::size_type __pyx_v_i; struct Msg __pyx_v_msg; PyObject *__pyx_v_name = NULL; uint32_t __pyx_v_address; @@ -6795,7 +6819,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ PyObject *__pyx_t_6 = NULL; std::vector ::size_type __pyx_t_7; std::vector ::size_type __pyx_t_8; - std::vector ::size_type __pyx_t_9; + std::vector ::size_type __pyx_t_9; uint32_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; @@ -6807,27 +6831,27 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "opendbc/can/parser_pyx.pyx":152 + /* "opendbc/can/parser_pyx.pyx":156 * * def __init__(self, dbc_name): * self.dbc_name = dbc_name # <<<<<<<<<<<<<< * self.dbc = dbc_lookup(dbc_name) * if not self.dbc: */ - __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_dbc_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_dbc_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 156, __pyx_L1_error) __pyx_v_self->dbc_name = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1); - /* "opendbc/can/parser_pyx.pyx":153 + /* "opendbc/can/parser_pyx.pyx":157 * def __init__(self, dbc_name): * self.dbc_name = dbc_name * self.dbc = dbc_lookup(dbc_name) # <<<<<<<<<<<<<< * if not self.dbc: * raise RuntimeError(f"Can't find DBC: '{dbc_name}'") */ - __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_dbc_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 153, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_dbc_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 157, __pyx_L1_error) __pyx_v_self->dbc = dbc_lookup(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1)); - /* "opendbc/can/parser_pyx.pyx":154 + /* "opendbc/can/parser_pyx.pyx":158 * self.dbc_name = dbc_name * self.dbc = dbc_lookup(dbc_name) * if not self.dbc: # <<<<<<<<<<<<<< @@ -6837,14 +6861,14 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ __pyx_t_2 = (!(__pyx_v_self->dbc != 0)); if (unlikely(__pyx_t_2)) { - /* "opendbc/can/parser_pyx.pyx":155 + /* "opendbc/can/parser_pyx.pyx":159 * self.dbc = dbc_lookup(dbc_name) * if not self.dbc: * raise RuntimeError(f"Can't find DBC: '{dbc_name}'") # <<<<<<<<<<<<<< * * address_to_msg_name = {} */ - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = 127; @@ -6852,7 +6876,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ __pyx_t_4 += 17; __Pyx_GIVEREF(__pyx_kp_u_Can_t_find_DBC_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Can_t_find_DBC_2); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_dbc_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_dbc_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5; __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); @@ -6863,17 +6887,17 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ __pyx_t_4 += 1; __Pyx_GIVEREF(__pyx_kp_u__4); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__4); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 155, __pyx_L1_error) + __PYX_ERR(0, 159, __pyx_L1_error) - /* "opendbc/can/parser_pyx.pyx":154 + /* "opendbc/can/parser_pyx.pyx":158 * self.dbc_name = dbc_name * self.dbc = dbc_lookup(dbc_name) * if not self.dbc: # <<<<<<<<<<<<<< @@ -6882,19 +6906,19 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ */ } - /* "opendbc/can/parser_pyx.pyx":157 + /* "opendbc/can/parser_pyx.pyx":161 * raise RuntimeError(f"Can't find DBC: '{dbc_name}'") * * address_to_msg_name = {} # <<<<<<<<<<<<<< * * for i in range(self.dbc[0].msgs.size()): */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_address_to_msg_name = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "opendbc/can/parser_pyx.pyx":159 + /* "opendbc/can/parser_pyx.pyx":163 * address_to_msg_name = {} * * for i in range(self.dbc[0].msgs.size()): # <<<<<<<<<<<<<< @@ -6906,7 +6930,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; - /* "opendbc/can/parser_pyx.pyx":160 + /* "opendbc/can/parser_pyx.pyx":164 * * for i in range(self.dbc[0].msgs.size()): * msg = self.dbc[0].msgs[i] # <<<<<<<<<<<<<< @@ -6915,19 +6939,19 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ */ __pyx_v_msg = ((__pyx_v_self->dbc[0]).msgs[__pyx_v_i]); - /* "opendbc/can/parser_pyx.pyx":161 + /* "opendbc/can/parser_pyx.pyx":165 * for i in range(self.dbc[0].msgs.size()): * msg = self.dbc[0].msgs[i] * name = msg.name.decode("utf8") # <<<<<<<<<<<<<< * address = msg.address * address_to_msg_name[address] = name */ - __pyx_t_3 = __Pyx_decode_cpp_string(__pyx_v_msg.name, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_cpp_string(__pyx_v_msg.name, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; - /* "opendbc/can/parser_pyx.pyx":162 + /* "opendbc/can/parser_pyx.pyx":166 * msg = self.dbc[0].msgs[i] * name = msg.name.decode("utf8") * address = msg.address # <<<<<<<<<<<<<< @@ -6937,27 +6961,27 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ __pyx_t_10 = __pyx_v_msg.address; __pyx_v_address = __pyx_t_10; - /* "opendbc/can/parser_pyx.pyx":163 + /* "opendbc/can/parser_pyx.pyx":167 * name = msg.name.decode("utf8") * address = msg.address * address_to_msg_name[address] = name # <<<<<<<<<<<<<< * * dv = defaultdict(dict) */ - __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely((PyDict_SetItem(__pyx_v_address_to_msg_name, __pyx_t_3, __pyx_v_name) < 0))) __PYX_ERR(0, 163, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_address_to_msg_name, __pyx_t_3, __pyx_v_name) < 0))) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "opendbc/can/parser_pyx.pyx":165 + /* "opendbc/can/parser_pyx.pyx":169 * address_to_msg_name[address] = name * * dv = defaultdict(dict) # <<<<<<<<<<<<<< * * for i in range(self.dbc[0].vals.size()): */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_defaultdict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_defaultdict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = NULL; __pyx_t_12 = 0; @@ -6975,26 +6999,26 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ PyObject *__pyx_callargs[2] = {__pyx_t_11, ((PyObject *)(&PyDict_Type))}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_v_dv = __pyx_t_3; __pyx_t_3 = 0; - /* "opendbc/can/parser_pyx.pyx":167 + /* "opendbc/can/parser_pyx.pyx":171 * dv = defaultdict(dict) * * for i in range(self.dbc[0].vals.size()): # <<<<<<<<<<<<<< * val = self.dbc[0].vals[i] * */ - __pyx_t_13 = (__pyx_v_self->dbc[0]).vals.size(); - __pyx_t_14 = __pyx_t_13; - for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_14; __pyx_t_7+=1) { - __pyx_v_i = __pyx_t_7; + __pyx_t_9 = (__pyx_v_self->dbc[0]).vals.size(); + __pyx_t_13 = __pyx_t_9; + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { + __pyx_v_i = __pyx_t_14; - /* "opendbc/can/parser_pyx.pyx":168 + /* "opendbc/can/parser_pyx.pyx":172 * * for i in range(self.dbc[0].vals.size()): * val = self.dbc[0].vals[i] # <<<<<<<<<<<<<< @@ -7003,31 +7027,31 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ */ __pyx_v_val = ((__pyx_v_self->dbc[0]).vals[__pyx_v_i]); - /* "opendbc/can/parser_pyx.pyx":170 + /* "opendbc/can/parser_pyx.pyx":174 * val = self.dbc[0].vals[i] * * sgname = val.name.decode("utf8") # <<<<<<<<<<<<<< * def_val = val.def_val.decode("utf8") * address = val.address */ - __pyx_t_3 = __Pyx_decode_cpp_string(__pyx_v_val.name, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_cpp_string(__pyx_v_val.name, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_sgname, __pyx_t_3); __pyx_t_3 = 0; - /* "opendbc/can/parser_pyx.pyx":171 + /* "opendbc/can/parser_pyx.pyx":175 * * sgname = val.name.decode("utf8") * def_val = val.def_val.decode("utf8") # <<<<<<<<<<<<<< * address = val.address * msgname = address_to_msg_name[address] */ - __pyx_t_3 = __Pyx_decode_cpp_string(__pyx_v_val.def_val, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_cpp_string(__pyx_v_val.def_val, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_def_val, __pyx_t_3); __pyx_t_3 = 0; - /* "opendbc/can/parser_pyx.pyx":172 + /* "opendbc/can/parser_pyx.pyx":176 * sgname = val.name.decode("utf8") * def_val = val.def_val.decode("utf8") * address = val.address # <<<<<<<<<<<<<< @@ -7037,29 +7061,29 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ __pyx_t_10 = __pyx_v_val.address; __pyx_v_address = __pyx_t_10; - /* "opendbc/can/parser_pyx.pyx":173 + /* "opendbc/can/parser_pyx.pyx":177 * def_val = val.def_val.decode("utf8") * address = val.address * msgname = address_to_msg_name[address] # <<<<<<<<<<<<<< * * # separate definition/value pairs */ - __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_address_to_msg_name, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_address_to_msg_name, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_msgname, __pyx_t_6); __pyx_t_6 = 0; - /* "opendbc/can/parser_pyx.pyx":176 + /* "opendbc/can/parser_pyx.pyx":180 * * # separate definition/value pairs * def_val = def_val.split() # <<<<<<<<<<<<<< * values = [int(v) for v in def_val[::2]] * defs = def_val[1::2] */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_def_val, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_def_val, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = NULL; __pyx_t_12 = 0; @@ -7077,14 +7101,14 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ PyObject *__pyx_callargs[1] = {__pyx_t_11, }; __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 176, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF_SET(__pyx_v_def_val, __pyx_t_6); __pyx_t_6 = 0; - /* "opendbc/can/parser_pyx.pyx":177 + /* "opendbc/can/parser_pyx.pyx":181 * # separate definition/value pairs * def_val = def_val.split() * values = [int(v) for v in def_val[::2]] # <<<<<<<<<<<<<< @@ -7092,17 +7116,17 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ * */ { /* enter inner scope */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 177, __pyx_L10_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_def_val, __pyx_slice__5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L10_error) + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_def_val, __pyx_slice__5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_11 = __pyx_t_3; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0; __pyx_t_15 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 177, __pyx_L10_error) + __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 181, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 177, __pyx_L10_error) + __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 181, __pyx_L10_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -7110,17 +7134,17 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ if (likely(PyList_CheckExact(__pyx_t_11))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_11)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 177, __pyx_L10_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 181, __pyx_L10_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L10_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_11)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 177, __pyx_L10_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 181, __pyx_L10_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L10_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -7130,7 +7154,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 177, __pyx_L10_error) + else __PYX_ERR(0, 181, __pyx_L10_error) } break; } @@ -7138,9 +7162,9 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ } __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_8genexpr4__pyx_v_v); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L10_error) + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_8genexpr4__pyx_v_v); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 177, __pyx_L10_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 181, __pyx_L10_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -7154,26 +7178,26 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ __Pyx_XDECREF_SET(__pyx_v_values, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "opendbc/can/parser_pyx.pyx":178 + /* "opendbc/can/parser_pyx.pyx":182 * def_val = def_val.split() * values = [int(v) for v in def_val[::2]] * defs = def_val[1::2] # <<<<<<<<<<<<<< * * # two ways to lookup: address or msg name */ - __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_def_val, __pyx_slice__6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_def_val, __pyx_slice__6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_defs, __pyx_t_6); __pyx_t_6 = 0; - /* "opendbc/can/parser_pyx.pyx":181 + /* "opendbc/can/parser_pyx.pyx":185 * * # two ways to lookup: address or msg name * dv[address][sgname] = dict(zip(values, defs)) # <<<<<<<<<<<<<< * dv[msgname][sgname] = dv[address][sgname] * */ - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); @@ -7181,43 +7205,43 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ __Pyx_INCREF(__pyx_v_defs); __Pyx_GIVEREF(__pyx_v_defs); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_defs); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_dv, __pyx_v_address, uint32_t, 0, __Pyx_PyInt_From_uint32_t, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_dv, __pyx_v_address, uint32_t, 0, __Pyx_PyInt_From_uint32_t, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely((PyObject_SetItem(__pyx_t_11, __pyx_v_sgname, __pyx_t_6) < 0))) __PYX_ERR(0, 181, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_11, __pyx_v_sgname, __pyx_t_6) < 0))) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "opendbc/can/parser_pyx.pyx":182 + /* "opendbc/can/parser_pyx.pyx":186 * # two ways to lookup: address or msg name * dv[address][sgname] = dict(zip(values, defs)) * dv[msgname][sgname] = dv[address][sgname] # <<<<<<<<<<<<<< * * self.dv = dict(dv) */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_dv, __pyx_v_address, uint32_t, 0, __Pyx_PyInt_From_uint32_t, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_dv, __pyx_v_address, uint32_t, 0, __Pyx_PyInt_From_uint32_t, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_sgname); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_sgname); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_dv, __pyx_v_msgname); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_dv, __pyx_v_msgname); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (unlikely((PyObject_SetItem(__pyx_t_6, __pyx_v_sgname, __pyx_t_11) < 0))) __PYX_ERR(0, 182, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_6, __pyx_v_sgname, __pyx_t_11) < 0))) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - /* "opendbc/can/parser_pyx.pyx":184 + /* "opendbc/can/parser_pyx.pyx":188 * dv[msgname][sgname] = dv[address][sgname] * * self.dv = dict(dv) # <<<<<<<<<<<<<< */ - __pyx_t_11 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_dv); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_dv); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __Pyx_GOTREF(__pyx_v_self->dv); @@ -7225,7 +7249,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ __pyx_v_self->dv = ((PyObject*)__pyx_t_11); __pyx_t_11 = 0; - /* "opendbc/can/parser_pyx.pyx":151 + /* "opendbc/can/parser_pyx.pyx":155 * string dbc_name * * def __init__(self, dbc_name): # <<<<<<<<<<<<<< @@ -7256,7 +7280,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine___init__(struct __pyx_ return __pyx_r; } -/* "opendbc/can/parser_pyx.pyx":148 +/* "opendbc/can/parser_pyx.pyx":152 * * cdef public: * dict dv # <<<<<<<<<<<<<< @@ -7316,7 +7340,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine_2dv_2__set__(struct __ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_value))) __PYX_ERR(0, 148, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_value))) __PYX_ERR(0, 152, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -7367,7 +7391,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine_2dv_4__del__(struct __ return __pyx_r; } -/* "opendbc/can/parser_pyx.pyx":149 +/* "opendbc/can/parser_pyx.pyx":153 * cdef public: * dict dv * string dbc_name # <<<<<<<<<<<<<< @@ -7398,7 +7422,7 @@ static PyObject *__pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine_8dbc_name___get_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->dbc_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->dbc_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7437,7 +7461,7 @@ static int __pyx_pf_7opendbc_3can_10parser_pyx_9CANDefine_8dbc_name_2__set__(str const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 153, __pyx_L1_error) __pyx_v_self->dbc_name = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1); /* function exit code */ @@ -8616,11 +8640,11 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 38, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 46, __pyx_L1_error) - __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 78, __pyx_L1_error) - __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 92, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) - __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 185, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 68, __pyx_L1_error) return 0; __pyx_L1_error:; @@ -8632,40 +8656,40 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "opendbc/can/parser_pyx.pyx":177 + /* "opendbc/can/parser_pyx.pyx":181 * # separate definition/value pairs * def_val = def_val.split() * values = [int(v) for v in def_val[::2]] # <<<<<<<<<<<<<< * defs = def_val[1::2] * */ - __pyx_slice__5 = PySlice_New(Py_None, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_slice__5 = PySlice_New(Py_None, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__5); __Pyx_GIVEREF(__pyx_slice__5); - /* "opendbc/can/parser_pyx.pyx":178 + /* "opendbc/can/parser_pyx.pyx":182 * def_val = def_val.split() * values = [int(v) for v in def_val[::2]] * defs = def_val[1::2] # <<<<<<<<<<<<<< * * # two ways to lookup: address or msg name */ - __pyx_slice__6 = PySlice_New(__pyx_int_1, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__6)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_slice__6 = PySlice_New(__pyx_int_1, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__6)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__6); __Pyx_GIVEREF(__pyx_slice__6); - /* "opendbc/can/parser_pyx.pyx":111 + /* "opendbc/can/parser_pyx.pyx":115 * self.update_strings([]) * * def update_strings(self, strings, sendcan=False): # <<<<<<<<<<<<<< * for v in self.vl_all.values(): * for l in v.values(): # no-cython-lint */ - __pyx_tuple__9 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_strings, __pyx_n_s_sendcan, __pyx_n_s_v, __pyx_n_s_l, __pyx_n_s_new_vals, __pyx_n_s_updated_addrs, __pyx_n_s_it, __pyx_n_s_cv, __pyx_n_s_cv_name); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_strings, __pyx_n_s_sendcan, __pyx_n_s_v, __pyx_n_s_l, __pyx_n_s_new_vals, __pyx_n_s_updated_addrs, __pyx_n_s_it, __pyx_n_s_cv, __pyx_n_s_cv_name); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opendbc_can_parser_pyx_pyx, __pyx_n_s_update_strings, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 111, __pyx_L1_error) - __pyx_tuple__11 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_opendbc_can_parser_pyx_pyx, __pyx_n_s_update_strings, 115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_tuple__11 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); @@ -8795,15 +8819,15 @@ static int __Pyx_modinit_type_init_code(void) { if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7opendbc_3can_10parser_pyx_CANParser) < 0) __PYX_ERR(0, 18, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7opendbc_3can_10parser_pyx_CANDefine_spec, NULL); if (unlikely(!__pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine)) __PYX_ERR(0, 143, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7opendbc_3can_10parser_pyx_CANDefine_spec, __pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine) < 0) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7opendbc_3can_10parser_pyx_CANDefine_spec, NULL); if (unlikely(!__pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine)) __PYX_ERR(0, 147, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7opendbc_3can_10parser_pyx_CANDefine_spec, __pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine) < 0) __PYX_ERR(0, 147, __pyx_L1_error) #else __pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine = &__pyx_type_7opendbc_3can_10parser_pyx_CANDefine; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine) < 0) __PYX_ERR(0, 143, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine) < 0) __PYX_ERR(0, 147, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine->tp_print = 0; @@ -8813,9 +8837,9 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CANDefine, (PyObject *) __pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine) < 0) __PYX_ERR(0, 143, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CANDefine, (PyObject *) __pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine) < 0) __PYX_ERR(0, 147, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine) < 0) __PYX_ERR(0, 143, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7opendbc_3can_10parser_pyx_CANDefine) < 0) __PYX_ERR(0, 147, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct____init__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7opendbc_3can_10parser_pyx___pyx_scope_struct____init___spec, NULL); if (unlikely(!__pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct____init__)) __PYX_ERR(0, 31, __pyx_L1_error) @@ -8837,15 +8861,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr)) __PYX_ERR(0, 88, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr_spec, __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr)) __PYX_ERR(0, 92, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr_spec, __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 92, __pyx_L1_error) #else __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr = &__pyx_type_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 88, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 92, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_1_genexpr->tp_print = 0; @@ -8856,15 +8880,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 98, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr_spec, __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 102, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr_spec, __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 102, __pyx_L1_error) #else __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr = &__pyx_type_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 98, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 102, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7opendbc_3can_10parser_pyx___pyx_scope_struct_2_genexpr->tp_print = 0; @@ -9219,17 +9243,17 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "opendbc/can/parser_pyx.pyx":111 + /* "opendbc/can/parser_pyx.pyx":115 * self.update_strings([]) * * def update_strings(self, strings, sendcan=False): # <<<<<<<<<<<<<< * for v in self.vl_all.values(): * for l in v.values(): # no-cython-lint */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7opendbc_3can_10parser_pyx_9CANParser_3update_strings, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CANParser_update_strings, NULL, __pyx_n_s_opendbc_can_parser_pyx, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7opendbc_3can_10parser_pyx_9CANParser_3update_strings, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CANParser_update_strings, NULL, __pyx_n_s_opendbc_can_parser_pyx, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__11); - if (PyDict_SetItem((PyObject *)__pyx_ptype_7opendbc_3can_10parser_pyx_CANParser->tp_dict, __pyx_n_s_update_strings, __pyx_t_3) < 0) __PYX_ERR(0, 111, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_7opendbc_3can_10parser_pyx_CANParser->tp_dict, __pyx_n_s_update_strings, __pyx_t_3) < 0) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_7opendbc_3can_10parser_pyx_CANParser); diff --git a/opendbc/can/parser_pyx.so b/opendbc/can/parser_pyx.so index 943050310..921d31a63 100755 Binary files a/opendbc/can/parser_pyx.so and b/opendbc/can/parser_pyx.so differ diff --git a/opendbc/toyota_new_mc_pt_generated.dbc b/opendbc/toyota_new_mc_pt_generated.dbc index 476e70f31..e9d95ccd3 100644 --- a/opendbc/toyota_new_mc_pt_generated.dbc +++ b/opendbc/toyota_new_mc_pt_generated.dbc @@ -253,6 +253,7 @@ BO_ 1005 REVERSE_CAMERA_STATE: 2 BGM SG_ REVERSE_CAMERA_GUIDELINES : 9|2@0+ (1,0) [1|3] "" XXX BO_ 1009 PCM_CRUISE_ALT: 8 XXX + SG_ PCM_FOLLOW_DISTANCE : 4|2@1+ (1,0) [0|3] "" XXX SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX SG_ UI_SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX @@ -260,7 +261,7 @@ BO_ 1009 PCM_CRUISE_ALT: 8 XXX BO_ 1020 SOLAR_SENSOR: 8 XXX SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX -BO_ 1041 ACC_HUD: 8 DSU +BO_ 1041 PCS_HUD: 8 DSU SG_ PCS_INDICATOR : 7|2@0+ (1,0) [0|3] "" XXX SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX @@ -432,7 +433,7 @@ BO_ 1880 DEBUG: 8 XXX SG_ BLINDSPOTD2 : 55|8@0+ (1,0) [0|255] "" XXX CM_ SG_ 36 YAW_RATE "verify"; -CM_ SG_ 36 STEERING_TORQUE "does not seem the steer torque, tbd"; +CM_ SG_ 36 ACCEL_X "x-axis accel"; CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set"; CM_ SG_ 37 STEER_RATE "factor is tbd"; CM_ SG_ 466 NEUTRAL_FORCE "force in newtons the engine/electric motors are applying without any acceleration commands or user input"; @@ -447,7 +448,7 @@ CM_ SG_ 581 GAS_PEDAL "it seems slightly filtered"; CM_ SG_ 608 STEER_TORQUE_DRIVER "driver torque"; CM_ SG_ 608 STEER_OVERRIDE "set when driver torque exceeds a certain value"; CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active"; -CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control"; +CM_ SG_ 643 _COUNTER "only used on cars that use this msg for cruise control"; CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control"; CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking"; CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok"; @@ -535,6 +536,7 @@ VAL_ 956 SPORT_ON_2 0 "off" 1 "on"; VAL_ 956 B_GEAR_ENGAGED 0 "off" 1 "on"; VAL_ 956 DRIVE_ENGAGED 0 "off" 1 "on"; VAL_ 1005 REVERSE_CAMERA_GUIDELINES 3 "No guidelines" 2 "Static guidelines" 1 "Active guidelines"; +VAL_ 1009 PCM_FOLLOW_DISTANCE 1 "far" 2 "medium" 3 "close"; VAL_ 1041 PCS_INDICATOR 2 "PCS Faulted" 1 "PCS Turned Off By User" 0 "PCS Enabled"; VAL_ 1041 PCS_SENSITIVITY 64 "high sensitivity" 128 "mid sensitivity" 192 "low sensitivity" 0 "off"; VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none"; diff --git a/opendbc/toyota_nodsu_pt_generated.dbc b/opendbc/toyota_nodsu_pt_generated.dbc index 37065ab6e..7cebae366 100644 --- a/opendbc/toyota_nodsu_pt_generated.dbc +++ b/opendbc/toyota_nodsu_pt_generated.dbc @@ -253,6 +253,7 @@ BO_ 1005 REVERSE_CAMERA_STATE: 2 BGM SG_ REVERSE_CAMERA_GUIDELINES : 9|2@0+ (1,0) [1|3] "" XXX BO_ 1009 PCM_CRUISE_ALT: 8 XXX + SG_ PCM_FOLLOW_DISTANCE : 4|2@1+ (1,0) [0|3] "" XXX SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX SG_ UI_SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX @@ -260,7 +261,7 @@ BO_ 1009 PCM_CRUISE_ALT: 8 XXX BO_ 1020 SOLAR_SENSOR: 8 XXX SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX -BO_ 1041 ACC_HUD: 8 DSU +BO_ 1041 PCS_HUD: 8 DSU SG_ PCS_INDICATOR : 7|2@0+ (1,0) [0|3] "" XXX SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX @@ -432,7 +433,7 @@ BO_ 1880 DEBUG: 8 XXX SG_ BLINDSPOTD2 : 55|8@0+ (1,0) [0|255] "" XXX CM_ SG_ 36 YAW_RATE "verify"; -CM_ SG_ 36 STEERING_TORQUE "does not seem the steer torque, tbd"; +CM_ SG_ 36 ACCEL_X "x-axis accel"; CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set"; CM_ SG_ 37 STEER_RATE "factor is tbd"; CM_ SG_ 466 NEUTRAL_FORCE "force in newtons the engine/electric motors are applying without any acceleration commands or user input"; @@ -447,7 +448,7 @@ CM_ SG_ 581 GAS_PEDAL "it seems slightly filtered"; CM_ SG_ 608 STEER_TORQUE_DRIVER "driver torque"; CM_ SG_ 608 STEER_OVERRIDE "set when driver torque exceeds a certain value"; CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active"; -CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control"; +CM_ SG_ 643 _COUNTER "only used on cars that use this msg for cruise control"; CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control"; CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking"; CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok"; @@ -535,6 +536,7 @@ VAL_ 956 SPORT_ON_2 0 "off" 1 "on"; VAL_ 956 B_GEAR_ENGAGED 0 "off" 1 "on"; VAL_ 956 DRIVE_ENGAGED 0 "off" 1 "on"; VAL_ 1005 REVERSE_CAMERA_GUIDELINES 3 "No guidelines" 2 "Static guidelines" 1 "Active guidelines"; +VAL_ 1009 PCM_FOLLOW_DISTANCE 1 "far" 2 "medium" 3 "close"; VAL_ 1041 PCS_INDICATOR 2 "PCS Faulted" 1 "PCS Turned Off By User" 0 "PCS Enabled"; VAL_ 1041 PCS_SENSITIVITY 64 "high sensitivity" 128 "mid sensitivity" 192 "low sensitivity" 0 "off"; VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none"; diff --git a/opendbc/toyota_tnga_k_pt_generated.dbc b/opendbc/toyota_tnga_k_pt_generated.dbc index 3b6b3c534..03008bd08 100644 --- a/opendbc/toyota_tnga_k_pt_generated.dbc +++ b/opendbc/toyota_tnga_k_pt_generated.dbc @@ -253,6 +253,7 @@ BO_ 1005 REVERSE_CAMERA_STATE: 2 BGM SG_ REVERSE_CAMERA_GUIDELINES : 9|2@0+ (1,0) [1|3] "" XXX BO_ 1009 PCM_CRUISE_ALT: 8 XXX + SG_ PCM_FOLLOW_DISTANCE : 4|2@1+ (1,0) [0|3] "" XXX SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX SG_ UI_SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX @@ -260,7 +261,7 @@ BO_ 1009 PCM_CRUISE_ALT: 8 XXX BO_ 1020 SOLAR_SENSOR: 8 XXX SG_ LUX_SENSOR : 55|13@0+ (1,0) [0|0] "" XXX -BO_ 1041 ACC_HUD: 8 DSU +BO_ 1041 PCS_HUD: 8 DSU SG_ PCS_INDICATOR : 7|2@0+ (1,0) [0|3] "" XXX SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX @@ -432,7 +433,7 @@ BO_ 1880 DEBUG: 8 XXX SG_ BLINDSPOTD2 : 55|8@0+ (1,0) [0|255] "" XXX CM_ SG_ 36 YAW_RATE "verify"; -CM_ SG_ 36 STEERING_TORQUE "does not seem the steer torque, tbd"; +CM_ SG_ 36 ACCEL_X "x-axis accel"; CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set"; CM_ SG_ 37 STEER_RATE "factor is tbd"; CM_ SG_ 466 NEUTRAL_FORCE "force in newtons the engine/electric motors are applying without any acceleration commands or user input"; @@ -447,7 +448,7 @@ CM_ SG_ 581 GAS_PEDAL "it seems slightly filtered"; CM_ SG_ 608 STEER_TORQUE_DRIVER "driver torque"; CM_ SG_ 608 STEER_OVERRIDE "set when driver torque exceeds a certain value"; CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active"; -CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control"; +CM_ SG_ 643 _COUNTER "only used on cars that use this msg for cruise control"; CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control"; CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking"; CM_ SG_ 835 ACC_TYPE "if 2, car is likely to have a permanent low speed lockout. 1 is ok"; @@ -535,6 +536,7 @@ VAL_ 956 SPORT_ON_2 0 "off" 1 "on"; VAL_ 956 B_GEAR_ENGAGED 0 "off" 1 "on"; VAL_ 956 DRIVE_ENGAGED 0 "off" 1 "on"; VAL_ 1005 REVERSE_CAMERA_GUIDELINES 3 "No guidelines" 2 "Static guidelines" 1 "Active guidelines"; +VAL_ 1009 PCM_FOLLOW_DISTANCE 1 "far" 2 "medium" 3 "close"; VAL_ 1041 PCS_INDICATOR 2 "PCS Faulted" 1 "PCS Turned Off By User" 0 "PCS Enabled"; VAL_ 1041 PCS_SENSITIVITY 64 "high sensitivity" 128 "mid sensitivity" 192 "low sensitivity" 0 "off"; VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none"; diff --git a/panda/board/obj/bootstub.panda.bin b/panda/board/obj/bootstub.panda.bin index f179add77..f5ae99d9b 100755 Binary files a/panda/board/obj/bootstub.panda.bin and b/panda/board/obj/bootstub.panda.bin differ diff --git a/panda/board/obj/panda.bin.signed b/panda/board/obj/panda.bin.signed index 884dc14c4..9cf0e030e 100644 Binary files a/panda/board/obj/panda.bin.signed and b/panda/board/obj/panda.bin.signed differ diff --git a/panda/board/obj/panda_h7.bin.signed b/panda/board/obj/panda_h7.bin.signed index 9f0150706..94e8f2dd0 100644 Binary files a/panda/board/obj/panda_h7.bin.signed and b/panda/board/obj/panda_h7.bin.signed differ diff --git a/panda/python/__init__.py b/panda/python/__init__.py index fbd16f15b..5d86092b7 100644 --- a/panda/python/__init__.py +++ b/panda/python/__init__.py @@ -7,7 +7,6 @@ import struct import hashlib import binascii import datetime -import warnings import logging from functools import wraps from typing import Optional @@ -425,10 +424,10 @@ class Panda: if device.getVendorID() == 0xbbaa and device.getProductID() in cls.USB_PIDS: try: serial = device.getSerialNumber() - if len(serial) == 24: + if len(serial) == 24 or serial == "pedal": ret.append(serial) else: - warnings.warn(f"found device with panda descriptors but invalid serial: {serial}", RuntimeWarning) + logging.warning(f"found device with panda descriptors but invalid serial: {serial}", RuntimeWarning) except Exception: continue except Exception: @@ -474,11 +473,7 @@ class Panda: success = True break except Exception: - try: - dfu = PandaDFU(self.get_dfu_serial()) - dfu.recover() - except Exception: - pass + pass time.sleep(0.1) if not success: raise Exception("reconnect failed") @@ -772,13 +767,6 @@ class Panda: def enable_deepsleep(self): self._handle.controlWrite(Panda.REQUEST_OUT, 0xfb, 0, 0, b'') - def set_esp_power(self, on): - self._handle.controlWrite(Panda.REQUEST_OUT, 0xd9, int(on), 0, b'') - - def esp_reset(self, bootmode=0): - self._handle.controlWrite(Panda.REQUEST_OUT, 0xda, int(bootmode), 0, b'') - time.sleep(0.2) - def set_safety_mode(self, mode=SAFETY_SILENT, param=0): self._handle.controlWrite(Panda.REQUEST_OUT, 0xdc, mode, param, b'') diff --git a/panda/python/isotp.py b/panda/python/isotp.py index 45acb6aba..3334deb8e 100644 --- a/panda/python/isotp.py +++ b/panda/python/isotp.py @@ -6,10 +6,8 @@ DEBUG = False def msg(x): if DEBUG: print("S:", binascii.hexlify(x)) - if len(x) <= 7: - ret = bytes([len(x)]) + x - else: - assert False + assert len(x) <= 7 + ret = bytes([len(x)]) + x return ret.ljust(8, b"\x00") kmsgs = [] @@ -56,7 +54,7 @@ def isotp_recv_subaddr(panda, addr, bus, sendaddr, subaddr): dat = msg[2:] else: print(binascii.hexlify(msg)) - assert False + raise AssertionError return dat[0:tlen] @@ -133,7 +131,7 @@ def isotp_recv(panda, addr, bus=0, sendaddr=None, subaddr=None): tlen = msg[0] & 0xf dat = msg[1:] else: - assert False + raise AssertionError dat = dat[0:tlen] if DEBUG: diff --git a/panda/python/spi.py b/panda/python/spi.py index ad0225b1e..0be28f49c 100644 --- a/panda/python/spi.py +++ b/panda/python/spi.py @@ -314,7 +314,7 @@ class STBootloaderSPIHandle(BaseSTBootloaderHandle): self._mcu_type = MCU_TYPE_BY_IDCODE[self.get_chip_id()] except PandaSpiException: - raise PandaSpiException("failed to connect to panda") # pylint: disable=W0707 + raise PandaSpiException("failed to connect to panda") from None def _get_ack(self, spi, timeout=1.0): data = 0x00 diff --git a/selfdrive/boardd/boardd b/selfdrive/boardd/boardd index b7f71c494..569726ccc 100755 Binary files a/selfdrive/boardd/boardd and b/selfdrive/boardd/boardd differ diff --git a/selfdrive/boardd/boardd_api_impl.so b/selfdrive/boardd/boardd_api_impl.so index 18fd369de..585d5254b 100755 Binary files a/selfdrive/boardd/boardd_api_impl.so and b/selfdrive/boardd/boardd_api_impl.so differ diff --git a/selfdrive/locationd/locationd b/selfdrive/locationd/locationd index 6c5ab754f..e6c54796f 100755 Binary files a/selfdrive/locationd/locationd and b/selfdrive/locationd/locationd differ diff --git a/selfdrive/modeld/_dmonitoringmodeld b/selfdrive/modeld/_dmonitoringmodeld index 400c21ebb..efd5fa341 100755 Binary files a/selfdrive/modeld/_dmonitoringmodeld and b/selfdrive/modeld/_dmonitoringmodeld differ diff --git a/selfdrive/modeld/_modeld b/selfdrive/modeld/_modeld index 1d572b772..bc88d443a 100755 Binary files a/selfdrive/modeld/_modeld and b/selfdrive/modeld/_modeld differ diff --git a/selfdrive/modeld/_navmodeld b/selfdrive/modeld/_navmodeld index ad724a539..c37d8229a 100755 Binary files a/selfdrive/modeld/_navmodeld and b/selfdrive/modeld/_navmodeld differ diff --git a/selfdrive/navd/libmaprender.so b/selfdrive/navd/libmaprender.so index c23d81f9b..3a3fea2c4 100755 Binary files a/selfdrive/navd/libmaprender.so and b/selfdrive/navd/libmaprender.so differ diff --git a/selfdrive/ui/_ui b/selfdrive/ui/_ui index fe5ef10da..f472ba77a 100755 Binary files a/selfdrive/ui/_ui and b/selfdrive/ui/_ui differ diff --git a/selfdrive/ui/soundd/_soundd b/selfdrive/ui/soundd/_soundd index 2bcd2fa09..7dbcb17de 100755 Binary files a/selfdrive/ui/soundd/_soundd and b/selfdrive/ui/soundd/_soundd differ diff --git a/system/camerad/camerad b/system/camerad/camerad index 4ddbfe88b..4f9204146 100755 Binary files a/system/camerad/camerad and b/system/camerad/camerad differ diff --git a/system/clocksd/clocksd b/system/clocksd/clocksd index 66282c454..db965d721 100755 Binary files a/system/clocksd/clocksd and b/system/clocksd/clocksd differ diff --git a/system/logcatd/logcatd b/system/logcatd/logcatd index 551da1120..3225cdd8d 100755 Binary files a/system/logcatd/logcatd and b/system/logcatd/logcatd differ diff --git a/system/loggerd/bootlog b/system/loggerd/bootlog index 4d6c14145..3f49aef03 100755 Binary files a/system/loggerd/bootlog and b/system/loggerd/bootlog differ diff --git a/system/loggerd/encoderd b/system/loggerd/encoderd index 18f6ea473..3b0f84f22 100755 Binary files a/system/loggerd/encoderd and b/system/loggerd/encoderd differ diff --git a/system/loggerd/loggerd b/system/loggerd/loggerd index 03ca024c0..bda7988d5 100755 Binary files a/system/loggerd/loggerd and b/system/loggerd/loggerd differ diff --git a/system/proclogd/proclogd b/system/proclogd/proclogd index 2d91ac4cb..cfd5c8f7f 100755 Binary files a/system/proclogd/proclogd and b/system/proclogd/proclogd differ diff --git a/system/sensord/_sensord b/system/sensord/_sensord index 9d4481f57..b5750e397 100755 Binary files a/system/sensord/_sensord and b/system/sensord/_sensord differ diff --git a/system/ubloxd/ubloxd b/system/ubloxd/ubloxd index 8030f70c1..396c38f67 100755 Binary files a/system/ubloxd/ubloxd and b/system/ubloxd/ubloxd differ