PriceHax app

ESL Blaster FW V3
Updated setsegs to support new tx.py
This commit is contained in:
Furrtek
2023-08-06 16:41:37 +02:00
parent 7f0fcb4f27
commit c583ea40f8
171 changed files with 88879 additions and 12 deletions

View File

@@ -67,8 +67,8 @@ if (port == "0"):
blaster_info = tx.search_esl_blaster()
if blaster_info[0] == False:
exit()
if blaster_info[2] == 1:
pp16 = 1 # ESL Blaster FW V2 is PP16 compatible
if blaster_info[2] >= 2:
pp16 = 1 # ESL Blaster FW V2 and above is PP16 compatible
# Open image file
image = imread(sys.argv[2])

View File

@@ -23,8 +23,8 @@ def terminate_frame(frame, pp16, repeats):
frame[0:0] = [0x00, 0x00, 0x00, 0x40] # Prepend special PP16 header
frame.append(crc & 255)
frame.append((crc // 256) & 255)
frame.append(repeats & 255) # This is used by the transmitter, it's not part of the transmitted data
frame.append((repeats // 256) & 255) # This is used by the transmitter, it's not part of the transmitted data
frame.append(repeats & 255) # This is used by the serial transmitter, it's not part of the transmitted data
frame.append((repeats // 256) & 255) # This is used by the serial transmitter, it's not part of the transmitted data
def make_raw_frame(protocol, PLID, cmd):
frame = [protocol, PLID[3], PLID[2], PLID[1], PLID[0], cmd]

View File

@@ -21,11 +21,12 @@ if len(sys.argv[3]) != 46:
usage()
port = sys.argv[1]
pp16 = 0 # None of the segment-based ESLs tested support PP16
# Search for connected ESL Blaster if required
if (port == "0"):
blaster_port = tx.search_esl_blaster()
if (blaster_port == "0"):
blaster_info = tx.search_esl_blaster()
if blaster_info[0] == False:
exit()
# Get PLID from barcode string
@@ -47,7 +48,7 @@ payload.extend([0x00, 0x00, 0x09, 0x00, 0x10, 0x00, 0x31])
frame = pr.make_raw_frame(0x84, PLID, payload[0])
frame.extend(payload[1:])
pr.terminate_frame(frame, 100)
pr.terminate_frame(frame, pp16, 100)
frames.append(frame)
# DEBUG
@@ -60,7 +61,7 @@ frames.append(frame)
# Send data to IR transmitter
if (port == "0"):
tx.transmit_esl_blaster(frames, blaster_port)
tx.transmit_esl_blaster(frames, pp16, blaster_info[0])
else:
tx.transmit_serial(frames, port)
print("Done.")