Skip to content

Commit

Permalink
Change return type to data instead of image
Browse files Browse the repository at this point in the history
  • Loading branch information
P-ict0 committed Mar 5, 2024
1 parent 26a8566 commit f6814d6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions hmi/scripts/qr_code_decoder
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,19 @@ class QRCodeDecode(AbstractHMIServer):
def _determine_answer(
self, description: str, grammar: str, target: str, is_preempt_requested: Callable
) -> HMIResult:

result = ""
rospy.loginfo("Received image!")

self.decode_qr_code()

rospy.loginfo("QR code data: %s", self._qr_code_data)
semantics = parse_sentence(self._qr_code_data, grammar, target)

rospy.loginfo("Parsed semantics: %s", semantics)
if self._qr_code_data:
semantics = parse_sentence(self._qr_code_data, grammar, target)

rospy.loginfo("Parsed semantics: %s", semantics)

result = HMIResult(self._qr_code_data, semantics)
self._string = None
result = HMIResult(self._qr_code_data, semantics)

return result

Expand Down

0 comments on commit f6814d6

Please sign in to comment.