Skip to content
Permalink
Browse files

fix parsing error

  • Loading branch information...
jabdoa2 committed Jul 21, 2019
1 parent b99daff commit de7dc636ee23007c36a4f3df6a0cd3d25cca9b6f
Showing with 2 additions and 5 deletions.
  1. +2 −5 mpf/platforms/opp/opp_serial_communicator.py
@@ -156,7 +156,7 @@ def _parse_msg(self, msg):
strlen = len(self.partMsg)
message_found = 0
# Split into individual responses
while strlen > 0:
while strlen > 2:
if self._lost_synch:
while strlen > 0:
# wait for next gen2 card message
@@ -165,11 +165,8 @@ def _parse_msg(self, msg):
break
self.partMsg = self.partMsg[1:]
strlen -= 1
# continue because the buffer could be empty
continue

# Check if this is a gen2 card address
if (self.partMsg[0] & 0xe0) == 0x20:
elif (self.partMsg[0] & 0xe0) == 0x20:
# Check if read input
if self.partMsg[1] == ord(OppRs232Intf.READ_GEN2_INP_CMD):
if strlen >= 7:

0 comments on commit de7dc63

Please sign in to comment.
You can’t perform that action at this time.