Skip to content

Commit

Permalink
Remove valid_qr checks
Browse files Browse the repository at this point in the history
  • Loading branch information
P-ict0 committed Mar 5, 2024
1 parent f6814d6 commit 7e0a00f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions hmi/scripts/qr_code_decoder
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,19 @@ class QRCodeDecode(AbstractHMIServer):
qr = None

for qr_i in qr_list:
valid_qr = validate_image(gray_img, qr_i.rect)
if valid_qr:
qr = qr_i
break

if not valid_qr:
# qr code does not occupy the required percentage of the screen
break
# valid_qr = validate_image(gray_img, qr_i.rect)
# if valid_qr:
# qr = qr_i
# break
qr = qr_i

# if not valid_qr:
# # qr code does not occupy the required percentage of the screen
# break
data_decoded.append(qr.data.decode("utf-8"))

if len(set(data_decoded)) == 1 and valid_qr:
# if len(set(data_decoded)) == 1 and valid_qr:
if len(set(data_decoded)) == 1:
rospy.loginfo("QR code decoding successful.")
self._qr_code_data = data_decoded[0]
else:
Expand Down

0 comments on commit 7e0a00f

Please sign in to comment.