Skip to content

Commit

Permalink
#80 Set light and beeper before calling .begin()
Browse files Browse the repository at this point in the history
  • Loading branch information
sighmon committed Sep 11, 2024
1 parent f0441e6 commit 1fb173c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,14 @@ def process_taps(self):
try:
# Note: to set a new scanner into USB-COM mode, scan the PORVIC barcode
scanner = de2120_barcode_scanner.DE2120BarcodeScanner()
scanner.light_on()
scanner.reticle_on()
scanner.enable_decode_beep()

if not scanner.begin():
log(f"ERROR: {READER_MODEL} isn't connected...")
return
log(f'{READER_MODEL} connected...')
scanner.light_on()
scanner.reticle_on()

while True:
scan_buffer = scanner.read_barcode()
Expand Down

0 comments on commit 1fb173c

Please sign in to comment.