linux_addr.patch fix/revert
This commit is contained in:
parent
b35e04be39
commit
1aeb74ada5
@ -36,10 +36,10 @@ class USB_HID:
|
||||
import usocket as socket
|
||||
self.pipe = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
|
||||
# If on linux, try commenting the following line
|
||||
# addr = bytes([len(self.fn)+2, socket.AF_UNIX] + list(self.fn))
|
||||
addr = bytes([len(self.fn)+2, socket.AF_UNIX] + list(self.fn))
|
||||
# If on linux, try uncommenting the following two lines
|
||||
import struct
|
||||
addr = struct.pack('H108s', socket.AF_UNIX, self.fn)
|
||||
#import struct
|
||||
#addr = struct.pack('H108s', socket.AF_UNIX, self.fn)
|
||||
while 1:
|
||||
try:
|
||||
self.pipe.bind(addr)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user