From 7b93ce7d3c07dc8d60dacbd4ab76651882f4d92b Mon Sep 17 00:00:00 2001
From: tao_z <tzj0429@163.com>
Date: Mon, 16 May 2022 20:15:19 +0800
Subject: [PATCH] 使用PIPE前存储

---
 test.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/test.py b/test.py
index c375b96..a61aad1 100644
--- a/test.py
+++ b/test.py
@@ -49,7 +49,7 @@
     is_remote_frame=0,
     channel=0,
     dlc=8,
-    data=bytearray(0x02, 0x3e, 0, 0, 0, 0, 0, 0),
+    data=bytearray([0x02, 0x3e, 0, 0, 0, 0, 0, 0])
 )
 
 
@@ -110,7 +110,7 @@
 
 def tx_task(bus: USBCAN):
     while True:
-        bus.Transmit(device_type, device_index, can_channel, msg=msg, len=1)
+        bus.send(msg=msg)
         time.sleep(0.1)
 
 
@@ -121,7 +121,8 @@
         if not num == 0:
             for i in range(num):
                 if msg[i].arbitration_id == 0x77a:
-                    print(msg[i].arbitration_id)
+                    # print(formatedata(i, msg[i], True))
+                    print(msg[i].data)
 
 
 if __name__ == '__main__':

--
Gitblit v1.8.0