Skip to content

Commit

Permalink
#80 Try setting the light and light bar on ourselves
Browse files Browse the repository at this point in the history
  • Loading branch information
sighmon committed Sep 12, 2024
1 parent 2cc506c commit 7a8c3bb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,16 +575,22 @@ def turn_on_barcode_scanner(self):
log(f"ERROR: {READER_MODEL} failed begin() with: {exception}")
sleep(1)
try:
self.barcode_scanner.enable_motion_sense()
self.barcode_scanner.enable_continuous_read()
sleep(1)
except TypeError as exception:
log(f'ERROR: {READER_MODEL} failed setting motion mode with: {exception}')
log(f'ERROR: {READER_MODEL} failed setting read mode with: {exception}')
sleep(1)
try:
self.barcode_scanner.enable_continuous_read()
self.barcode_scanner.light_on()
sleep(1)
except TypeError as exception:
log(f'ERROR: {READER_MODEL} failed setting read mode with: {exception}')
log(f'ERROR: {READER_MODEL} failed setting light on with: {exception}')
sleep(1)
try:
self.barcode_scanner.reticle_on()
sleep(1)
except TypeError as exception:
log(f'ERROR: {READER_MODEL} failed setting red bar on with: {exception}')
sleep(1)

except (OSError, serial.serialutil.SerialException) as exception:
Expand Down

0 comments on commit 7a8c3bb

Please sign in to comment.