diff --git a/can/dbc_test.py b/can/dbc_test.py deleted file mode 100644 index 339e2a1..0000000 --- a/can/dbc_test.py +++ /dev/null @@ -1,33 +0,0 @@ -import sys -import os -import dbcs -from common.dbc import dbc - -def run_test(test): - dbcpath = dbcs.DBC_PATH - if test == "delphi": - dbc_read = dbc(os.path.join(dbcpath, "delphi_esr2_64.dbc")) - st = "0021e7cd0000864d".decode("hex") - msg = 1280 - elif test == "nidec": - dbc_read = dbc(os.path.join(dbcpath, "acura_ilx_2016_nidec.dbc")) - st = "0118111100000000".decode("hex") - msg = 0x301 - elif test == "steer_status": - dbc_read = dbc(os.path.join(dbcpath, "acura_ilx_2016_can.dbc")) - st = "00000000000000".decode("hex") - msg = 0x18f - - print(st) - print('here', dbc_read.msgs[msg]) - out = dbc_read.decode([msg, 0, st], debug=True)[1] - print("out!!",out) - encoded = dbc_read.encode(msg, out) - print("compare") - print(encoded.encode("hex")) - print(st.encode("hex")) - assert encoded == st - -if __name__ == "__main__": - map(run_test, ['delphi', 'nidec', 'steer_status']) - diff --git a/can/libdbc_py.py b/can/libdbc_py.py index ee0ab6b..26fedf2 100644 --- a/can/libdbc_py.py +++ b/can/libdbc_py.py @@ -1,5 +1,4 @@ import os -import subprocess from cffi import FFI diff --git a/can/packer.py b/can/packer.py index d812af6..b136ca9 100644 --- a/can/packer.py +++ b/can/packer.py @@ -1,6 +1,3 @@ # pylint: skip-file -import os -import subprocess - from opendbc.can.packer_impl import CANPacker assert CANPacker diff --git a/can/parser.py b/can/parser.py index 218cc89..3c3def2 100644 --- a/can/parser.py +++ b/can/parser.py @@ -1,5 +1,2 @@ -import os -import subprocess - from opendbc.can.parser_pyx import CANParser # pylint: disable=no-name-in-module, import-error assert CANParser