mirror of https://github.com/rusefi/opendbc.git
fix linter
This commit is contained in:
parent
be210fef62
commit
a5c640a51b
|
@ -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'])
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
from cffi import FFI
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
# pylint: skip-file
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from opendbc.can.packer_impl import CANPacker
|
||||
assert CANPacker
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue