mirror of
https://github.com/Lorenzooone/PokemonGB_Online_Trades.git
synced 2026-04-26 08:18:52 -05:00
Fix issues with winusbcdc
This commit is contained in:
parent
4c316d40a2
commit
c0b2eda976
|
|
@ -14,6 +14,8 @@ def read_all(receiver, debug=False):
|
|||
while True:
|
||||
try:
|
||||
data = receiver(0x40)
|
||||
if len(data) == 0:
|
||||
break
|
||||
output <<= (8*prev_len)
|
||||
output |= int.from_bytes(data, byteorder='big')
|
||||
prev_len = len(data)
|
||||
|
|
|
|||
|
|
@ -103,11 +103,11 @@ def sendByte_win(byte_to_send, num_bytes):
|
|||
def sendList_win(data, chunk_size=8):
|
||||
num_iters = int(len(data)/chunk_size)
|
||||
for i in range(num_iters):
|
||||
p.write(data[i*chunk_size:(i+1)*chunk_size])
|
||||
p.write(bytes(data[i*chunk_size:(i+1)*chunk_size]))
|
||||
#print(num_iters*chunk_size)
|
||||
#print(len(data))
|
||||
if (num_iters*chunk_size) != len(data):
|
||||
p.write(data[num_iters*chunk_size:])
|
||||
p.write(bytes(data[num_iters*chunk_size:]))
|
||||
|
||||
def receiveByte_win(num_bytes):
|
||||
recv = int.from_bytes(p.read(size=num_bytes), byteorder='big')
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ class GSCTradingStrings:
|
|||
Class which collects all the text used by the program
|
||||
and methods connected to that.
|
||||
"""
|
||||
version_str = "Version: 3.0.1"
|
||||
version_str = "Version: 3.0.2"
|
||||
buffered_str = "Buffered"
|
||||
synchronous_str = "Synchronous"
|
||||
send_request = "S"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user