Code: Select all
def rec0(self,bus, reason):
print('rec0')
if reason == 0:
print('pending')
#print(bus)
#print(self.can)
#help(bus)
tmp = bus.recv(self.fifo)
print(tmp[3])
def send_dat(self,dat):
host_can_id = 0x7ff
for i in range(len(dat)):
self.can.send(dat[i], host_can_id)
return 1