File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,10 @@ def _send_command(self):
98
98
# Send a status request
99
99
cmdBin = array .array ("B" , [ESC , ord ("A" )])
100
100
cmdBin .tofile (self ._devout )
101
- rspBin = self ._devin .read (8 )
101
+ # Increase buffer size to 16 bytes to prevent overflow
102
+ # on LabelManager 280
103
+ # https://libusb.sourceforge.io/api-1.0/libusb_packetoverflow.html
104
+ rspBin = self ._devin .read (16 )
102
105
_ = array .array ("B" , rspBin ).tolist ()
103
106
# Ok, we got a response. Now we can send a chunk of data
104
107
@@ -129,7 +132,7 @@ def _send_command(self):
129
132
if not self ._response :
130
133
return None
131
134
self ._response = False
132
- responseBin = self ._devin .read (8 )
135
+ responseBin = self ._devin .read (16 )
133
136
response = array .array ("B" , responseBin ).tolist ()
134
137
return response
135
138
You can’t perform that action at this time.
0 commit comments